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

Commit e80d894b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Mms: Add subscription for SIM full notification"

parents 834e3e15 42e26666
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);
    }