Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +17 −3 Original line number Diff line number Diff line Loading @@ -297,6 +297,9 @@ public class GsmCdmaPhone extends Phone { Settings.Global.getUriFor(Settings.Global.DEVICE_PROVISIONING_MOBILE_DATA_ENABLED), EVENT_DEVICE_PROVISIONING_DATA_SETTING_CHANGE); SubscriptionController.getInstance().registerForUiccAppsEnabled(this, EVENT_UICC_APPS_ENABLEMENT_SETTING_CHANGED, null, false); loadTtyMode(); logd("GsmCdmaPhone: constructor: sub = " + mPhoneId); } Loading Loading @@ -344,7 +347,8 @@ public class GsmCdmaPhone extends Phone { mCi.registerForOffOrNotAvailable(this, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, null); mCi.registerForOn(this, EVENT_RADIO_ON, null); mCi.registerForRadioStateChanged(this, EVENT_RADIO_STATE_CHANGED, null); mCi.registerUiccApplicationEnablementChanged(this, EVENT_UICC_APPS_ENABLEMENT_CHANGED, mCi.registerUiccApplicationEnablementChanged(this, EVENT_UICC_APPS_ENABLEMENT_STATUS_CHANGED, null); mCi.setOnSuppServiceNotification(this, EVENT_SSN, null); mCi.setOnRegistrationFailed(this, EVENT_REGISTRATION_FAILED, null); Loading Loading @@ -943,6 +947,14 @@ public class GsmCdmaPhone extends Phone { } } @Override public void dispose() { // Note: this API is currently never called. We are defining actions here in case // we need to dispose GsmCdmaPhone/Phone object. super.dispose(); SubscriptionController.getInstance().unregisterForUiccAppsEnabled(this); } @Override public void enableEnhancedVoicePrivacy(boolean enable, Message onComplete) { if (isPhoneTypeGsm()) { Loading Loading @@ -3039,7 +3051,7 @@ public class GsmCdmaPhone extends Phone { } break; case EVENT_GET_UICC_APPS_ENABLEMENT_DONE: case EVENT_UICC_APPS_ENABLEMENT_CHANGED: { case EVENT_UICC_APPS_ENABLEMENT_STATUS_CHANGED: ar = (AsyncResult) msg.obj; if (ar == null) return; if (ar.exception != null) { Loading @@ -3048,9 +3060,11 @@ public class GsmCdmaPhone extends Phone { } mUiccApplicationsEnabled = (Boolean) ar.result; // Intentional falling through. case EVENT_UICC_APPS_ENABLEMENT_SETTING_CHANGED: reapplyUiccAppsEnablementIfNeeded(); break; } case EVENT_REAPPLY_UICC_APPS_ENABLEMENT_DONE: { ar = (AsyncResult) msg.obj; if (ar == null || ar.exception == null) return; Loading src/java/com/android/internal/telephony/Phone.java +7 −6 Original line number Diff line number Diff line Loading @@ -205,11 +205,12 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { protected static final int EVENT_GET_AVAILABLE_NETWORKS_DONE = 51; private static final int EVENT_ALL_DATA_DISCONNECTED = 52; protected static final int EVENT_UICC_APPS_ENABLEMENT_CHANGED = 53; protected static final int EVENT_GET_UICC_APPS_ENABLEMENT_DONE = 54; protected static final int EVENT_REAPPLY_UICC_APPS_ENABLEMENT_DONE = 55; protected static final int EVENT_REGISTRATION_FAILED = 56; protected static final int EVENT_BARRING_INFO_CHANGED = 57; protected static final int EVENT_UICC_APPS_ENABLEMENT_STATUS_CHANGED = 53; protected static final int EVENT_UICC_APPS_ENABLEMENT_SETTING_CHANGED = 54; protected static final int EVENT_GET_UICC_APPS_ENABLEMENT_DONE = 55; protected static final int EVENT_REAPPLY_UICC_APPS_ENABLEMENT_DONE = 56; protected static final int EVENT_REGISTRATION_FAILED = 57; protected static final int EVENT_BARRING_INFO_CHANGED = 58; protected static final int EVENT_LAST = EVENT_BARRING_INFO_CHANGED; Loading src/java/com/android/internal/telephony/PhoneConfigurationManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,13 @@ public class PhoneConfigurationManager { sMultiSimConfigChangeRegistrants.remove(h); } /** * Unregister for all multi-SIM configuration change events. */ public static void unregisterAllMultiSimConfigChangeRegistrants() { sMultiSimConfigChangeRegistrants.removeAll(); } private void broadcastMultiSimConfigChange(int numOfActiveModems) { log("broadcastSimSlotNumChange numOfActiveModems" + numOfActiveModems); // Notify internal registrants first. Loading src/java/com/android/internal/telephony/RadioResponse.java +13 −19 Original line number Diff line number Diff line Loading @@ -1406,7 +1406,19 @@ public class RadioResponse extends IRadioResponse.Stub { public void requestIccSimAuthenticationResponse(RadioResponseInfo responseInfo, android.hardware.radio.V1_0.IccIoResult result) { responseICC_IOBase64(responseInfo, result); RILRequest rr = mRil.processResponse(responseInfo); if (rr != null) { IccIoResult ret = new IccIoResult( result.sw1, result.sw2, TextUtils.isEmpty(result.simResponse) ? null : result.simResponse.getBytes()); if (responseInfo.error == RadioError.NONE) { sendMessageResponse(rr.mResult, ret); } mRil.processResponseDone(rr, responseInfo, ret); } } /** Loading Loading @@ -2471,24 +2483,6 @@ public class RadioResponse extends IRadioResponse.Stub { } } private void responseICC_IOBase64(RadioResponseInfo responseInfo, android.hardware.radio.V1_0.IccIoResult result) { RILRequest rr = mRil.processResponse(responseInfo); if (rr != null) { IccIoResult ret = new IccIoResult( result.sw1, result.sw2, (!(result.simResponse).equals("")) ? android.util.Base64.decode(result.simResponse, android.util.Base64.DEFAULT) : (byte[]) null); if (responseInfo.error == RadioError.NONE) { sendMessageResponse(rr.mResult, ret); } mRil.processResponseDone(rr, responseInfo, ret); } } private void responseRadioCapability(RadioResponseInfo responseInfo, android.hardware.radio.V1_0.RadioCapability rc) { RILRequest rr = mRil.processResponse(responseInfo); Loading src/java/com/android/internal/telephony/SubscriptionController.java +27 −5 Original line number Diff line number Diff line Loading @@ -35,7 +35,9 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Binder; import android.os.Handler; import android.os.ParcelUuid; import android.os.RegistrantList; import android.os.RemoteException; import android.os.TelephonyServiceManager.ServiceRegisterer; import android.os.UserHandle; Loading Loading @@ -263,6 +265,7 @@ public class SubscriptionController extends ISub.Stub { @UnsupportedAppUsage private int[] colorArr; private long mLastISubServiceRegTime; private RegistrantList mUiccAppsEnableChangeRegList = new RegistrantList(); // The properties that should be shared and synced across grouped subscriptions. private static final Set<String> GROUP_SHARING_PROPERTIES = new HashSet<>(Arrays.asList( Loading Loading @@ -2120,19 +2123,38 @@ public class SubscriptionController extends ISub.Stub { // Refresh the Cache of Active Subscription Info List refreshCachedActiveSubscriptionInfoList(); notifyUiccAppsEnableChanged(); notifySubscriptionInfoChanged(); if (isActiveSubId(subId)) { Phone phone = PhoneFactory.getPhone(getPhoneId(subId)); phone.enableUiccApplications(enabled, null); } return result; } finally { Binder.restoreCallingIdentity(identity); } } /** * Register to change of uicc applications enablement changes. * @param notifyNow whether to notify target upon registration. */ public void registerForUiccAppsEnabled(Handler handler, int what, Object object, boolean notifyNow) { mUiccAppsEnableChangeRegList.addUnique(handler, what, object); if (notifyNow) { handler.obtainMessage(what, object).sendToTarget(); } } /** * Unregister to change of uicc applications enablement changes. */ public void unregisterForUiccAppsEnabled(Handler handler) { mUiccAppsEnableChangeRegList.remove(handler); } private void notifyUiccAppsEnableChanged() { mUiccAppsEnableChangeRegList.notifyRegistrants(); } /** * Get IMSI by subscription ID * For active subIds, this will always return the corresponding imsi Loading Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +17 −3 Original line number Diff line number Diff line Loading @@ -297,6 +297,9 @@ public class GsmCdmaPhone extends Phone { Settings.Global.getUriFor(Settings.Global.DEVICE_PROVISIONING_MOBILE_DATA_ENABLED), EVENT_DEVICE_PROVISIONING_DATA_SETTING_CHANGE); SubscriptionController.getInstance().registerForUiccAppsEnabled(this, EVENT_UICC_APPS_ENABLEMENT_SETTING_CHANGED, null, false); loadTtyMode(); logd("GsmCdmaPhone: constructor: sub = " + mPhoneId); } Loading Loading @@ -344,7 +347,8 @@ public class GsmCdmaPhone extends Phone { mCi.registerForOffOrNotAvailable(this, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, null); mCi.registerForOn(this, EVENT_RADIO_ON, null); mCi.registerForRadioStateChanged(this, EVENT_RADIO_STATE_CHANGED, null); mCi.registerUiccApplicationEnablementChanged(this, EVENT_UICC_APPS_ENABLEMENT_CHANGED, mCi.registerUiccApplicationEnablementChanged(this, EVENT_UICC_APPS_ENABLEMENT_STATUS_CHANGED, null); mCi.setOnSuppServiceNotification(this, EVENT_SSN, null); mCi.setOnRegistrationFailed(this, EVENT_REGISTRATION_FAILED, null); Loading Loading @@ -943,6 +947,14 @@ public class GsmCdmaPhone extends Phone { } } @Override public void dispose() { // Note: this API is currently never called. We are defining actions here in case // we need to dispose GsmCdmaPhone/Phone object. super.dispose(); SubscriptionController.getInstance().unregisterForUiccAppsEnabled(this); } @Override public void enableEnhancedVoicePrivacy(boolean enable, Message onComplete) { if (isPhoneTypeGsm()) { Loading Loading @@ -3039,7 +3051,7 @@ public class GsmCdmaPhone extends Phone { } break; case EVENT_GET_UICC_APPS_ENABLEMENT_DONE: case EVENT_UICC_APPS_ENABLEMENT_CHANGED: { case EVENT_UICC_APPS_ENABLEMENT_STATUS_CHANGED: ar = (AsyncResult) msg.obj; if (ar == null) return; if (ar.exception != null) { Loading @@ -3048,9 +3060,11 @@ public class GsmCdmaPhone extends Phone { } mUiccApplicationsEnabled = (Boolean) ar.result; // Intentional falling through. case EVENT_UICC_APPS_ENABLEMENT_SETTING_CHANGED: reapplyUiccAppsEnablementIfNeeded(); break; } case EVENT_REAPPLY_UICC_APPS_ENABLEMENT_DONE: { ar = (AsyncResult) msg.obj; if (ar == null || ar.exception == null) return; Loading
src/java/com/android/internal/telephony/Phone.java +7 −6 Original line number Diff line number Diff line Loading @@ -205,11 +205,12 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { protected static final int EVENT_GET_AVAILABLE_NETWORKS_DONE = 51; private static final int EVENT_ALL_DATA_DISCONNECTED = 52; protected static final int EVENT_UICC_APPS_ENABLEMENT_CHANGED = 53; protected static final int EVENT_GET_UICC_APPS_ENABLEMENT_DONE = 54; protected static final int EVENT_REAPPLY_UICC_APPS_ENABLEMENT_DONE = 55; protected static final int EVENT_REGISTRATION_FAILED = 56; protected static final int EVENT_BARRING_INFO_CHANGED = 57; protected static final int EVENT_UICC_APPS_ENABLEMENT_STATUS_CHANGED = 53; protected static final int EVENT_UICC_APPS_ENABLEMENT_SETTING_CHANGED = 54; protected static final int EVENT_GET_UICC_APPS_ENABLEMENT_DONE = 55; protected static final int EVENT_REAPPLY_UICC_APPS_ENABLEMENT_DONE = 56; protected static final int EVENT_REGISTRATION_FAILED = 57; protected static final int EVENT_BARRING_INFO_CHANGED = 58; protected static final int EVENT_LAST = EVENT_BARRING_INFO_CHANGED; Loading
src/java/com/android/internal/telephony/PhoneConfigurationManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,13 @@ public class PhoneConfigurationManager { sMultiSimConfigChangeRegistrants.remove(h); } /** * Unregister for all multi-SIM configuration change events. */ public static void unregisterAllMultiSimConfigChangeRegistrants() { sMultiSimConfigChangeRegistrants.removeAll(); } private void broadcastMultiSimConfigChange(int numOfActiveModems) { log("broadcastSimSlotNumChange numOfActiveModems" + numOfActiveModems); // Notify internal registrants first. Loading
src/java/com/android/internal/telephony/RadioResponse.java +13 −19 Original line number Diff line number Diff line Loading @@ -1406,7 +1406,19 @@ public class RadioResponse extends IRadioResponse.Stub { public void requestIccSimAuthenticationResponse(RadioResponseInfo responseInfo, android.hardware.radio.V1_0.IccIoResult result) { responseICC_IOBase64(responseInfo, result); RILRequest rr = mRil.processResponse(responseInfo); if (rr != null) { IccIoResult ret = new IccIoResult( result.sw1, result.sw2, TextUtils.isEmpty(result.simResponse) ? null : result.simResponse.getBytes()); if (responseInfo.error == RadioError.NONE) { sendMessageResponse(rr.mResult, ret); } mRil.processResponseDone(rr, responseInfo, ret); } } /** Loading Loading @@ -2471,24 +2483,6 @@ public class RadioResponse extends IRadioResponse.Stub { } } private void responseICC_IOBase64(RadioResponseInfo responseInfo, android.hardware.radio.V1_0.IccIoResult result) { RILRequest rr = mRil.processResponse(responseInfo); if (rr != null) { IccIoResult ret = new IccIoResult( result.sw1, result.sw2, (!(result.simResponse).equals("")) ? android.util.Base64.decode(result.simResponse, android.util.Base64.DEFAULT) : (byte[]) null); if (responseInfo.error == RadioError.NONE) { sendMessageResponse(rr.mResult, ret); } mRil.processResponseDone(rr, responseInfo, ret); } } private void responseRadioCapability(RadioResponseInfo responseInfo, android.hardware.radio.V1_0.RadioCapability rc) { RILRequest rr = mRil.processResponse(responseInfo); Loading
src/java/com/android/internal/telephony/SubscriptionController.java +27 −5 Original line number Diff line number Diff line Loading @@ -35,7 +35,9 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Binder; import android.os.Handler; import android.os.ParcelUuid; import android.os.RegistrantList; import android.os.RemoteException; import android.os.TelephonyServiceManager.ServiceRegisterer; import android.os.UserHandle; Loading Loading @@ -263,6 +265,7 @@ public class SubscriptionController extends ISub.Stub { @UnsupportedAppUsage private int[] colorArr; private long mLastISubServiceRegTime; private RegistrantList mUiccAppsEnableChangeRegList = new RegistrantList(); // The properties that should be shared and synced across grouped subscriptions. private static final Set<String> GROUP_SHARING_PROPERTIES = new HashSet<>(Arrays.asList( Loading Loading @@ -2120,19 +2123,38 @@ public class SubscriptionController extends ISub.Stub { // Refresh the Cache of Active Subscription Info List refreshCachedActiveSubscriptionInfoList(); notifyUiccAppsEnableChanged(); notifySubscriptionInfoChanged(); if (isActiveSubId(subId)) { Phone phone = PhoneFactory.getPhone(getPhoneId(subId)); phone.enableUiccApplications(enabled, null); } return result; } finally { Binder.restoreCallingIdentity(identity); } } /** * Register to change of uicc applications enablement changes. * @param notifyNow whether to notify target upon registration. */ public void registerForUiccAppsEnabled(Handler handler, int what, Object object, boolean notifyNow) { mUiccAppsEnableChangeRegList.addUnique(handler, what, object); if (notifyNow) { handler.obtainMessage(what, object).sendToTarget(); } } /** * Unregister to change of uicc applications enablement changes. */ public void unregisterForUiccAppsEnabled(Handler handler) { mUiccAppsEnableChangeRegList.remove(handler); } private void notifyUiccAppsEnableChanged() { mUiccAppsEnableChangeRegList.notifyRegistrants(); } /** * Get IMSI by subscription ID * For active subIds, this will always return the corresponding imsi Loading