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 17syntax = "proto2"; 18package android.app.time; 19 20import "frameworks/base/core/proto/android/app/time_zone_detector.proto"; 21import "frameworks/base/core/proto/android/privacy.proto"; 22 23option java_multiple_files = true; 24option java_outer_classname = "LocationTimeZoneManagerProto"; 25 26// A state enum that matches states for LocationTimeZoneProviderController. See that class for 27// details. 28enum ControllerStateEnum { 29 CONTROLLER_STATE_UNKNOWN = 0; 30 CONTROLLER_STATE_PROVIDERS_INITIALIZING = 1; 31 CONTROLLER_STATE_STOPPED = 2; 32 CONTROLLER_STATE_INITIALIZING = 3; 33 CONTROLLER_STATE_UNCERTAIN = 4; 34 CONTROLLER_STATE_CERTAIN = 5; 35 CONTROLLER_STATE_FAILED = 6; 36 CONTROLLER_STATE_DESTROYED = 7; 37} 38 39// Represents the state of the LocationTimeZoneManagerService for use in tests. 40message LocationTimeZoneManagerServiceStateProto { 41 option (android.msg_privacy).dest = DEST_AUTOMATIC; 42 43 optional LocationTimeZoneProviderEventProto last_event = 1; 44 repeated TimeZoneProviderStateProto primary_provider_states = 2; 45 repeated TimeZoneProviderStateProto secondary_provider_states = 3; 46 repeated ControllerStateEnum controller_states = 4; 47} 48 49// The state tracked for a LocationTimeZoneProvider. 50message TimeZoneProviderStateProto { 51 option (android.msg_privacy).dest = DEST_AUTOMATIC; 52 53 optional TimeZoneProviderStateEnum state = 1; 54} 55 56// The state enum for LocationTimeZoneProviders. 57enum TimeZoneProviderStateEnum { 58 TIME_ZONE_PROVIDER_STATE_UNKNOWN = 0; 59 TIME_ZONE_PROVIDER_STATE_INITIALIZING = 1; 60 TIME_ZONE_PROVIDER_STATE_CERTAIN = 2; 61 TIME_ZONE_PROVIDER_STATE_UNCERTAIN = 3; 62 TIME_ZONE_PROVIDER_STATE_DISABLED = 4; 63 TIME_ZONE_PROVIDER_STATE_PERM_FAILED = 5; 64 TIME_ZONE_PROVIDER_STATE_DESTROYED = 6; 65} 66