Add dialog for top switch on fully managed devices.

Bug: 311233745
Change-Id: Id4043675041d1cf9c0ed307f3a0c2dc65768641b
This commit is contained in:
Wa Gao
2023-11-17 03:27:05 +00:00
parent 2d45bcccab
commit b14867f6ac
3 changed files with 111 additions and 25 deletions

View File

@@ -78,7 +78,7 @@ public class SettingsMainSwitchPreference extends TwoStatePreference implements
holder.setDividerAllowedAbove(false);
holder.setDividerAllowedBelow(false);
if (mRestrictedHelper != null) {
if (mEnforcedAdmin == null && mRestrictedHelper != null) {
mEnforcedAdmin = mRestrictedHelper.checkRestrictionEnforced();
}
mMainSwitchBar = (SettingsMainSwitchBar) holder.findViewById(R.id.main_switch_bar);