Catch generic exception to avoid crash.
Some exception can cross binder interface and only catch remoteexception is not enough.
Bug: b/26016518
Change-Id: I442fce72812c41f36479c3488765418604824103
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index 09f12ff..09e6683 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -219,7 +219,8 @@
saveConfigToXml(DEFAULT_CARRIER_CONFIG_PACKAGE, iccid, config);
mConfigFromDefaultApp[phoneId] = config;
sendMessage(obtainMessage(EVENT_LOADED_FROM_DEFAULT, phoneId, -1));
- } catch (RemoteException ex) {
+ } catch (Exception ex) {
+ // The bound app could throw exceptions that binder will pass to us.
loge("Failed to get carrier config: " + ex.toString());
} finally {
mContext.unbindService(mServiceConnection[phoneId]);
@@ -290,7 +291,8 @@
saveConfigToXml(carrierPackageName, iccid, config);
mConfigFromCarrierApp[phoneId] = config;
sendMessage(obtainMessage(EVENT_LOADED_FROM_CARRIER, phoneId, -1));
- } catch (RemoteException ex) {
+ } catch (Exception ex) {
+ // The bound app could throw exceptions that binder will pass to us.
loge("Failed to get carrier config: " + ex.toString());
} finally {
mContext.unbindService(mServiceConnection[phoneId]);