Merge "Use NetworkCallback in BatteryStatsService to get connectivity change" am: 74850ac20e am: 3c79f13642

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574864

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ide9ccdb7a50e3d674cb85dfffa014c89ee52db3e
This commit is contained in:
Aaron Huang
2021-03-05 08:23:08 +00:00
committed by Automerger Merge Worker

View File

@@ -2406,13 +2406,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
final BroadcastOptions opts = BroadcastOptions.makeBasic();
opts.setMaxManifestReceiverApiLevel(Build.VERSION_CODES.M);
options = opts.toBundle();
final IBatteryStats bs = mDeps.getBatteryStatsService();
try {
bs.noteConnectivityChanged(intent.getIntExtra(
ConnectivityManager.EXTRA_NETWORK_TYPE, ConnectivityManager.TYPE_NONE),
ni.getState().toString());
} catch (RemoteException e) {
}
intent.addFlags(Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS);
}
try {