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

Commit 90213e00 authored by Wentao Wang's avatar Wentao Wang Committed by Android (Google) Code Review
Browse files

Merge "Allow Retail Demo's admin panel to be triggered in non demo user as well." into main

parents a8249fbd 24623342
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -130,12 +130,11 @@ public class BuildNumberPreferenceController extends BasePreferenceController im
        }

        if (mUm.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES)) {
            if (mUm.isDemoUser()) {
                // Route to demo device owner to lift the debugging restriction.
                final ComponentName componentName = Utils.getDeviceOwnerComponent(mContext);
                if (componentName != null) {
            // Route to active device admin to lift the debugging restriction.
            if (mDebuggingFeaturesDisallowedAdmin != null
                    && mDebuggingFeaturesDisallowedAdmin.component != null) {
                final Intent requestDebugFeatures = new Intent()
                            .setPackage(componentName.getPackageName())
                        .setPackage(mDebuggingFeaturesDisallowedAdmin.component.getPackageName())
                        .setAction("com.android.settings.action.REQUEST_DEBUG_FEATURES");
                final ResolveInfo resolveInfo = mContext.getPackageManager().resolveActivity(
                        requestDebugFeatures, 0);
@@ -144,7 +143,6 @@ public class BuildNumberPreferenceController extends BasePreferenceController im
                    return false;
                }
            }
            }
            if (mDebuggingFeaturesDisallowedAdmin != null &&
                    !mDebuggingFeaturesDisallowedBySystem) {
                RestrictedLockUtils.sendShowAdminSupportDetailsIntent(mContext,