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

Commit 1ed36e12 authored by Amit Mahajan's avatar Amit Mahajan Committed by android-build-merger
Browse files

Merge "Fix unit test for multi-part SMS." into nyc-dev

am: e8acb3d6

* commit 'e8acb3d6':
  Fix unit test for multi-part SMS.

Change-Id: Ifb57f8f634bbda3b4bb1625a7583cfdcaff687d3
parents 1a899ad4 e8acb3d6
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -707,7 +707,6 @@ public class GsmInboundSmsHandlerTest extends TelephonyTest {
    @MediumTest
    public void testBroadcastUndeliveredMultiPart() throws Exception {
        replaceInstance(SmsBroadcastUndelivered.class, "instance", null, null);
        SmsBroadcastUndelivered.initialize(mContext, mGsmInboundSmsHandler, mCdmaInboundSmsHandler);

        // prepare SMS part 1 and part 2
        prepareMultiPartSms();
@@ -721,10 +720,9 @@ public class GsmInboundSmsHandlerTest extends TelephonyTest {
                when(mTelephonyComponentFactory).makeInboundSmsTracker(any(Cursor.class),
                anyBoolean());

        //when user unlocks the device, the message in db should be broadcast
        mContext.sendBroadcast(new Intent(Intent.ACTION_USER_UNLOCKED));
        SmsBroadcastUndelivered.initialize(mContext, mGsmInboundSmsHandler, mCdmaInboundSmsHandler);
        waitForMs(100);

        verifySmsIntentBroadcasts(1);
        verifySmsIntentBroadcasts(0);
    }
}