• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 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.server.notification;
18 
19 import android.service.notification.ZenModeConfig;
20 
21 /** Enum version of {@link ZenModeConfig.ConfigOrigin}, for test parameterization. */
22 public enum ZenChangeOrigin {
23     ORIGIN_UNKNOWN(ZenModeConfig.ORIGIN_UNKNOWN),
24     ORIGIN_INIT(ZenModeConfig.ORIGIN_INIT),
25     ORIGIN_INIT_USER(ZenModeConfig.ORIGIN_INIT_USER),
26     ORIGIN_APP(ZenModeConfig.ORIGIN_APP),
27     ORIGIN_USER_IN_APP(ZenModeConfig.ORIGIN_USER_IN_APP),
28     ORIGIN_SYSTEM(ZenModeConfig.ORIGIN_SYSTEM),
29     ORIGIN_USER_IN_SYSTEMUI(ZenModeConfig.ORIGIN_USER_IN_SYSTEMUI),
30     ORIGIN_RESTORE_BACKUP(ZenModeConfig.ORIGIN_RESTORE_BACKUP);
31 
32     private final int mValue;
33 
ZenChangeOrigin(@enModeConfig.ConfigOrigin int value)34     ZenChangeOrigin(@ZenModeConfig.ConfigOrigin int value) {
35         mValue = value;
36     }
37 
38     /** Gets the {@link ZenModeConfig.ConfigOrigin} int value corresponding to the enum. */
39     @ZenModeConfig.ConfigOrigin
value()40     public int value() {
41         return mValue;
42     }
43 }
44