• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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.power;
18 
19 import com.android.internal.logging.UiEvent;
20 import com.android.internal.logging.UiEventLogger;
21 
22 /**
23  * Events related to the battery warning.
24  */
25 public class BatteryWarningEvents {
26 
27     /** Enums for logging low battery warning notification and dialog */
28     public enum LowBatteryWarningEvent implements UiEventLogger.UiEventEnum {
29         @UiEvent(doc = "Low battery warning notification displayed")
30         LOW_BATTERY_NOTIFICATION(1048),
31 
32         @UiEvent(doc = "Low battery warning notification positive button clicked")
33         LOW_BATTERY_NOTIFICATION_TURN_ON(1049),
34 
35         @UiEvent(doc = "Low battery warning notification negative button clicked")
36         LOW_BATTERY_NOTIFICATION_CANCEL(1050),
37 
38         @UiEvent(doc = "Low battery warning notification content clicked")
39         LOW_BATTERY_NOTIFICATION_SETTINGS(1051),
40 
41         @UiEvent(doc = "Battery saver confirm dialog displayed")
42         SAVER_CONFIRM_DIALOG(1052),
43 
44         @UiEvent(doc = "Battery saver confirm dialog positive button clicked")
45         SAVER_CONFIRM_OK(1053),
46 
47         @UiEvent(doc = "Battery saver confirm dialog negative button clicked")
48         SAVER_CONFIRM_CANCEL(1054),
49 
50         @UiEvent(doc = "Battery saver confirm dialog dismissed")
51         SAVER_CONFIRM_DISMISS(1055);
52 
53         private final int mId;
54 
LowBatteryWarningEvent(int id)55         LowBatteryWarningEvent(int id) {
56             mId = id;
57         }
58 
59         @Override
getId()60         public int getId() {
61             return mId;
62         }
63     }
64 }
65