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

Commit ad57f63e authored by Sanket Padawe's avatar Sanket Padawe Committed by android-build-merger
Browse files

Merge "Unit tests for ServiceStateTracker" into nyc-dev

am: f9a7f1f9

* commit 'f9a7f1f9':
  Unit tests for ServiceStateTracker

Change-Id: Ib61f8fee355d87553193283359cfdc27ecc2a545
parents f00ca040 f9a7f1f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -618,7 +618,8 @@ public class ServiceStateTracker extends Handler {
        sendMessage(obtainMessage(EVENT_PHONE_TYPE_SWITCHED));
    }

    void requestShutdown() {
    @VisibleForTesting
    public void requestShutdown() {
        if (mDeviceShuttingDown == true) return;
        mDeviceShuttingDown = true;
        mDesiredPowerState = false;
+20 −3
Original line number Diff line number Diff line
@@ -1120,6 +1120,7 @@ public class SimulatedCommands extends BaseCommands

    @Override
    public void getPreferredNetworkType(Message result) {
        SimulatedCommandsVerifier.getInstance().getPreferredNetworkType(result);
        int ret[] = new int[1];

        ret[0] = mNetworkType;
@@ -1139,7 +1140,8 @@ public class SimulatedCommands extends BaseCommands

    @Override
    public void setLocationUpdates(boolean enable, Message response) {
        unimplemented(response);
        SimulatedCommandsVerifier.getInstance().setLocationUpdates(enable, response);
        resultSuccess(response, null);
    }

    @Override
@@ -1597,8 +1599,14 @@ public class SimulatedCommands extends BaseCommands

    @Override
    public void
    getCDMASubscription(Message response) {
        unimplemented(response);
    getCDMASubscription(Message result) {
        String ret[] = new String[5];
        ret[0] = "123";
        ret[1] = "456";
        ret[2] = "789";
        ret[3] = "234";
        ret[4] = "345";
        resultSuccess(result, ret);
    }

    @Override
@@ -2001,6 +2009,15 @@ public class SimulatedCommands extends BaseCommands
        mVoiceNetworkStateRegistrants.notifyRegistrants();
    }

    @VisibleForTesting
    public void notifyOtaProvisionStatusChanged() {
        if (mOtaProvisionRegistrants != null) {
            int ret[] = new int[1];
            ret[0] = Phone.CDMA_OTA_PROVISION_STATUS_COMMITTED;
            mOtaProvisionRegistrants.notifyRegistrants(new AsyncResult(null, ret, null));
        }
    }

    public void setIccCardStatus(IccCardStatus iccCardStatus){
        mIccCardStatus = iccCardStatus;
    }
+457 −0

File changed.

Preview size limit exceeded, changes collapsed.