summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-10-25 18:17:52 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-25 18:17:52 -0700
commitde9b66fee1bdbc914c287fb9a2aa832dc2d3e6f9 (patch)
treedba8154c1eb5513cab372e77d25178b4b737b9f9 /packages/DocumentsUI
parent33c7520b68e015c46ed1bcb277dc4faaa368cc55 (diff)
parent3ac436b758830eb938c62d5ed91caa7808b5b63e (diff)
downloadframeworks_base-de9b66fee1bdbc914c287fb9a2aa832dc2d3e6f9.zip
frameworks_base-de9b66fee1bdbc914c287fb9a2aa832dc2d3e6f9.tar.gz
frameworks_base-de9b66fee1bdbc914c287fb9a2aa832dc2d3e6f9.tar.bz2
am 3ac436b7: am 80f103ae: Merge "Extra to always show advanced devices." into klp-dev
* commit '3ac436b758830eb938c62d5ed91caa7808b5b63e': Extra to always show advanced devices.
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);