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

Commit 5a87aff1 authored by Garfield Tan's avatar Garfield Tan
Browse files

Remove DocumentsContract.ACTION_BROWSE.

Test: Code builds and tests pass.
Bug: 35760993

Change-Id: Ie73e4dd6960795f221c984af900472d674fff2a7
(cherry picked from commit 225a031b)
parent 97e21013
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.documentsui.files;

import static com.android.documentsui.base.Shared.DEBUG;
import static com.android.documentsui.base.Shared.ENABLE_OMC_API_FEATURES;

import android.app.Activity;
import android.content.ActivityNotFoundException;
@@ -419,7 +420,8 @@ public class ActionHandler<T extends Activity & Addons> extends AbstractActionHa

    private boolean launchToRoot(Intent intent) {
        String action = intent.getAction();
        if (Intent.ACTION_VIEW.equals(action) || DocumentsContract.ACTION_BROWSE.equals(action)) {
        if (Intent.ACTION_VIEW.equals(action)
                || (!ENABLE_OMC_API_FEATURES && "android.provider.action.BROWSE".equals(action))) {
            Uri uri = intent.getData();
            if (DocumentsContract.isRootUri(mActivity, uri)) {
                if (DEBUG) Log.d(TAG, "Launching with root URI.");