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

Commit 73451241 authored by Hakjun Choi's avatar Hakjun Choi
Browse files

Remove ServiceException from registerForNtnSignalStreangthChanged

Remove ServiceException as it is not needed

Bug: 306111250
Test: atest SatelliteManagerTest, SatelliteManagerTestOnMockService
Test: manual test with test application to invoke APIs on pixel

Change-Id: I718485ab30762c83923ddedc257276f37d1caf73
parent 3921877a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1998,7 +1998,7 @@ public class SatelliteController extends Handler {
        if (error == SATELLITE_RESULT_SUCCESS) {
            mNtnSignalStrengthChangedListeners.put(callback.asBinder(), callback);
        } else {
            throw new ServiceSpecificException(error);
            throw new RemoteException(new IllegalStateException("registration fails: " + error));
        }
    }

+3 −3
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ import android.os.Message;
import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ServiceSpecificException;
import android.telephony.CarrierConfigManager;
import android.telephony.Rlog;
import android.telephony.ServiceState;
@@ -3190,10 +3189,11 @@ public class SatelliteControllerTest extends TelephonyTest {
                throw new AssertionError();
            }
        } else {
            ServiceSpecificException ex = assertThrows(ServiceSpecificException.class,
            RemoteException ex = assertThrows(RemoteException.class,
                    () -> mSatelliteControllerUT.registerForNtnSignalStrengthChanged(subId,
                            callback));
            assertEquals(expectedError, ex.errorCode);
            assertTrue("The cause is not IllegalStateException",
                    ex.getCause() instanceof IllegalStateException);
        }
    }