1 /*
2  * Copyright (C) 2021 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 android.app.time.cts.shell;
18 
19 /** Constants for interacting with the device_config service. */
20 public final class DeviceConfigKeys {
21 
22     /**
23      * The DeviceConfig namespace used for the time_detector, time_zone_detector and
24      * location_time_zone_manager.
25      */
26     public static final String NAMESPACE_SYSTEM_TIME = "system_time";
27 
DeviceConfigKeys()28     private DeviceConfigKeys() {
29         // No need to instantiate.
30     }
31 
32     /**
33      * Keys and values associated with the location_time_zone_manager.
34      * See also {@link TimeZoneDetectorShellHelper}.
35      */
36     public final class TimeZoneDetector {
TimeZoneDetector()37         private TimeZoneDetector() {
38             // No need to instantiate.
39         }
40 
41         /**
42          * The key to alter a device's "automatic time zone detection enabled" setting default
43          * value. This flag is only intended for internal testing. It only has an effect on a
44          * device's default value and does not interfere with a user's explicit preference.
45          */
46         public static final String KEY_TIME_ZONE_DETECTOR_AUTO_DETECTION_ENABLED_DEFAULT =
47                 "time_zone_detector_auto_detection_enabled_default";
48     }
49 
50     /**
51      * Keys and values associated with the location_time_zone_manager.
52      * See also {@link LocationTimeZoneManagerShellHelper}.
53      */
54     public final class LocationTimeZoneManager {
55 
LocationTimeZoneManager()56         private LocationTimeZoneManager() {
57             // No need to instantiate.
58         }
59 
60         /** The key for the setting that controls rate limiting of provider events. */
61         public static final String KEY_LTZP_EVENT_FILTERING_AGE_THRESHOLD_MILLIS =
62                 "ltzp_event_filtering_age_threshold_millis";
63     }
64 
65     /**
66      * Keys and values associated with the time_detector. See also {@link
67      * TimeZoneDetectorShellHelper}.
68      */
69     public final class TimeDetector {
70 
TimeDetector()71         private TimeDetector() {
72             // No need to instantiate.
73         }
74 
75         /**
76          * See {@link
77          * com.android.server.timedetector.ServerFlags#KEY_TIME_DETECTOR_LOWER_BOUND_MILLIS_OVERRIDE
78          * }
79          */
80         public static final String KEY_TIME_DETECTOR_LOWER_BOUND_MILLIS_OVERRIDE =
81                 "time_detector_lower_bound_millis_override";
82 
83         /**
84          * See {@link
85          * com.android.server.timedetector.ServerFlags#KEY_TIME_DETECTOR_ORIGIN_PRIORITIES_OVERRIDE}
86          */
87         public static final String KEY_TIME_DETECTOR_ORIGIN_PRIORITIES_OVERRIDE =
88                 "time_detector_origin_priorities_override";
89 
90         /**
91          * See {@link com.android.server.timedetector.TimeDetectorStrategy#ORIGIN_NETWORK}.
92          */
93         public static final String ORIGIN_NETWORK = "network";
94 
95         /**
96          * See {@link com.android.server.timedetector.TimeDetectorStrategy#ORIGIN_EXTERNAL}.
97          */
98         public static final String ORIGIN_EXTERNAL = "external";
99     }
100 }
101