summaryrefslogtreecommitdiff
path: root/core/api
diff options
context:
space:
mode:
authorAaron Huang <huangaaron@google.com>2020-10-26 17:34:50 +0800
committerAaron Huang <huangaaron@google.com>2021-03-09 06:24:50 +0000
commit3ae5bdab6eab95febb4886ca51ef260f9783d006 (patch)
treeb3743e9627ce2618eba62cce634abd75cb853b08 /core/api
parent918e60b615cded0880e168cfd808b9263592ad07 (diff)
Add a new API in BatteryStatsManager for connectivity service
Connectivity service(CS) is going to be a mainline module and currently it uses IBatteryStats to communicate with battery stats service directly. CS cannot use this way after becomes a mainline module so add new system APIs to communicate with battery stats service through BatteryStatsManger. The new API reportNetworkInterfaceForTransports requires system-only permission NETWORK_STACK or MAINLINE_NETWORK_STACK so that given the only caller was in ConnectivityService. This change only add new surface, the usage in CS will be updated in follow-up CL. Bug: 171686421 Test: builds, boot, mobile and wifi work. Change-Id: Ifbd4a9784ed7664751e69d530f8204e292fa6b39 Merged-In: Ifbd4a9784ed7664751e69d530f8204e292fa6b39
Diffstat (limited to 'core/api')
-rw-r--r--core/api/module-lib-current.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt
index 3529858a0c95..b3562e5f496d 100644
--- a/core/api/module-lib-current.txt
+++ b/core/api/module-lib-current.txt
@@ -56,6 +56,10 @@ package android.net {
package android.os {
+ public final class BatteryStatsManager {
+ method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void reportNetworkInterfaceForTransports(@NonNull String, @NonNull int[]) throws java.lang.RuntimeException;
+ }
+
public class Binder implements android.os.IBinder {
method public final void markVintfStability();
}