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

Commit 804322ee authored by Geoffrey Pitsch's avatar Geoffrey Pitsch Committed by android-build-merger
Browse files

Merge "canBeModified accessors for AmbientDisplay pickup setting" into oc-dr1-dev

am: 7c9a6b50

Change-Id: I40ced751c59fbc10d0a23a3e06fe66cc59eafd17
parents 7776b49c 7c9a6b50
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -53,8 +53,8 @@ public class AmbientDisplayConfiguration {
    }

    public boolean pulseOnPickupEnabled(int user) {
        return boolSettingDefaultOn(Settings.Secure.DOZE_PULSE_ON_PICK_UP, user)
                && pulseOnPickupAvailable();
        boolean settingEnabled = boolSettingDefaultOn(Settings.Secure.DOZE_PULSE_ON_PICK_UP, user);
        return (settingEnabled || alwaysOnEnabled(user)) && pulseOnPickupAvailable();
    }

    public boolean pulseOnPickupAvailable() {
@@ -62,6 +62,10 @@ public class AmbientDisplayConfiguration {
                && ambientDisplayAvailable();
    }

    public boolean pulseOnPickupCanBeModified(int user) {
        return !alwaysOnEnabled(user);
    }

    public boolean pulseOnDoubleTapEnabled(int user) {
        return boolSettingDefaultOn(Settings.Secure.DOZE_PULSE_ON_DOUBLE_TAP, user)
                && pulseOnDoubleTapAvailable();