resolve merge conflicts of 451501cc4 to stage-aosp-master
am: 7f829e5aa2
Change-Id: I025fcc47878a65787821c1772807a14bacb508fa
diff --git a/res/values/config.xml b/res/values/config.xml
index 2ec3388..ce3f8a2 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -221,4 +221,7 @@
<!-- Whether the cellular radio is allowed to be power down when the Bluetooth can provide the data/call capabilities -->
<bool name="config_allowRadioPowerDownOnBluetooth">false</bool>
+
+ <!-- The package name for the platform carrier config app, bundled with system image. -->
+ <string name="platform_carrier_config_package" translatable="false">com.android.carrierconfig</string>
</resources>
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index df1ab1f..5bbf35b 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -83,8 +83,9 @@
public class CarrierConfigLoader extends ICarrierConfigLoader.Stub {
private static final String LOG_TAG = "CarrierConfigLoader";
- // Package name for default carrier config app, bundled with system image.
- private static final String DEFAULT_CARRIER_CONFIG_PACKAGE = "com.android.carrierconfig";
+
+ // Package name for platform carrier config app, bundled with system image.
+ private final String mPlatformCarrierConfigPackage;
/** The singleton instance. */
private static CarrierConfigLoader sInstance;
@@ -196,16 +197,16 @@
case EVENT_FETCH_DEFAULT:
iccid = getIccIdForPhoneId(phoneId);
- config = restoreConfigFromXml(DEFAULT_CARRIER_CONFIG_PACKAGE, iccid);
+ config = restoreConfigFromXml(mPlatformCarrierConfigPackage, iccid);
if (config != null) {
- log("Loaded config from XML. package=" + DEFAULT_CARRIER_CONFIG_PACKAGE
+ log("Loaded config from XML. package=" + mPlatformCarrierConfigPackage
+ " phoneId=" + phoneId);
mConfigFromDefaultApp[phoneId] = config;
Message newMsg = obtainMessage(EVENT_LOADED_FROM_DEFAULT, phoneId, -1);
newMsg.getData().putBoolean("loaded_from_xml", true);
mHandler.sendMessage(newMsg);
} else {
- if (bindToConfigPackage(DEFAULT_CARRIER_CONFIG_PACKAGE,
+ if (bindToConfigPackage(mPlatformCarrierConfigPackage,
phoneId, EVENT_CONNECTED_TO_DEFAULT)) {
sendMessageDelayed(obtainMessage(EVENT_BIND_DEFAULT_TIMEOUT, phoneId, -1),
BIND_TIMEOUT_MILLIS);
@@ -230,7 +231,7 @@
.asInterface(conn.service);
config = carrierService.getCarrierConfig(carrierId);
iccid = getIccIdForPhoneId(phoneId);
- saveConfigToXml(DEFAULT_CARRIER_CONFIG_PACKAGE, iccid, config);
+ saveConfigToXml(mPlatformCarrierConfigPackage, iccid, config);
mConfigFromDefaultApp[phoneId] = config;
sendMessage(obtainMessage(EVENT_LOADED_FROM_DEFAULT, phoneId, -1));
} catch (Exception ex) {
@@ -349,6 +350,8 @@
*/
private CarrierConfigLoader(Context context) {
mContext = context;
+ mPlatformCarrierConfigPackage =
+ mContext.getString(R.string.platform_carrier_config_package);
IntentFilter bootFilter = new IntentFilter();
bootFilter.addAction(Intent.ACTION_BOOT_COMPLETED);