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

Commit 13d8ea9b authored by Aishwarya Mallampati's avatar Aishwarya Mallampati
Browse files

Send response for update provision satellite token immediately.

Send iccId to modem and repond back immeditely to the app.
Do not wait for updateSatelliteSubscription result to send response.

Bug: 369414441
Test: atest SatelliteControllerTest,
      Manually tested SMS/MMS/CALL/DATA
FLAG: EXEMPT bugfix
Change-Id: Ide55c5b6729f17c22feaa34ee9e478e101d31bb8
parent b6e87b41
Loading
Loading
Loading
Loading
+8 −18
Original line number Diff line number Diff line
@@ -1732,20 +1732,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();
@@ -1753,7 +1750,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;
            }

@@ -1770,12 +1766,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;
            }