Loading packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java +1 −2 Original line number Diff line number Diff line Loading @@ -49,7 +49,6 @@ import android.webkit.WebViewClient; import android.widget.ProgressBar; import android.widget.TextView; import com.android.internal.telephony.PhoneConstants; import com.android.internal.util.ArrayUtils; import com.android.internal.util.TrafficStatsConstants; Loading Loading @@ -207,7 +206,7 @@ public class CaptivePortalLoginActivity extends Activity { if (TextUtils.isEmpty(url)) url = mCm.getCaptivePortalServerUrl(); final CarrierConfigManager configManager = getApplicationContext() .getSystemService(CarrierConfigManager.class); final int subId = getIntent().getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, final int subId = getIntent().getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, SubscriptionManager.getDefaultVoiceSubscriptionId()); final String[] portalURLs = configManager.getConfigForSubId(subId).getStringArray( CarrierConfigManager.KEY_CARRIER_DEFAULT_REDIRECTION_URL_STRING_ARRAY); Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +6 −7 Original line number Diff line number Diff line Loading @@ -29,8 +29,8 @@ import static android.os.BatteryManager.EXTRA_MAX_CHARGING_VOLTAGE; import static android.os.BatteryManager.EXTRA_PLUGGED; import static android.os.BatteryManager.EXTRA_STATUS; import static android.telephony.PhoneStateListener.LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE; import static android.telephony.TelephonyManager.MODEM_COUNT_DUAL_MODEM; import static com.android.internal.telephony.PhoneConstants.MAX_PHONE_COUNT_DUAL_SIM; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT; Loading Loading @@ -91,7 +91,6 @@ import android.util.SparseBooleanArray; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.IccCardConstants; import com.android.internal.telephony.IccCardConstants.State; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.TelephonyIntents; import com.android.internal.util.Preconditions; import com.android.internal.widget.LockPatternUtils; Loading Loading @@ -528,7 +527,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { */ public List<SubscriptionInfo> getFilteredSubscriptionInfo(boolean forceReload) { List<SubscriptionInfo> subscriptions = getSubscriptionInfo(false); if (subscriptions.size() == MAX_PHONE_COUNT_DUAL_SIM) { if (subscriptions.size() == MODEM_COUNT_DUAL_MODEM) { SubscriptionInfo info1 = subscriptions.get(0); SubscriptionInfo info2 = subscriptions.get(1); if (info1.getGroupUuid() != null && info1.getGroupUuid().equals(info2.getGroupUuid())) { Loading Loading @@ -1129,7 +1128,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { dispatchBootCompleted(); } else if (TelephonyIntents.ACTION_SERVICE_STATE_CHANGED.equals(action)) { ServiceState serviceState = ServiceState.newFromBundle(intent.getExtras()); int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, int subId = intent.getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, SubscriptionManager.INVALID_SUBSCRIPTION_ID); if (DEBUG) { Log.v(TAG, "action " + action + " serviceState=" + serviceState + " subId=" Loading Loading @@ -1281,9 +1280,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { if (!TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(intent.getAction())) { throw new IllegalArgumentException("only handles intent ACTION_SIM_STATE_CHANGED"); } String stateExtra = intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE); int slotId = intent.getIntExtra(PhoneConstants.PHONE_KEY, 0); int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, String stateExtra = intent.getStringExtra(Intent.EXTRA_SIM_STATE); int slotId = intent.getIntExtra(SubscriptionManager.EXTRA_SLOT_INDEX, 0); int subId = intent.getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, SubscriptionManager.INVALID_SUBSCRIPTION_ID); if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) { final String absentReason = intent Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +3 −4 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ import static android.net.wifi.WifiManager.TrafficStateCallback.DATA_ACTIVITY_IN import static android.net.wifi.WifiManager.TrafficStateCallback.DATA_ACTIVITY_NONE; import static android.net.wifi.WifiManager.TrafficStateCallback.DATA_ACTIVITY_OUT; import static android.telephony.PhoneStateListener.LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE; import static android.telephony.TelephonyManager.MODEM_COUNT_DUAL_MODEM; import static com.android.internal.telephony.PhoneConstants.MAX_PHONE_COUNT_DUAL_SIM; import static com.android.systemui.Dependency.BG_LOOPER_NAME; import android.content.BroadcastReceiver; Loading Loading @@ -57,7 +57,6 @@ import android.util.SparseArray; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.TelephonyIntents; import com.android.settingslib.net.DataUsageController; import com.android.systemui.ConfigurationChangedReceiver; Loading Loading @@ -532,7 +531,7 @@ public class NetworkControllerImpl extends BroadcastReceiver mReceiverHandler.post(this::handleConfigurationChanged); break; default: int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, int subId = intent.getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, SubscriptionManager.INVALID_SUBSCRIPTION_ID); if (SubscriptionManager.isValidSubscriptionId(subId)) { if (mMobileSignalControllers.indexOfKey(subId) >= 0) { Loading Loading @@ -577,7 +576,7 @@ public class NetworkControllerImpl extends BroadcastReceiver } private void filterMobileSubscriptionInSameGroup(List<SubscriptionInfo> subscriptions) { if (subscriptions.size() == MAX_PHONE_COUNT_DUAL_SIM) { if (subscriptions.size() == MODEM_COUNT_DUAL_MODEM) { SubscriptionInfo info1 = subscriptions.get(0); SubscriptionInfo info2 = subscriptions.get(1); if (info1.getGroupUuid() != null && info1.getGroupUuid().equals(info2.getGroupUuid())) { Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +3 −4 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ import android.testing.TestableLooper; import android.testing.TestableLooper.RunWithLooper; import com.android.internal.telephony.IccCardConstants; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.TelephonyIntents; import com.android.systemui.SysuiTestCase; import com.android.systemui.statusbar.phone.KeyguardBypassController; Loading Loading @@ -481,9 +480,9 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { int subscription = simInited ? 1/* mock subid=1 */ : SubscriptionManager.DUMMY_SUBSCRIPTION_ID_BASE; if (data != null) intent.putExtras(data); intent.putExtra(PhoneConstants.PHONE_NAME_KEY, "Phone"); intent.putExtra("subscription", subscription); intent.putExtra("slot", 0/* SLOT 1 */); intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subscription); intent.putExtra(SubscriptionManager.EXTRA_SLOT_INDEX, 0); return intent; } Loading telephony/java/android/telephony/SubscriptionManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -2141,6 +2141,7 @@ public class SubscriptionManager { } else { logd("putPhoneIdAndSubIdExtra: no valid subs"); intent.putExtra(PhoneConstants.PHONE_KEY, phoneId); intent.putExtra(EXTRA_SLOT_INDEX, phoneId); } } Loading Loading
packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java +1 −2 Original line number Diff line number Diff line Loading @@ -49,7 +49,6 @@ import android.webkit.WebViewClient; import android.widget.ProgressBar; import android.widget.TextView; import com.android.internal.telephony.PhoneConstants; import com.android.internal.util.ArrayUtils; import com.android.internal.util.TrafficStatsConstants; Loading Loading @@ -207,7 +206,7 @@ public class CaptivePortalLoginActivity extends Activity { if (TextUtils.isEmpty(url)) url = mCm.getCaptivePortalServerUrl(); final CarrierConfigManager configManager = getApplicationContext() .getSystemService(CarrierConfigManager.class); final int subId = getIntent().getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, final int subId = getIntent().getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, SubscriptionManager.getDefaultVoiceSubscriptionId()); final String[] portalURLs = configManager.getConfigForSubId(subId).getStringArray( CarrierConfigManager.KEY_CARRIER_DEFAULT_REDIRECTION_URL_STRING_ARRAY); Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +6 −7 Original line number Diff line number Diff line Loading @@ -29,8 +29,8 @@ import static android.os.BatteryManager.EXTRA_MAX_CHARGING_VOLTAGE; import static android.os.BatteryManager.EXTRA_PLUGGED; import static android.os.BatteryManager.EXTRA_STATUS; import static android.telephony.PhoneStateListener.LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE; import static android.telephony.TelephonyManager.MODEM_COUNT_DUAL_MODEM; import static com.android.internal.telephony.PhoneConstants.MAX_PHONE_COUNT_DUAL_SIM; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT; Loading Loading @@ -91,7 +91,6 @@ import android.util.SparseBooleanArray; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.IccCardConstants; import com.android.internal.telephony.IccCardConstants.State; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.TelephonyIntents; import com.android.internal.util.Preconditions; import com.android.internal.widget.LockPatternUtils; Loading Loading @@ -528,7 +527,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { */ public List<SubscriptionInfo> getFilteredSubscriptionInfo(boolean forceReload) { List<SubscriptionInfo> subscriptions = getSubscriptionInfo(false); if (subscriptions.size() == MAX_PHONE_COUNT_DUAL_SIM) { if (subscriptions.size() == MODEM_COUNT_DUAL_MODEM) { SubscriptionInfo info1 = subscriptions.get(0); SubscriptionInfo info2 = subscriptions.get(1); if (info1.getGroupUuid() != null && info1.getGroupUuid().equals(info2.getGroupUuid())) { Loading Loading @@ -1129,7 +1128,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { dispatchBootCompleted(); } else if (TelephonyIntents.ACTION_SERVICE_STATE_CHANGED.equals(action)) { ServiceState serviceState = ServiceState.newFromBundle(intent.getExtras()); int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, int subId = intent.getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, SubscriptionManager.INVALID_SUBSCRIPTION_ID); if (DEBUG) { Log.v(TAG, "action " + action + " serviceState=" + serviceState + " subId=" Loading Loading @@ -1281,9 +1280,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { if (!TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(intent.getAction())) { throw new IllegalArgumentException("only handles intent ACTION_SIM_STATE_CHANGED"); } String stateExtra = intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE); int slotId = intent.getIntExtra(PhoneConstants.PHONE_KEY, 0); int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, String stateExtra = intent.getStringExtra(Intent.EXTRA_SIM_STATE); int slotId = intent.getIntExtra(SubscriptionManager.EXTRA_SLOT_INDEX, 0); int subId = intent.getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, SubscriptionManager.INVALID_SUBSCRIPTION_ID); if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) { final String absentReason = intent Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +3 −4 Original line number Diff line number Diff line Loading @@ -22,8 +22,8 @@ import static android.net.wifi.WifiManager.TrafficStateCallback.DATA_ACTIVITY_IN import static android.net.wifi.WifiManager.TrafficStateCallback.DATA_ACTIVITY_NONE; import static android.net.wifi.WifiManager.TrafficStateCallback.DATA_ACTIVITY_OUT; import static android.telephony.PhoneStateListener.LISTEN_ACTIVE_DATA_SUBSCRIPTION_ID_CHANGE; import static android.telephony.TelephonyManager.MODEM_COUNT_DUAL_MODEM; import static com.android.internal.telephony.PhoneConstants.MAX_PHONE_COUNT_DUAL_SIM; import static com.android.systemui.Dependency.BG_LOOPER_NAME; import android.content.BroadcastReceiver; Loading Loading @@ -57,7 +57,6 @@ import android.util.SparseArray; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.TelephonyIntents; import com.android.settingslib.net.DataUsageController; import com.android.systemui.ConfigurationChangedReceiver; Loading Loading @@ -532,7 +531,7 @@ public class NetworkControllerImpl extends BroadcastReceiver mReceiverHandler.post(this::handleConfigurationChanged); break; default: int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, int subId = intent.getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, SubscriptionManager.INVALID_SUBSCRIPTION_ID); if (SubscriptionManager.isValidSubscriptionId(subId)) { if (mMobileSignalControllers.indexOfKey(subId) >= 0) { Loading Loading @@ -577,7 +576,7 @@ public class NetworkControllerImpl extends BroadcastReceiver } private void filterMobileSubscriptionInSameGroup(List<SubscriptionInfo> subscriptions) { if (subscriptions.size() == MAX_PHONE_COUNT_DUAL_SIM) { if (subscriptions.size() == MODEM_COUNT_DUAL_MODEM) { SubscriptionInfo info1 = subscriptions.get(0); SubscriptionInfo info2 = subscriptions.get(1); if (info1.getGroupUuid() != null && info1.getGroupUuid().equals(info2.getGroupUuid())) { Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +3 −4 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ import android.testing.TestableLooper; import android.testing.TestableLooper.RunWithLooper; import com.android.internal.telephony.IccCardConstants; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.TelephonyIntents; import com.android.systemui.SysuiTestCase; import com.android.systemui.statusbar.phone.KeyguardBypassController; Loading Loading @@ -481,9 +480,9 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { int subscription = simInited ? 1/* mock subid=1 */ : SubscriptionManager.DUMMY_SUBSCRIPTION_ID_BASE; if (data != null) intent.putExtras(data); intent.putExtra(PhoneConstants.PHONE_NAME_KEY, "Phone"); intent.putExtra("subscription", subscription); intent.putExtra("slot", 0/* SLOT 1 */); intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subscription); intent.putExtra(SubscriptionManager.EXTRA_SLOT_INDEX, 0); return intent; } Loading
telephony/java/android/telephony/SubscriptionManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -2141,6 +2141,7 @@ public class SubscriptionManager { } else { logd("putPhoneIdAndSubIdExtra: no valid subs"); intent.putExtra(PhoneConstants.PHONE_KEY, phoneId); intent.putExtra(EXTRA_SLOT_INDEX, phoneId); } } Loading