1 /*
2  * Copyright (C) 2019 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.timezonedetector;
18 
19 import android.app.time.ITimeZoneDetectorListener;
20 import android.app.time.TimeZoneCapabilitiesAndConfig;
21 import android.app.time.TimeZoneConfiguration;
22 import android.app.time.TimeZoneState;
23 import android.app.timezonedetector.ManualTimeZoneSuggestion;
24 import android.app.timezonedetector.TelephonyTimeZoneSuggestion;
25 
26 /**
27  * Binder APIs to communicate with time zone detector service.
28  *
29  * <p>Used to provide information to the Time Zone Detector Service from other parts of the Android
30  * system that have access to time zone-related signals, e.g. telephony. Over time, System APIs have
31  * been added to support unbundled parts of the platform, e.g. SetUp Wizard.
32  *
33  * <p>Use the {@link android.app.timezonedetector.TimeZoneDetector} (internal API) and
34  * {@link android.app.time.TimeManager} (system API) classes rather than going through
35  * this Binder interface directly. See {@link android.app.timezonedetector.TimeZoneDetectorService}
36  * for more complete documentation.
37  *
38  * {@hide}
39  */
40 interface ITimeZoneDetectorService {
getCapabilitiesAndConfig()41   TimeZoneCapabilitiesAndConfig getCapabilitiesAndConfig();
addListener(ITimeZoneDetectorListener listener)42   void addListener(ITimeZoneDetectorListener listener);
removeListener(ITimeZoneDetectorListener listener)43   void removeListener(ITimeZoneDetectorListener listener);
44 
updateConfiguration(in TimeZoneConfiguration configuration)45   boolean updateConfiguration(in TimeZoneConfiguration configuration);
46 
getTimeZoneState()47   TimeZoneState getTimeZoneState();
confirmTimeZone(in String timeZoneId)48   boolean confirmTimeZone(in String timeZoneId);
setManualTimeZone(in ManualTimeZoneSuggestion timeZoneSuggestion)49   boolean setManualTimeZone(in ManualTimeZoneSuggestion timeZoneSuggestion);
50 
suggestManualTimeZone(in ManualTimeZoneSuggestion timeZoneSuggestion)51   boolean suggestManualTimeZone(in ManualTimeZoneSuggestion timeZoneSuggestion);
suggestTelephonyTimeZone(in TelephonyTimeZoneSuggestion timeZoneSuggestion)52   void suggestTelephonyTimeZone(in TelephonyTimeZoneSuggestion timeZoneSuggestion);
53 }
54