Add ServiceSpecificException to avoid system crash
- Netd's statusFromErrcode is return the ServiceSpecificException.
In S, the exception was ignored by NetworkManagementService.
But in T, the service is deprecated and netd binder call is used.
The exception is not handled and crashing the system.
In this case, NetworkStats is crashed and android system crashed also.
Change-Id: If906346fc3fccaec850e9d5cad166d7f29e4ca8e
diff --git a/service-t/src/com/android/server/net/NetworkStatsService.java b/service-t/src/com/android/server/net/NetworkStatsService.java
index b08879e..bad3567 100644
--- a/service-t/src/com/android/server/net/NetworkStatsService.java
+++ b/service-t/src/com/android/server/net/NetworkStatsService.java
@@ -1293,7 +1293,7 @@
mNetd.bandwidthSetGlobalAlert(mGlobalAlertBytes);
} catch (IllegalStateException e) {
Log.w(TAG, "problem registering for global alert: " + e);
- } catch (RemoteException e) {
+ } catch (RemoteException | ServiceSpecificException e) {
// ignored; service lives in system_server
}
invokeForAllStatsProviderCallbacks((cb) -> cb.mProvider.onSetAlert(mGlobalAlertBytes));