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

Commit 38d29909 authored by Taesu Lee's avatar Taesu Lee
Browse files

Fix incorrect failure cause for RIL_REQUEST_SMS_ACKNOWLEDGE



Set 0 instead of Intents.RESULT_SMS_HANDLED(1) for success case.

Bug: 160854387
Test: manual

Signed-off-by: default avatarTaesu Lee <taesu82.lee@samsung.com>
Change-Id: Ia90d92bcc791935e20edce38dcdadf99c276535e
parent ade0160e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import static com.android.internal.telephony.SmsResponse.NO_ERROR_CODE;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.AsyncResult;
import android.os.Message;
import android.provider.Telephony.Sms.Intents;
import android.telephony.ServiceState;
import android.util.Pair;

@@ -165,7 +164,7 @@ public final class GsmSMSDispatcher extends SMSDispatcher {
                        messageRef, getFormat(), pdu);
            }
        }
        mCi.acknowledgeLastIncomingGsmSms(true, Intents.RESULT_SMS_HANDLED, null);
        mCi.acknowledgeLastIncomingGsmSms(true, 0 /* cause */, null);
    }

    /** {@inheritDoc} */
+1 −3
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ import android.os.HandlerThread;
import android.os.Message;
import android.os.SystemProperties;
import android.provider.Settings;
import android.provider.Telephony;
import android.telephony.SmsManager;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
@@ -143,8 +142,7 @@ public class GsmSmsDispatcherTest extends TelephonyTest {
    public void testSmsStatus() {
        mSimulatedCommands.notifySmsStatus(new byte[]{(byte)0xFF, (byte)0xFF, (byte)0xFF});
        TelephonyTestUtils.waitForMs(50);
        verify(mSimulatedCommandsVerifier).acknowledgeLastIncomingGsmSms(true,
                Telephony.Sms.Intents.RESULT_SMS_HANDLED, null);
        verify(mSimulatedCommandsVerifier).acknowledgeLastIncomingGsmSms(true, 0, null);
    }

    @Test @MediumTest