Always have an AutomaticOnOffKeepalive to manage a KI
Test: FrameworksNetTests 'CtsNetTestCases' CtsHostsideNetworkTests Change-Id: Ic216b525d8297fce0f390daae327e667a14b7775
This commit is contained in:
committed by
chiachangwang
parent
210f3b234e
commit
23f1bfd471
@@ -2287,6 +2287,13 @@ public class ConnectivityManager {
|
||||
mExecutor.execute(() -> {
|
||||
try {
|
||||
if (mSlot != null) {
|
||||
// TODO : this is incorrect, because in the presence of auto on/off
|
||||
// keepalive the slot associated with this keepalive can have
|
||||
// changed. Also, this actually causes another problem where some other
|
||||
// app might stop your keepalive if it just knows the network and
|
||||
// the slot and goes through the trouble of grabbing the aidl object.
|
||||
// This code should use the callback to identify what keepalive to
|
||||
// stop instead.
|
||||
mService.stopKeepalive(mNetwork, mSlot);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
|
||||
Reference in New Issue
Block a user