Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0a4a335 authored by Aishwarya Mallampati's avatar Aishwarya Mallampati Committed by Android (Google) Code Review
Browse files

Merge "Send response for update provision satellite token immediately." into main

parents f5c01613 13d8ea9b
Loading
Loading
Loading
Loading
+8 −18
Original line number Diff line number Diff line
@@ -1743,20 +1743,17 @@ public class SatelliteController extends Handler {
                setSatellitePhone(subId);
                String iccId = mSubscriptionManagerService.getSubscriptionInfo(subId).getIccId();
                argument.setIccId(iccId);
                boolean sendResponse = false;
                synchronized (mSatelliteTokenProvisionedLock) {
                    if (!iccId.equals(mLastConfiguredIccId)) {
                        logd("updateSatelliteSubscription subId=" + subId + ", iccId=" + iccId
                                + " to modem");
                        mSatelliteModemInterface.updateSatelliteSubscription(iccId, onCompleted);
                    } else {
                        sendResponse = true;
                    }
                }
                if (provisionChanged) {
                    handleEventSatelliteSubscriptionProvisionStateChanged();
                }
                if (sendResponse) {

                // The response is sent immediately because the ICCID has already been
                // delivered to the modem.
                Bundle bundle = new Bundle();
@@ -1764,7 +1761,6 @@ public class SatelliteController extends Handler {
                        argument.mProvisioned ? SatelliteManager.KEY_PROVISION_SATELLITE_TOKENS
                                : SatelliteManager.KEY_DEPROVISION_SATELLITE_TOKENS, true);
                argument.mResult.send(SATELLITE_RESULT_SUCCESS, bundle);
                }
                break;
            }

@@ -1781,12 +1777,6 @@ public class SatelliteController extends Handler {
                    }
                }
                logd("updateSatelliteSubscription result=" + error);
                Bundle bundle = new Bundle();
                bundle.putBoolean(
                        argument.mProvisioned ? SatelliteManager.KEY_PROVISION_SATELLITE_TOKENS :
                                SatelliteManager.KEY_DEPROVISION_SATELLITE_TOKENS,
                        error == SATELLITE_RESULT_SUCCESS);
                argument.mResult.send(error, bundle);
                break;
            }