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

Commit 24623342 authored by Wentao Wang's avatar Wentao Wang
Browse files

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

Pixel RDM no longer provides demo user for US carriers. Removing the
unnecessary checks of demo user in settings.

Flag: EXEMPT bugfix
BUG=406689907

Change-Id: Id25c634f1b12336b0cf6dd161801dc0a3efb8cb2
parent 0fc54ce6
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,