aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2014-01-14 17:17:38 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2014-01-14 17:17:38 +0000
commit69941ec5085d0e5f1e51b9106e9dc3fed04df71b (patch)
treea23d2e5a0fdb0e0394f8a8685cee9e690361908b
parent39d4b1d387c16723b96ccb058369dbc869a6cc59 (diff)
downloadandroid_frameworks_opt_telephony-69941ec5085d0e5f1e51b9106e9dc3fed04df71b.tar.gz
android_frameworks_opt_telephony-69941ec5085d0e5f1e51b9106e9dc3fed04df71b.tar.bz2
android_frameworks_opt_telephony-69941ec5085d0e5f1e51b9106e9dc3fed04df71b.zip
PhoneFactory: Block radio init if the device's custom class can't be used
Trap the initialization process in a 10 second error loop. The device will be normally usable, and have a dead radio. The radio log buffer will have the full stack dump explaining what went wrong during the custom class instantiation Change-Id: Id47d51737a9fb78e6d43a179ba304b1ba03c4219
-rw-r--r--src/java/com/android/internal/telephony/PhoneFactory.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/java/com/android/internal/telephony/PhoneFactory.java b/src/java/com/android/internal/telephony/PhoneFactory.java
index ab28ff2a4..f46f82835 100644
--- a/src/java/com/android/internal/telephony/PhoneFactory.java
+++ b/src/java/com/android/internal/telephony/PhoneFactory.java
@@ -127,8 +127,12 @@ public class PhoneFactory {
} catch (Exception e) {
// 6 different types of exceptions are thrown here that it's
// easier to just catch Exception as our "error handling" is the same.
- Rlog.e(LOG_TAG, "Unable to construct custom RIL class", e);
- sCommandsInterface = new RIL(context, networkMode, cdmaSubscription);
+ // Yes, we're blocking the whole thing and making the radio unusable. That's by design.
+ // The log message should make it clear why the radio is broken
+ while (true) {
+ Rlog.e(LOG_TAG, "Unable to construct custom RIL class", e);
+ try {Thread.sleep(10000);} catch (InterruptedException ie) {}
+ }
}
// Instantiate UiccController so that all other classes can just call getInstance()