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

Commit 42e26666 authored by Qiang Chen's avatar Qiang Chen Committed by Gerrit - the friendly Code Review server
Browse files

Mms: Add subscription for SIM full notification

SmsStorageMonitor doesn't notify which subscription is full when
receiving EVENT_ICC_FULL message.

Add subscription info into the SIM_FULL_ACTION intent.

CRs-Fixed: 536713

Change-Id: Idaf40167fcf31e4c7708e543d05f1a58793f7234
parent d7c1ee1d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.os.Message;
import android.os.PowerManager;
import android.provider.Telephony.Sms.Intents;
import android.telephony.Rlog;
import com.android.internal.telephony.MSimConstants;

/**
 * Monitors the device and ICC storage, and sends the appropriate events.
@@ -53,6 +54,7 @@ public final class SmsStorageMonitor extends Handler {
    private PowerManager.WakeLock mWakeLock;

    private boolean mReportMemoryStatusPending;
    private PhoneBase mPhone;

    final CommandsInterface mCi;                            // accessed from inner class
    boolean mStorageAvailable = true;                       // accessed from inner class
@@ -70,6 +72,7 @@ public final class SmsStorageMonitor extends Handler {
    public SmsStorageMonitor(PhoneBase phone) {
        mContext = phone.getContext();
        mCi = phone.mCi;
        mPhone = phone;

        createWakelock();

@@ -138,6 +141,7 @@ public final class SmsStorageMonitor extends Handler {
    private void handleIccFull() {
        // broadcast SIM_FULL intent
        Intent intent = new Intent(Intents.SIM_FULL_ACTION);
        intent.putExtra(MSimConstants.SUBSCRIPTION_KEY, mPhone.getSubscription());
        mWakeLock.acquire(WAKE_LOCK_TIMEOUT);
        mContext.sendBroadcast(intent, android.Manifest.permission.RECEIVE_SMS);
    }