Merge "Update Permission only if the network is created"
This commit is contained in:
@@ -3938,10 +3938,12 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delayed teardown.
|
// Delayed teardown.
|
||||||
try {
|
if (nai.created) {
|
||||||
mNetd.networkSetPermissionForNetwork(nai.network.netId, INetd.PERMISSION_SYSTEM);
|
try {
|
||||||
} catch (RemoteException e) {
|
mNetd.networkSetPermissionForNetwork(nai.network.netId, INetd.PERMISSION_SYSTEM);
|
||||||
Log.d(TAG, "Error marking network restricted during teardown: ", e);
|
} catch (RemoteException e) {
|
||||||
|
Log.d(TAG, "Error marking network restricted during teardown: ", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mHandler.postDelayed(() -> destroyNetwork(nai), nai.teardownDelayMs);
|
mHandler.postDelayed(() -> destroyNetwork(nai), nai.teardownDelayMs);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user