Allow non-primary users to configure calling accounts
PhoneAccountSettingsFragment is now open to non-primary user.
Hardcoding component of pstn conecntion service to avoid accessing
PhoneGlobal in non-primary user.
Change-Id: I05632fdf61fa6a579ca260e04a74ae370b4de51f
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index 1fa886c..a3b4cfb 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -145,6 +145,10 @@
private static AlertDialog sUssdDialog = null;
private static StringBuilder sUssdMsg = new StringBuilder();
+ private static final ComponentName PSTN_CONNECTION_SERVICE_COMPONENT =
+ new ComponentName("com.android.phone",
+ "com.android.services.telephony.TelephonyConnectionService");
+
/**
* Handler that tracks the connections and updates the value of the
* Mute settings for each connection as needed.
@@ -2511,7 +2515,7 @@
}
private static ComponentName getPstnConnectionServiceName() {
- return new ComponentName(PhoneGlobals.getInstance(), TelephonyConnectionService.class);
+ return PSTN_CONNECTION_SERVICE_COMPONENT;
}
private static Phone getPhoneFromIccId(String iccId) {