• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
17 package com.android.systemui;
18 
19 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
20 
21 /**
22  * Constants to be passed as sysui_* eventlog parameters.
23  */
24 public class EventLogConstants {
25     /** The user swiped up on the lockscreen, unlocking the device. */
26     private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK = 1;
27     /** The user swiped down on the lockscreen, going to the full shade. */
28     private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_FULL_SHADE = 2;
29     /** The user tapped in an empty area, causing the unlock hint to be shown. */
30     private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_UNLOCK_HINT = 3;
31     /** The user swiped inward on the camera icon, launching the camera. */
32     private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA = 4;
33     /** The user swiped inward on the dialer icon, launching the dialer. */
34     private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER = 5;
35     /** The user tapped the lock, locking the device. */
36     private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_LOCK = 6;
37     /** The user tapped a notification, needs to tap again to launch. */
38     private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_NOTIFICATION_ACTIVATE = 7;
39     /** The user swiped down to open quick settings, from keyguard. */
40     private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_QS = 8;
41     /** The user swiped down to open quick settings, from shade. */
42     private static final int SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS = 9;
43     /** The user tapped on the status bar to open quick settings, from shade. */
44     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     };
59 
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;
70 }
71