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:
Neil Fuller
2022-05-26 17:58:14 +01:00
parent 8247153b48
commit 7573cc80a6
6 changed files with 301 additions and 23 deletions

View 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();
}

View File

@@ -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);