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

Commit 02fb6137 authored by Danesh M's avatar Danesh M Committed by Gerrit Code Review
Browse files

Settings : Make proximity opt-in

Change-Id: Idfa64758a3c6d60ca4801f6f7f34f0429f95cbec
parent 00c84ea8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@
                android:key="proximity_on_wake"
                android:title="@string/proximity_wake_title"
                android:summary="@string/proximity_wake_summary"
                android:defaultValue="false" />
                android:defaultValue="true" />

            <CheckBoxPreference
                android:key="wake_when_plugged_or_unplugged"
+5 −1
Original line number Diff line number Diff line
@@ -216,7 +216,11 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
        if (!isTapToWakeSupported()) {
            advancedPrefs.removePreference(mTapToWake);
            mTapToWake = null;
        } else {
        }

        boolean proximityCheckOnWait = res.getBoolean(
                com.android.internal.R.bool.config_proximityCheckOnWake);
        if (!proximityCheckOnWait) {
            advancedPrefs.removePreference(findPreference(KEY_PROXIMITY_WAKE));
            Settings.System.putInt(getContentResolver(), Settings.System.PROXIMITY_ON_WAKE, 1);
        }