Merge "radioInfo use interal API to get physicalConfig"
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index 288b9b0..d451ccf 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -110,7 +110,7 @@
private final BroadcastReceiver mBootReceiver = new ConfigLoaderBroadcastReceiver();
// Broadcast receiver for SIM and pkg intents, register intent filter in constructor.
private final BroadcastReceiver mPackageReceiver = new ConfigLoaderBroadcastReceiver();
- private final LocalLog mCarrierConfigLoadingLog = new LocalLog(50);
+ private final LocalLog mCarrierConfigLoadingLog = new LocalLog(100);
// Message codes; see mHandler below.
@@ -200,6 +200,7 @@
// have sent it before unlock. This will avoid we try to load carrier config
// when SIM is still loading when unlock happens.
if (mHasSentConfigChange[i]) {
+ logWithLocalLog("System unlocked");
updateConfigForPhoneId(i);
}
}
@@ -214,6 +215,8 @@
if (clearCachedConfigForPackage(carrierPackageName)) {
int numPhones = TelephonyManager.from(mContext).getActiveModemCount();
for (int i = 0; i < numPhones; ++i) {
+ logWithLocalLog("Package changed: " + carrierPackageName
+ + ", phone=" + i);
updateConfigForPhoneId(i);
}
}
@@ -975,7 +978,10 @@
PersistableBundle config = mConfigFromDefaultApp[phoneId];
if (config != null) {
retConfig.putAll(config);
- retConfig.putBoolean(CarrierConfigManager.KEY_CARRIER_CONFIG_APPLIED_BOOL, true);
+ if (getCarrierPackageForPhoneId(phoneId) == null) {
+ retConfig.putBoolean(
+ CarrierConfigManager.KEY_CARRIER_CONFIG_APPLIED_BOOL, true);
+ }
}
config = mConfigFromCarrierApp[phoneId];
if (config != null) {
@@ -990,7 +996,6 @@
config = mOverrideConfigs[phoneId];
if (config != null) {
retConfig.putAll(config);
- retConfig.putBoolean(CarrierConfigManager.KEY_CARRIER_CONFIG_APPLIED_BOOL, true);
}
}
return retConfig;
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 05e1fb3..7fe72ae 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -2032,7 +2032,15 @@
}
@Override
- public String getNetworkCountryIsoForPhone(int phoneId) {
+ public String getNetworkCountryIsoForPhone(int phoneId, String callingPackage) {
+ if (!TextUtils.isEmpty(callingPackage)) {
+ final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
+ if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
+ mApp, subId, callingPackage, "getNetworkCountryIsoForPhone")) {
+ return "";
+ }
+ }
+
// Reporting the correct network country is ambiguous when IWLAN could conflict with
// registered cell info, so return a NULL country instead.
final long identity = Binder.clearCallingIdentity();
diff --git a/src/com/android/phone/euicc/EuiccUiDispatcherActivity.java b/src/com/android/phone/euicc/EuiccUiDispatcherActivity.java
index 96f04e1..c47e014 100644
--- a/src/com/android/phone/euicc/EuiccUiDispatcherActivity.java
+++ b/src/com/android/phone/euicc/EuiccUiDispatcherActivity.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.Activity;
+import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
@@ -95,7 +96,7 @@
grantDefaultPermissionsToActiveLuiApp(activityInfo);
- euiccUiIntent.setComponent(activityInfo.getComponentName());
+ euiccUiIntent.setComponent(new ComponentName(activityInfo.packageName, activityInfo.name));
return euiccUiIntent;
}
diff --git a/src/com/android/phone/vvm/RemoteVvmTaskManager.java b/src/com/android/phone/vvm/RemoteVvmTaskManager.java
index 14030a1..6b60303 100644
--- a/src/com/android/phone/vvm/RemoteVvmTaskManager.java
+++ b/src/com/android/phone/vvm/RemoteVvmTaskManager.java
@@ -22,6 +22,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
+import android.content.pm.ComponentInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
@@ -38,6 +39,7 @@
import android.telephony.VisualVoicemailSms;
import android.text.TextUtils;
+import com.android.internal.telephony.util.TelephonyUtils;
import com.android.phone.Assert;
import com.android.phone.R;
@@ -167,7 +169,8 @@
}
if (info.serviceInfo == null) {
VvmLog.w(TAG,
- "Component " + info.getComponentInfo() + " is not a service, ignoring");
+ "Component " + TelephonyUtils.getComponentInfo(info)
+ + " is not a service, ignoring");
continue;
}
if (!android.Manifest.permission.BIND_VISUAL_VOICEMAIL_SERVICE
@@ -180,7 +183,8 @@
VvmLog.w(TAG, "target package " + targetPackage
+ " is no longer the active VisualVoicemailService, ignoring");
}
- return info.getComponentInfo().getComponentName();
+ ComponentInfo componentInfo = TelephonyUtils.getComponentInfo(info);
+ return new ComponentName(componentInfo.packageName, componentInfo.name);
}
return null;
@@ -199,7 +203,8 @@
if (info.isEmpty()) {
return null;
}
- return info.get(0).getComponentInfo().getComponentName();
+ ComponentInfo componentInfo = TelephonyUtils.getComponentInfo(info.get(0));
+ return new ComponentName(componentInfo.packageName, componentInfo.name);
}
@Override