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

Commit ce83c81b authored by Adrian Roos's avatar Adrian Roos Committed by Android (Google) Code Review
Browse files

Merge "AOD: Remove wake up fully config flag" into oc-dev

parents 6b7c0e9d 60a77397
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1861,10 +1861,6 @@
        not appear on production builds ever. -->
    <string name="tuner_doze" translatable="false">Ambient Display</string>

    <!-- Ambient display, Sensors wake up device of the tuner. Non-translatable since it should
        not appear on production builds ever. -->
    <string name="tuner_doze_sensors_wake_up_fully" translatable="false">Wake up device on double tap or lift</string>

    <!-- Ambient display always-on of the tuner. Non-translatable since it should
        not appear on production builds ever. -->
    <string name="tuner_doze_always_on" translatable="false">Always on</string>
+0 −5
Original line number Diff line number Diff line
@@ -142,11 +142,6 @@
          android:title="@string/tuner_doze_always_on"
          sysui:defValue="false" />

        <com.android.systemui.tuner.TunerSwitch
          android:key="doze_sensors_wake_up_fully"
          android:title="@string/tuner_doze_sensors_wake_up_fully"
          sysui:defValue="false" />

    </PreferenceScreen>

    <Preference
+1 −5
Original line number Diff line number Diff line
@@ -99,11 +99,7 @@ public class DozeTriggers implements DozeMachine.Part {
    }

    private void onSensor(int pulseReason, boolean sensorPerformedProxCheck) {
        if (mDozeParameters.getSensorsWakeUpFully()) {
            mMachine.wakeUp();
        } else {
        requestPulse(pulseReason, sensorPerformedProxCheck);
        }

        if (pulseReason == DozeLog.PULSE_REASON_SENSOR_PICKUP) {
            final long timeSinceNotification =
+0 −9
Original line number Diff line number Diff line
@@ -59,9 +59,6 @@ public class DozeParameters {
        pw.print("    getPickupVibrationThreshold(): "); pw.println(getPickupVibrationThreshold());
        pw.print("    getPickupSubtypePerformsProxCheck(): ");pw.println(
                dumpPickupSubtypePerformsProxCheck());
        if (mAmbientDisplayConfiguration.alwaysOnAvailable()) {
            pw.print("    getSensorsWakeUpFully(): "); pw.println(getSensorsWakeUpFully());
        }
    }

    private String dumpPickupSubtypePerformsProxCheck() {
@@ -122,12 +119,6 @@ public class DozeParameters {
        return mAmbientDisplayConfiguration.alwaysOnEnabled(UserHandle.USER_CURRENT);
    }

    public boolean getSensorsWakeUpFully() {
        return mAmbientDisplayConfiguration.alwaysOnAvailable()
                && Settings.Secure.getIntForUser(mContext.getContentResolver(),
                DOZE_SENSORS_WAKE_UP_FULLY, 0, UserHandle.USER_CURRENT) != 0;
    }

    private boolean getBoolean(String propName, int resId) {
        return SystemProperties.getBoolean(propName, mContext.getResources().getBoolean(resId));
    }
+0 −1
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ public class DozeConfigurationUtil {
        DozeParameters params = mock(DozeParameters.class, noDefaultAnswer(doneHolder));

        when(params.getPulseOnSigMotion()).thenReturn(false);
        when(params.getSensorsWakeUpFully()).thenReturn(false);
        when(params.getPickupVibrationThreshold()).thenReturn(0);
        when(params.getProxCheckBeforePulse()).thenReturn(true);
        when(params.getPickupSubtypePerformsProxCheck(anyInt())).thenReturn(true);