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

Commit 70bda67f authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Ignore 'wake display' event when AOD is off

Bug: 111405682
Test: turn off AOD, send wake-up signal
Change-Id: Iff33288ef0e5d4286b93eb3578f4f9795c593e5d
parent 53f0d06d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -16,14 +16,14 @@

package com.android.internal.hardware;

import com.android.internal.R;

import android.content.Context;
import android.os.Build;
import android.os.SystemProperties;
import android.provider.Settings;
import android.text.TextUtils;

import com.android.internal.R;

public class AmbientDisplayConfiguration {

    private final Context mContext;
@@ -37,7 +37,8 @@ public class AmbientDisplayConfiguration {
    public boolean enabled(int user) {
        return pulseOnNotificationEnabled(user)
                || pulseOnLongPressEnabled(user)
                || alwaysOnEnabled(user);
                || alwaysOnEnabled(user)
                || wakeLockScreenGestureEnabled(user);
    }

    public boolean pulseOnNotificationEnabled(int user) {
+2 −1
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ public class DozeSensors {
        mProxCallback = proxCallback;
        mResolver = mContext.getContentResolver();

        boolean alwaysOn = mConfig.alwaysOnEnabled(UserHandle.USER_CURRENT);
        mSensors = new TriggerSensor[] {
                new TriggerSensor(
                        mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION),
@@ -116,7 +117,7 @@ public class DozeSensors {
                new PluginSensor(
                        new SensorManagerPlugin.Sensor(TYPE_WAKE_DISPLAY),
                        Settings.Secure.DOZE_WAKE_SCREEN_GESTURE,
                        mConfig.wakeScreenGestureAvailable(),
                        mConfig.wakeScreenGestureAvailable() && alwaysOn,
                        DozeLog.REASON_SENSOR_WAKE_UP,
                        false /* reports touch coordinates */,
                        false /* touchscreen */),