Check default phone made instead of user for access
Fix: 357766332
Test: manual launch
Test: data browsing + voice call
Flag: EXEMPT bugfix
Change-Id: Ibfae10376b8eaafbc6b8d59b2c0dede15ae2a5fe
diff --git a/src/com/android/phone/settings/RadioInfo.java b/src/com/android/phone/settings/RadioInfo.java
index 9d8f070..6be15f3 100644
--- a/src/com/android/phone/settings/RadioInfo.java
+++ b/src/com/android/phone/settings/RadioInfo.java
@@ -206,7 +206,7 @@
ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA,
ServiceState.RIL_RADIO_TECHNOLOGY_NR
};
- private static String[] sPhoneIndexLabels;
+ private static String[] sPhoneIndexLabels = new String[0];
private static final int sCellInfoListRateDisabled = Integer.MAX_VALUE;
private static final int sCellInfoListRateMax = 0;
@@ -547,8 +547,10 @@
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
- if (!android.os.Process.myUserHandle().isSystem()) {
- Log.e(TAG, "Not run from system user, don't do anything.");
+ try {
+ PhoneFactory.getDefaultPhone();
+ } catch (Exception e) {
+ loge("Do nothing due to getDefaultPhone " + e);
finish();
return;
}