diff options
author | Jeff Sharkey <jsharkey@android.com> | 2014-10-23 13:59:54 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2014-10-24 13:06:32 -0700 |
commit | 0166ddf5bbb5d855cb2f5bca4c6a9f0281c14814 (patch) | |
tree | 1483b6bd123c67862c4aec9dc3e518eff6d10050 | |
parent | e41d967c5c6ff42ea41f61c731d77aa687b3956f (diff) | |
download | frameworks_base-0166ddf5bbb5d855cb2f5bca4c6a9f0281c14814.zip frameworks_base-0166ddf5bbb5d855cb2f5bca4c6a9f0281c14814.tar.gz frameworks_base-0166ddf5bbb5d855cb2f5bca4c6a9f0281c14814.tar.bz2 |
Recent directories can't show file size.
Don't show the toggle to the user, which can avoid crashing.
Bug: 17942524
Change-Id: Iaedd61b7c69e14b57508cb9865d1e0124ca2e505
-rw-r--r-- | packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java index fef1f4a..219de38 100644 --- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java +++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java @@ -574,7 +574,8 @@ public class DocumentsActivity extends Activity { // Only sort by size when visible sortSize.setVisible(mState.showSize); - final boolean searchVisible; + boolean searchVisible; + boolean fileSizeVisible = mState.action != ACTION_MANAGE; if (mState.action == ACTION_CREATE || mState.action == ACTION_OPEN_TREE) { createDir.setVisible(cwd != null && cwd.isCreateSupported()); searchVisible = false; @@ -583,6 +584,7 @@ public class DocumentsActivity extends Activity { if (cwd == null) { grid.setVisible(false); list.setVisible(false); + fileSizeVisible = false; } if (mState.action == ACTION_CREATE) { @@ -604,7 +606,7 @@ public class DocumentsActivity extends Activity { ? R.string.menu_file_size_hide : R.string.menu_file_size_show); advanced.setVisible(mState.action != ACTION_MANAGE); - fileSize.setVisible(mState.action != ACTION_MANAGE); + fileSize.setVisible(fileSizeVisible); return true; } |