Loading core/java/android/app/ProfileManager.java +3 −5 Original line number Diff line number Diff line Loading @@ -41,8 +41,6 @@ public class ProfileManager { private static final String TAG = "ProfileManager"; private static final String SYSTEM_PROFILES_ENABLED = "system_profiles_enabled"; // A blank profile that is created to be returned if profiles disabled private static Profile mEmptyProfile; Loading @@ -65,7 +63,7 @@ public class ProfileManager { @Deprecated public void setActiveProfile(String profileName) { if (Settings.System.getInt(mContext.getContentResolver(), SYSTEM_PROFILES_ENABLED, 1) == 1) { Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) { // Profiles are enabled, return active profile try { getService().setActiveProfileByName(profileName); Loading @@ -77,7 +75,7 @@ public class ProfileManager { public void setActiveProfile(UUID profileUuid) { if (Settings.System.getInt(mContext.getContentResolver(), SYSTEM_PROFILES_ENABLED, 1) == 1) { Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) { // Profiles are enabled, return active profile try { getService().setActiveProfile(new ParcelUuid(profileUuid)); Loading @@ -89,7 +87,7 @@ public class ProfileManager { public Profile getActiveProfile() { if (Settings.System.getInt(mContext.getContentResolver(), SYSTEM_PROFILES_ENABLED, 1) == 1) { Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) { // Profiles are enabled, return active profile try { return getService().getActiveProfile(); Loading policy/src/com/android/internal/policy/impl/GlobalActions.java +2 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,6 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac private IWindowManager mIWindowManager; private Profile mChosenProfile; private static final String SYSTEM_PROFILES_ENABLED = "system_profiles_enabled"; private static final String POWER_MENU_SCREENSHOT_ENABLED = "power_menu_screenshot_enabled"; /** Loading Loading @@ -276,7 +275,8 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac }); // next: profile - only shown if enabled, enabled by default if (Settings.System.getInt(mContext.getContentResolver(), SYSTEM_PROFILES_ENABLED, 1) == 1) { if (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) { mItems.add( new ProfileChooseAction() { public void onPress() { Loading Loading
core/java/android/app/ProfileManager.java +3 −5 Original line number Diff line number Diff line Loading @@ -41,8 +41,6 @@ public class ProfileManager { private static final String TAG = "ProfileManager"; private static final String SYSTEM_PROFILES_ENABLED = "system_profiles_enabled"; // A blank profile that is created to be returned if profiles disabled private static Profile mEmptyProfile; Loading @@ -65,7 +63,7 @@ public class ProfileManager { @Deprecated public void setActiveProfile(String profileName) { if (Settings.System.getInt(mContext.getContentResolver(), SYSTEM_PROFILES_ENABLED, 1) == 1) { Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) { // Profiles are enabled, return active profile try { getService().setActiveProfileByName(profileName); Loading @@ -77,7 +75,7 @@ public class ProfileManager { public void setActiveProfile(UUID profileUuid) { if (Settings.System.getInt(mContext.getContentResolver(), SYSTEM_PROFILES_ENABLED, 1) == 1) { Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) { // Profiles are enabled, return active profile try { getService().setActiveProfile(new ParcelUuid(profileUuid)); Loading @@ -89,7 +87,7 @@ public class ProfileManager { public Profile getActiveProfile() { if (Settings.System.getInt(mContext.getContentResolver(), SYSTEM_PROFILES_ENABLED, 1) == 1) { Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) { // Profiles are enabled, return active profile try { return getService().getActiveProfile(); Loading
policy/src/com/android/internal/policy/impl/GlobalActions.java +2 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,6 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac private IWindowManager mIWindowManager; private Profile mChosenProfile; private static final String SYSTEM_PROFILES_ENABLED = "system_profiles_enabled"; private static final String POWER_MENU_SCREENSHOT_ENABLED = "power_menu_screenshot_enabled"; /** Loading Loading @@ -276,7 +275,8 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac }); // next: profile - only shown if enabled, enabled by default if (Settings.System.getInt(mContext.getContentResolver(), SYSTEM_PROFILES_ENABLED, 1) == 1) { if (Settings.System.getInt(mContext.getContentResolver(), Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) { mItems.add( new ProfileChooseAction() { public void onPress() { Loading