DO NOT MERGE - Allow FR in carrier demo mode
Bug: 34341567 Test: manual - in carrier demo mode, go to Settings > Backup and Reset > Factory data reset > Reset phone > Erase everything and this entire path is viewable. Change-Id: I373a2e94f205f6e6e4dd9a54dcf08532a64e5187
This commit is contained in:
@@ -1207,4 +1207,13 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isCarrierDemoUser(Context context) {
|
||||
final String carrierDemoModeSetting =
|
||||
context.getString(com.android.internal.R.string.config_carrierDemoModeSetting);
|
||||
return UserManager.isDeviceInDemoMode(context)
|
||||
&& getUserManager(context).isDemoUser()
|
||||
&& !TextUtils.isEmpty(carrierDemoModeSetting)
|
||||
&& Settings.Secure.getInt(context.getContentResolver(), carrierDemoModeSetting, 0) == 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user