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

Commit c22ce3e1 authored by Daniel Hillenbrand's avatar Daniel Hillenbrand Committed by Gerrit Code Review
Browse files

Merge "Frameworks Base: Use public constant for SYSTEM_PROFILES_ENABLED" into jellybean

parents 91f75275 fae0ab97
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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;

@@ -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);
@@ -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));
@@ -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();
+2 −2
Original line number Diff line number Diff line
@@ -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";

    /**
@@ -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() {