Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13f7fc80 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

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
parent 2bfdedbe
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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);