Christoph Studer | b018399 | 2014-12-22 21:02:26 +0100 | [diff] [blame] | 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 | |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 19 | import com.android.internal.logging.nano.MetricsProto.MetricsEvent; |
| 20 | |
Christoph Studer | b018399 | 2014-12-22 21:02:26 +0100 | [diff] [blame] | 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. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 26 | private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK = 1; |
Christoph Studer | b018399 | 2014-12-22 21:02:26 +0100 | [diff] [blame] | 27 | /** The user swiped down on the lockscreen, going to the full shade. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 28 | private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_FULL_SHADE = 2; |
Christoph Studer | b018399 | 2014-12-22 21:02:26 +0100 | [diff] [blame] | 29 | /** The user tapped in an empty area, causing the unlock hint to be shown. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 30 | private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_UNLOCK_HINT = 3; |
Christoph Studer | b018399 | 2014-12-22 21:02:26 +0100 | [diff] [blame] | 31 | /** The user swiped inward on the camera icon, launching the camera. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 32 | private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_CAMERA = 4; |
Christoph Studer | b018399 | 2014-12-22 21:02:26 +0100 | [diff] [blame] | 33 | /** The user swiped inward on the dialer icon, launching the dialer. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 34 | private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DIALER = 5; |
Christoph Studer | b018399 | 2014-12-22 21:02:26 +0100 | [diff] [blame] | 35 | /** The user tapped the lock, locking the device. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 36 | private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_LOCK = 6; |
Christoph Studer | b018399 | 2014-12-22 21:02:26 +0100 | [diff] [blame] | 37 | /** The user tapped a notification, needs to tap again to launch. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 38 | private static final int SYSUI_LOCKSCREEN_GESTURE_TAP_NOTIFICATION_ACTIVATE = 7; |
Chris Wren | 49f06f5 | 2015-05-01 16:12:12 -0400 | [diff] [blame] | 39 | /** The user swiped down to open quick settings, from keyguard. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 40 | private static final int SYSUI_LOCKSCREEN_GESTURE_SWIPE_DOWN_QS = 8; |
Chris Wren | 49f06f5 | 2015-05-01 16:12:12 -0400 | [diff] [blame] | 41 | /** The user swiped down to open quick settings, from shade. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 42 | private static final int SYSUI_SHADE_GESTURE_SWIPE_DOWN_QS = 9; |
Chris Wren | 49f06f5 | 2015-05-01 16:12:12 -0400 | [diff] [blame] | 43 | /** The user tapped on the status bar to open quick settings, from shade. */ |
Chris Wren | 27a52fa | 2017-02-01 14:21:43 -0500 | [diff] [blame^] | 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 | }; |
Winson | a00a785 | 2016-02-16 11:05:28 -0800 | [diff] [blame] | 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; |
Christoph Studer | b018399 | 2014-12-22 21:02:26 +0100 | [diff] [blame] | 70 | } |