Merge "Catch generic exception to avoid crash." into nyc-dev
am: 0ac7ec1
* commit '0ac7ec193e7a0a1750be0ac07ed31bfcaf4bb00a':
Catch generic exception to avoid crash.
Change-Id: I7490d3a3b835430eb2eda9aa2b0b850c331b491d
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index 9497777..df1a127 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -229,7 +229,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]);
@@ -300,7 +301,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]);