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

Commit 82dfdc41 authored by Danesh M's avatar Danesh M
Browse files

Settings : Update settings reference for powerButton/bugReport

Switch INCALL_POWER_BUTTON_BEHAVIOR and BUGREPORT_IN_POWER_MENU to
Settings reference

Change-Id: I0a14e8b1a667e3922540a77479bfc1932cad7130
parent 2209d035
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -446,10 +446,10 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
        // Power button ends calls.
        if (mPowerEndCall != null) {
            final int incallPowerBehavior = CMSettings.Secure.getInt(getContentResolver(),
                    CMSettings.Secure.INCALL_POWER_BUTTON_BEHAVIOR,
                    CMSettings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT);
                    Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR,
                    Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT);
            final boolean powerButtonEndsCall =
                    (incallPowerBehavior == CMSettings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP);
                    (incallPowerBehavior == Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP);
            mPowerEndCall.setChecked(powerButtonEndsCall);
        }

@@ -732,10 +732,10 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
    }

    private void handleTogglePowerButtonEndsCallPreferenceClick() {
        CMSettings.Secure.putInt(getContentResolver(),
                CMSettings.Secure.INCALL_POWER_BUTTON_BEHAVIOR, (mPowerEndCall.isChecked()
                        ? CMSettings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP
                        : CMSettings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF));
        Settings.Secure.putInt(getContentResolver(),
                Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR, (mPowerEndCall.isChecked()
                        ? Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP
                        : Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF));
    }

    private void handleToggleHomeButtonAnswersCallPreferenceClick() {
+2 −2
Original line number Diff line number Diff line
@@ -259,8 +259,8 @@ public class PowerMenuActions extends SettingsPreferenceFragment {
    }

    private void updatePreferences() {
        boolean bugreport = CMSettings.Secure.getInt(getContentResolver(),
                CMSettings.Secure.BUGREPORT_IN_POWER_MENU, 0) != 0;
        boolean bugreport = Settings.Secure.getInt(getContentResolver(),
                Settings.Secure.BUGREPORT_IN_POWER_MENU, 0) != 0;
        boolean profiles = CMSettings.System.getInt(getContentResolver(),
                CMSettings.System.SYSTEM_PROFILES_ENABLED, 1) != 0;