Added permission check for notifying subscription changed

Added permission check for notifying subscription changed
event.

Bug: 239607619
Test: Manual
Change-Id: I5b714a35611d8ca250f9f22c20d39623ba88131c
This commit is contained in:
Jack Yu
2022-12-22 03:23:32 -08:00
parent 4ce5d5e506
commit 8c56a98cb2

View File

@@ -1002,6 +1002,10 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
@Override
public void notifySubscriptionInfoChanged() {
if (VDBG) log("notifySubscriptionInfoChanged:");
if (!checkNotifyPermission("notifySubscriptionInfoChanged()")) {
return;
}
synchronized (mRecords) {
if (!mHasNotifySubscriptionInfoChangedOccurred) {
log("notifySubscriptionInfoChanged: first invocation mRecords.size="
@@ -1028,6 +1032,10 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
@Override
public void notifyOpportunisticSubscriptionInfoChanged() {
if (VDBG) log("notifyOpptSubscriptionInfoChanged:");
if (!checkNotifyPermission("notifyOpportunisticSubscriptionInfoChanged()")) {
return;
}
synchronized (mRecords) {
if (!mHasNotifyOpportunisticSubscriptionInfoChangedOccurred) {
log("notifyOpptSubscriptionInfoChanged: first invocation mRecords.size="