summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-10-25 16:30:54 -0700
committerJeff Sharkey <jsharkey@android.com>2013-10-25 16:30:54 -0700
commit96c620595bd0585f934b0971b4552c57845e9a78 (patch)
treee523cdadefc3ac8730cc9a80f11c5e8fcddf2dc1 /packages/DocumentsUI
parentc802a6614095660bccfd0cdf4f15404ad1863b76 (diff)
downloadframeworks_base-96c620595bd0585f934b0971b4552c57845e9a78.zip
frameworks_base-96c620595bd0585f934b0971b4552c57845e9a78.tar.gz
frameworks_base-96c620595bd0585f934b0971b4552c57845e9a78.tar.bz2
Extra to always show advanced devices.
Also always lower-case extension to extract MIME type correctly, we may want to fix in MimeUtils at some point. Bug: 11354402 Change-Id: I77d0c06a663cd0c4320c41553ff1980b6f9a7778
Diffstat (limited to 'packages/DocumentsUI')
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java7
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java3
2 files changed, 8 insertions, 2 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
index a9278d7..4212e96 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
@@ -255,7 +255,9 @@ public class DocumentsActivity extends Activity {
}
mState.localOnly = intent.getBooleanExtra(Intent.EXTRA_LOCAL_ONLY, false);
- mState.showAdvanced = SettingsActivity.getDisplayAdvancedDevices(this);
+ mState.forceAdvanced = intent.getBooleanExtra(DocumentsContract.EXTRA_SHOW_ADVANCED, false);
+ mState.showAdvanced = mState.forceAdvanced
+ | SettingsActivity.getDisplayAdvancedDevices(this);
}
private class RestoreRootTask extends AsyncTask<Void, Void, RootInfo> {
@@ -1136,6 +1138,7 @@ public class DocumentsActivity extends Activity {
public boolean allowMultiple = false;
public boolean showSize = false;
public boolean localOnly = false;
+ public boolean forceAdvanced = false;
public boolean showAdvanced = false;
public boolean stackTouched = false;
public boolean restored = false;
@@ -1176,6 +1179,7 @@ public class DocumentsActivity extends Activity {
out.writeInt(allowMultiple ? 1 : 0);
out.writeInt(showSize ? 1 : 0);
out.writeInt(localOnly ? 1 : 0);
+ out.writeInt(forceAdvanced ? 1 : 0);
out.writeInt(showAdvanced ? 1 : 0);
out.writeInt(stackTouched ? 1 : 0);
out.writeInt(restored ? 1 : 0);
@@ -1195,6 +1199,7 @@ public class DocumentsActivity extends Activity {
state.allowMultiple = in.readInt() != 0;
state.showSize = in.readInt() != 0;
state.localOnly = in.readInt() != 0;
+ state.forceAdvanced = in.readInt() != 0;
state.showAdvanced = in.readInt() != 0;
state.stackTouched = in.readInt() != 0;
state.restored = in.readInt() != 0;
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java b/packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java
index 58c5daf..931dac9 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/RootsFragment.java
@@ -136,7 +136,8 @@ public class RootsFragment extends Fragment {
final Context context = getActivity();
final State state = ((DocumentsActivity) context).getDisplayState();
- state.showAdvanced = SettingsActivity.getDisplayAdvancedDevices(context);
+ state.showAdvanced = state.forceAdvanced
+ | SettingsActivity.getDisplayAdvancedDevices(context);
if (state.action == ACTION_GET_CONTENT) {
mList.setOnItemLongClickListener(mItemLongClickListener);