Merge "Ignore 'wake display' event when AOD is off"
This commit is contained in:
committed by
Android (Google) Code Review
commit
25edac0f17
@@ -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) {
|
||||
|
||||
@@ -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 */),
|
||||
|
||||
Reference in New Issue
Block a user