blob: def3c4072d2e06554f56aaf1edbd79ead9a25e00 [file] [log] [blame]
Christoph Studerb0183992014-12-22 21:02:26 +01001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
15 */
16
17package com.android.systemui;
18
Chris Wren27a52fa2017-02-01 14:21:43 -050019import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
20
Christoph Studerb0183992014-12-22 21:02:26 +010021/**
22 * Constants to be passed as sysui_* eventlog parameters.
23 */
24public class EventLogConstants {
25 /** The user swiped up on the lockscreen, unlocking the device. */
Chris Wren27a52fa2017-02-01 14:21:43 -050026 private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK = 1;
Christoph Studerb0183992014-12-22 21:02:26 +010027 /** The user swiped down on the lockscreen, going to the full shade. */
Chris Wren27a52fa2017-02-01 14:21:43 -050028 private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_FULL_SHADE = 2;
Christoph Studerb0183992014-12-22 21:02:26 +010029 /** The user tapped in an empty area, causing the unlock hint to be shown. */
Chris Wren27a52fa2017-02-01 14:21:43 -050030 private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_UNLOCK_HINT = 3;
Christoph Studerb0183992014-12-22 21:02:26 +010031 /** The user swiped inward on the camera icon, launching the camera. */
Chris Wren27a52fa2017-02-01 14:21:43 -050032 private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA = 4;
Christoph Studerb0183992014-12-22 21:02:26 +010033 /** The user swiped inward on the dialer icon, launching the dialer. */
Chris Wren27a52fa2017-02-01 14:21:43 -050034 private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER = 5;
Christoph Studerb0183992014-12-22 21:02:26 +010035 /** The user tapped the lock, locking the device. */
Chris Wren27a52fa2017-02-01 14:21:43 -050036 private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_LOCK = 6;
Christoph Studerb0183992014-12-22 21:02:26 +010037 /** The user tapped a notification, needs to tap again to launch. */
Chris Wren27a52fa2017-02-01 14:21:43 -050038 private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_NOTIFICATION_ACTIVATE = 7;
Chris Wren49f06f52015-05-01 16:12:12 -040039 /** The user swiped down to open quick settings, from keyguard. */
Chris Wren27a52fa2017-02-01 14:21:43 -050040 private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_QS = 8;
Chris Wren49f06f52015-05-01 16:12:12 -040041 /** The user swiped down to open quick settings, from shade. */
Chris Wren27a52fa2017-02-01 14:21:43 -050042 private static final int SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS = 9;
Chris Wren49f06f52015-05-01 16:12:12 -040043 /** The user tapped on the status bar to open quick settings, from shade. */
Chris Wren27a52fa2017-02-01 14:21:43 -050044 private static final int SYSUI_TAP_TO_OPEN_QS = 10;
45
46 public static final int[] METRICS_GESTURE_TYPE_MAP = {
47 MetricsEvent.VIEW_UNKNOWN, // there is no type 0
48 MetricsEvent.ACTION_LS_UNLOCK, // SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK
49 MetricsEvent.ACTION_LS_SHADE, // SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_FULL_SHADE
50 MetricsEvent.ACTION_LS_HINT, // SYSUI_LOCKSCREEN_GESTURE_TAP_UNLOCK_HINT
51 MetricsEvent.ACTION_LS_CAMERA, // SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA
52 MetricsEvent.ACTION_LS_DIALER, // SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER
53 MetricsEvent.ACTION_LS_LOCK, // SYSUI_LOCKSCREEN_GESTURE_TAP_LOCK
54 MetricsEvent.ACTION_LS_NOTE, // SYSUI_LOCKSCREEN_GESTURE_TAP_NOTIFICATION_ACTIVATE
55 MetricsEvent.ACTION_LS_QS, // SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_QS
56 MetricsEvent.ACTION_SHADE_QS_PULL, // SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS
57 MetricsEvent.ACTION_SHADE_QS_TAP // SYSUI_TAP_TO_OPEN_QS
58 };
Winsona00a7852016-02-16 11:05:28 -080059
60 /** Secondary user tries binding to the system sysui service */
61 public static final int SYSUI_RECENTS_CONNECTION_USER_BIND_SERVICE = 1;
62 /** Secondary user is bound to the system sysui service */
63 public static final int SYSUI_RECENTS_CONNECTION_USER_SYSTEM_BOUND = 2;
64 /** Secondary user loses connection after system sysui has died */
65 public static final int SYSUI_RECENTS_CONNECTION_USER_SYSTEM_UNBOUND = 3;
66 /** System sysui registers secondary user's callbacks */
67 public static final int SYSUI_RECENTS_CONNECTION_SYSTEM_REGISTER_USER = 4;
68 /** System sysui unregisters secondary user's callbacks (after death) */
69 public static final int SYSUI_RECENTS_CONNECTION_SYSTEM_UNREGISTER_USER = 5;
Christoph Studerb0183992014-12-22 21:02:26 +010070}