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

Commit 040cc7c8 authored by Jordan Liu's avatar Jordan Liu
Browse files

Check MODIFY_CELL_BROADCAST permission

Use this for resetCBRanges instead of current permission, which is
granted to apps besides CB module.

Bug: 173335320
Test: manual
Change-Id: I0857ce5db31cd51d5876a519df19a6212385c52a
parent d2553323
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.telephony.SmsManager.STATUS_ON_ICC_READ;
import static android.telephony.SmsManager.STATUS_ON_ICC_UNREAD;

import android.Manifest;
import android.annotation.RequiresPermission;
import android.app.AppOpsManager;
import android.app.PendingIntent;
import android.compat.annotation.UnsupportedAppUsage;
@@ -1049,8 +1050,9 @@ public class IccSmsInterfaceManager {
    /**
     * Reset all cell broadcast ranges. Previously enabled ranges will become invalid after this.
     */
    @RequiresPermission(android.Manifest.permission.MODIFY_CELL_BROADCASTS)
    public void resetAllCellBroadcastRanges() {
        mContext.enforceCallingPermission(android.Manifest.permission.RECEIVE_EMERGENCY_BROADCAST,
        mContext.enforceCallingPermission(android.Manifest.permission.MODIFY_CELL_BROADCASTS,
                "resetAllCellBroadcastRanges");
        mCdmaBroadcastRangeManager.clearRanges();
        mCellBroadcastRangeManager.clearRanges();