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

Commit 4e70b668 authored by Thomas Nguyen's avatar Thomas Nguyen
Browse files

Clear cached states when ending SatelliteManagerTestOnMockService

Bug: 276668803
Test: Run the following tests
atest android.telephony.satellite.cts.SatelliteManagerTest -c
atest android.telephony.satellite.cts.SatelliteManagerTestOnMockService -c

Change-Id: Iee97c881efd55e94d52e89e98620cfbecd903e9b
parent fd8271c7
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -1421,12 +1421,22 @@ public class SatelliteController extends Handler {
                servicePackageName);
        if (result && (servicePackageName == null || servicePackageName.equals("null"))) {
            /**
             * mIsSatelliteSupported is set to true when running SatelliteManagerTestOnMockService.
             * We need to set it to the actual state of the device.
             * Cached states like mIsSatelliteSupported and mIsSatelliteProvisioned are set to true
             * when running SatelliteManagerTestOnMockService. We need to reset them to the actual
             * states of the device.
             */
            synchronized (mIsSatelliteSupportedLock) {
                mIsSatelliteSupported = null;
            }
            synchronized (mIsSatelliteProvisionedLock) {
                mIsSatelliteProvisioned = null;
            }
            synchronized (mIsSatelliteEnabledLock) {
                mIsSatelliteEnabled = null;
            }
            synchronized (mSatelliteCapabilitiesLock) {
                mSatelliteCapabilities = null;
            }
            ResultReceiver receiver = new ResultReceiver(this) {
                @Override
                protected void onReceiveResult(int resultCode, Bundle resultData) {