| 1 | /* |
| 2 | * Copyright (C) 2020 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; |
| 18 | |
| 19 | /** |
| 20 | * Constants related to the LocationTimeZoneManager service that are used by shell commands and |
| 21 | * tests. |
| 22 | * |
| 23 | * @hide |
| 24 | */ |
| 25 | public final class LocationTimeZoneManager { |
| 26 | |
| 27 | /** |
| 28 | * The name of the primary location time zone provider, used for shell commands. |
| 29 | */ |
| 30 | public static final String PRIMARY_PROVIDER_NAME = "primary"; |
| 31 | |
| 32 | /** |
| 33 | * The name of the secondary location time zone provider, used for shell commands. |
| 34 | */ |
| 35 | public static final String SECONDARY_PROVIDER_NAME = "secondary"; |
| 36 | |
| 37 | /** |
| 38 | * The name of the service for shell commands |
| 39 | */ |
| 40 | public static final String SERVICE_NAME = "location_time_zone_manager"; |
| 41 | |
| 42 | /** |
| 43 | * A shell command that starts the service (after stop). |
| 44 | */ |
| 45 | public static final String SHELL_COMMAND_START = "start"; |
| 46 | |
| 47 | /** |
| 48 | * A shell command that stops the service. |
| 49 | */ |
| 50 | public static final String SHELL_COMMAND_STOP = "stop"; |
| 51 | |
| 52 | /** |
| 53 | * A shell command that clears recorded provider state information during tests. |
| 54 | */ |
| 55 | public static final String SHELL_COMMAND_CLEAR_RECORDED_PROVIDER_STATES = |
| 56 | "clear_recorded_provider_states"; |
| 57 | |
| 58 | /** |
| 59 | * A shell command that tells the service to dump its current state. |
| 60 | */ |
| 61 | public static final String SHELL_COMMAND_DUMP_STATE = "dump_state"; |
| 62 | |
| 63 | /** |
| 64 | * Option for {@link #SHELL_COMMAND_DUMP_STATE} that tells it to dump state as a binary proto. |
| 65 | */ |
| 66 | public static final String DUMP_STATE_OPTION_PROTO = "--proto"; |
| 67 | |
| 68 | /** A shell command that starts the location_time_zone_manager with named test providers. */ |
| 69 | public static final String SHELL_COMMAND_START_WITH_TEST_PROVIDERS = |
| 70 | "start_with_test_providers"; |
| 71 | |
| 72 | /** |
| 73 | * The token that can be passed to {@link #SHELL_COMMAND_START_WITH_TEST_PROVIDERS} to indicate |
| 74 | * there is no provider. |
| 75 | */ |
| 76 | public static final String NULL_PACKAGE_NAME_TOKEN = "@null"; |
| 77 | |
| 78 | private LocationTimeZoneManager() { |
| 79 | // No need to instantiate. |
| 80 | } |
| 81 | } |