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

Commit 6e2fad23 authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Allow pickupGestureEnabled default configurable" into tm-qpr-dev am: fb952d5f

parents a4d1bed6 fb952d5f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ public class AmbientDisplayConfiguration {
    private static final String TAG = "AmbientDisplayConfig";
    private final Context mContext;
    private final boolean mAlwaysOnByDefault;
    private final boolean mPickupGestureEnabledByDefault;

    /** Copied from android.provider.Settings.Secure since these keys are hidden. */
    private static final String[] DOZE_SETTINGS = {
@@ -65,6 +66,8 @@ public class AmbientDisplayConfiguration {
    public AmbientDisplayConfiguration(Context context) {
        mContext = context;
        mAlwaysOnByDefault = mContext.getResources().getBoolean(R.bool.config_dozeAlwaysOnEnabled);
        mPickupGestureEnabledByDefault =
                mContext.getResources().getBoolean(R.bool.config_dozePickupGestureEnabled);
    }

    /** @hide */
@@ -95,7 +98,8 @@ public class AmbientDisplayConfiguration {

    /** @hide */
    public boolean pickupGestureEnabled(int user) {
        return boolSettingDefaultOn(Settings.Secure.DOZE_PICK_UP_GESTURE, user)
        return boolSetting(Settings.Secure.DOZE_PICK_UP_GESTURE, user,
                mPickupGestureEnabledByDefault ? 1 : 0)
                && dozePickupSensorAvailable();
    }

+4 −0
Original line number Diff line number Diff line
@@ -2484,6 +2484,10 @@
         states. -->
    <bool name="config_dozeAlwaysOnDisplayAvailable">false</bool>

    <!-- Control whether the pickup gesture is enabled by default. This value will be used
     during initialization when the setting is still null. -->
    <bool name="config_dozePickupGestureEnabled">true</bool>

    <!-- Control whether the always on display mode is enabled by default. This value will be used
         during initialization when the setting is still null. -->
    <bool name="config_dozeAlwaysOnEnabled">true</bool>
+1 −0
Original line number Diff line number Diff line
@@ -3804,6 +3804,7 @@
  <java-symbol type="string" name="config_cameraShutterSound" />
  <java-symbol type="integer" name="config_autoGroupAtCount" />
  <java-symbol type="bool" name="config_dozeAlwaysOnDisplayAvailable" />
  <java-symbol type="bool" name="config_dozePickupGestureEnabled" />
  <java-symbol type="bool" name="config_dozeAlwaysOnEnabled" />
  <java-symbol type="bool" name="config_dozeSupportsAodWallpaper" />
  <java-symbol type="bool" name="config_displayBlanksAfterDoze" />