Implementation of time user configuration update
This adds support for updating user-facing time detector configuration via the TimeDetectorService. Bug: 172891783 Bug: 229740080 Test: atest com.android.server.timedetector android.app.time Change-Id: I109e59e44dbe085d456fc36bcd98375d118940c0
This commit is contained in:
22
core/java/android/app/time/ITimeDetectorListener.aidl
Normal file
22
core/java/android/app/time/ITimeDetectorListener.aidl
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.app.time;
|
||||
|
||||
/** {@hide} */
|
||||
oneway interface ITimeDetectorListener {
|
||||
void onChange();
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.app.timedetector;
|
||||
|
||||
import android.app.time.ExternalTimeSuggestion;
|
||||
import android.app.time.ITimeDetectorListener;
|
||||
import android.app.time.TimeCapabilitiesAndConfig;
|
||||
import android.app.time.TimeConfiguration;
|
||||
import android.app.timedetector.GnssTimeSuggestion;
|
||||
@@ -39,6 +40,9 @@ import android.app.timedetector.TelephonyTimeSuggestion;
|
||||
*/
|
||||
interface ITimeDetectorService {
|
||||
TimeCapabilitiesAndConfig getCapabilitiesAndConfig();
|
||||
void addListener(ITimeDetectorListener listener);
|
||||
void removeListener(ITimeDetectorListener listener);
|
||||
|
||||
boolean updateConfiguration(in TimeConfiguration timeConfiguration);
|
||||
|
||||
void suggestExternalTime( in ExternalTimeSuggestion timeSuggestion);
|
||||
|
||||
Reference in New Issue
Block a user