Migrate ACTION_AMBIENT_GESTURE from TRON to WW.
Bug: 147508315 Test: manual (lunch coral-userdebug && make -j100) Change-Id: I3ee78e52a93c94e8e8746eea83890de889cb452b
This commit is contained in:
@@ -41,6 +41,9 @@ import android.util.Log;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.UiEvent;
|
||||
import com.android.internal.logging.UiEventLogger;
|
||||
import com.android.internal.logging.UiEventLoggerImpl;
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.systemui.plugins.SensorManagerPlugin;
|
||||
import com.android.systemui.statusbar.phone.DozeParameters;
|
||||
@@ -56,8 +59,8 @@ import java.util.function.Consumer;
|
||||
public class DozeSensors {
|
||||
|
||||
private static final boolean DEBUG = DozeService.DEBUG;
|
||||
|
||||
private static final String TAG = "DozeSensors";
|
||||
private static final UiEventLogger UI_EVENT_LOGGER = new UiEventLoggerImpl();
|
||||
|
||||
private final Context mContext;
|
||||
private final AlarmManager mAlarmManager;
|
||||
@@ -79,6 +82,23 @@ public class DozeSensors {
|
||||
private boolean mListening;
|
||||
private boolean mPaused;
|
||||
|
||||
@VisibleForTesting
|
||||
public enum DozeSensorsUiEvent implements UiEventLogger.UiEventEnum {
|
||||
@UiEvent(doc = "User performs pickup gesture that activates the ambient display")
|
||||
ACTION_AMBIENT_GESTURE_PICKUP(459);
|
||||
|
||||
private final int mId;
|
||||
|
||||
DozeSensorsUiEvent(int id) {
|
||||
mId = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return mId;
|
||||
}
|
||||
}
|
||||
|
||||
public DozeSensors(Context context, AlarmManager alarmManager, AsyncSensorManager sensorManager,
|
||||
DozeParameters dozeParameters, AmbientDisplayConfiguration config, WakeLock wakeLock,
|
||||
Callback callback, Consumer<Boolean> proxCallback, DozeLog dozeLog) {
|
||||
@@ -416,6 +436,7 @@ public class DozeSensors {
|
||||
MetricsLogger.action(
|
||||
mContext, MetricsProto.MetricsEvent.ACTION_AMBIENT_GESTURE,
|
||||
subType);
|
||||
UI_EVENT_LOGGER.log(DozeSensorsUiEvent.ACTION_AMBIENT_GESTURE_PICKUP);
|
||||
}
|
||||
|
||||
mRegistered = false;
|
||||
|
||||
Reference in New Issue
Block a user