Fix crash that occurs on devices that does not have telephony features.
If the device does not have telephony features, internal modules should not create or initialize.
Bug: 323431082
Test: verify cf_x86_64_auto-trunk_staging-userdebug,
tangorpro-trunk_staging-userdebug on boot time.
Test: manual test with tangor
wifi on/off, bluetooth on/off, capture image, video
Change-Id: Ie079f1f7005efc23132bba95337d65d7f07b8452
diff --git a/src/com/android/phone/PhoneApp.java b/src/com/android/phone/PhoneApp.java
index df151bf..bb663dc 100644
--- a/src/com/android/phone/PhoneApp.java
+++ b/src/com/android/phone/PhoneApp.java
@@ -38,7 +38,11 @@
mPhoneGlobals = new PhoneGlobals(this);
mPhoneGlobals.onCreate();
- TelecomAccountRegistry.getInstance(this).setupOnBoot();
+ TelecomAccountRegistry telecomAccountRegistry =
+ TelecomAccountRegistry.getInstance(this);
+ if (telecomAccountRegistry != null) {
+ telecomAccountRegistry.setupOnBoot();
+ }
}
}
}