Merge "Add VISUAL_VOICEMAIL intent action for promo card access." into mnc-dev
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index d5db212..5130a83 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -358,7 +358,7 @@
/** Binds to the default or carrier config app. */
private boolean bindToConfigPackage(String pkgName, int phoneId, int eventId) {
log("Binding to " + pkgName + " for phone " + phoneId);
- Intent carrierService = new Intent(CarrierService.CONFIG_SERVICE_INTERFACE);
+ Intent carrierService = new Intent(CarrierService.CARRIER_SERVICE_INTERFACE);
carrierService.setPackage(pkgName);
mServiceConnection[phoneId] = new CarrierServiceConnection(phoneId, eventId);
try {
@@ -396,7 +396,7 @@
private String getCarrierPackageForPhoneId(int phoneId) {
List<String> carrierPackageNames = TelephonyManager.from(mContext)
.getCarrierPackageNamesForIntentAndPhone(
- new Intent(CarrierService.CONFIG_SERVICE_INTERFACE), phoneId);
+ new Intent(CarrierService.CARRIER_SERVICE_INTERFACE), phoneId);
if (carrierPackageNames != null && carrierPackageNames.size() > 0) {
return carrierPackageNames.get(0);
} else {
diff --git a/src/com/android/phone/EmergencyDialer.java b/src/com/android/phone/EmergencyDialer.java
index 71557c6..303a384 100644
--- a/src/com/android/phone/EmergencyDialer.java
+++ b/src/com/android/phone/EmergencyDialer.java
@@ -34,6 +34,7 @@
import android.telecom.PhoneAccount;
import android.telephony.CarrierConfigManager;
import android.telephony.PhoneNumberUtils;
+import android.telephony.SubscriptionManager;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
@@ -199,8 +200,10 @@
mDialButton = findViewById(R.id.floating_action_button);
+ CarrierConfigLoader configLoader = CarrierConfigLoader.init(this);
// Check whether we should show the onscreen "Dial" button and co.
- PersistableBundle carrierConfig = PhoneGlobals.getInstance().getCarrierConfig();
+ PersistableBundle carrierConfig =
+ configLoader.getConfigForSubId(SubscriptionManager.getDefaultVoiceSubId());
if (carrierConfig.getBoolean(CarrierConfigManager.KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL)) {
mDialButton.setOnClickListener(this);
} else {