From 4ef8ec3a21da69091200aeebff80dbcde336709c Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Fri, 25 Sep 2009 11:33:24 -0700 Subject: [PATCH] Fix generic build boot sequence. The TelephonyRegistry service crashed badly in the generic build, because there is no system property to tell if the phone is GSM or CDMA. Adding a simple null check solves the issue and allows the system to boot properly. --- services/java/com/android/server/TelephonyRegistry.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java index 170a9f82a05b9..aacae1802bcd5 100644 --- a/services/java/com/android/server/TelephonyRegistry.java +++ b/services/java/com/android/server/TelephonyRegistry.java @@ -109,7 +109,13 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { // handler before they get to app code. TelephonyRegistry(Context context) { - CellLocation.getEmpty().fillInNotifierBundle(mCellLocation); + CellLocation location = CellLocation.getEmpty(); + + // Note that location can be null for non-phone builds like + // like the generic one. + if (location != null) { + location.fillInNotifierBundle(mCellLocation); + } mContext = context; mBatteryStats = BatteryStatsService.getService(); }