Fix system crash when netd return error
API networkSetPermissionForNetwork return ServiceSpecificException from netd is expected. Don't crash system under this scenario. Bug: 363854848 Test: TH Change-Id: I5f2821603ff51104f38208775d7b3d60265aeeab
This commit is contained in:
parent
60cc6a145b
commit
339d6b20e7
1 changed files with 1 additions and 1 deletions
2
service/src/com/android/server/ConnectivityService.java
Executable file → Normal file
2
service/src/com/android/server/ConnectivityService.java
Executable file → Normal file
|
|
@ -5529,7 +5529,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
}
|
||||
|
||||
// Delayed teardown.
|
||||
if (nai.isCreated()) {
|
||||
if (nai.isCreated() && !nai.isDestroyed()) {
|
||||
try {
|
||||
mNetd.networkSetPermissionForNetwork(nai.network.netId, INetd.PERMISSION_SYSTEM);
|
||||
} catch (RemoteException e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue