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

Commit 673a8e3d authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Fix unit test for multi-part SMS.

Bug: 28821195
Change-Id: Idde4b7ef6f2cee999cccd3ee795d21f1e68edc37
parent a8361395
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);
    }
}