summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuo Qian <shuoq@google.com>2021-03-05 09:58:19 -0800
committerShuo Qian <shuoq@google.com>2021-03-15 19:14:07 +0000
commit0e459673aa944d65989181b659c820504117ab51 (patch)
tree791bbd6812bac49fe2d2f0abae44d7adc411289b
parent78a7feeb2601037bba61aec5f24302896dace6bc (diff)
downloadvoip-0e459673aa944d65989181b659c820504117ab51.tar.gz
Add permission for the broadcast intent with SIP profiles for security purpose.
Test: Treehugger Bug: 176496502 Change-Id: I2087170aceb7c0670afd04fcc779047aa95a373f
-rw-r--r--src/java/com/android/server/sip/SipService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/com/android/server/sip/SipService.java b/src/java/com/android/server/sip/SipService.java
index d14a8d6..5328801 100644
--- a/src/java/com/android/server/sip/SipService.java
+++ b/src/java/com/android/server/sip/SipService.java
@@ -342,7 +342,7 @@ public final class SipService extends ISipService.Stub {
if (DBG) log("notify: profile added: " + localProfile);
Intent intent = new Intent(SipManager.ACTION_SIP_ADD_PHONE);
intent.putExtra(SipManager.EXTRA_LOCAL_URI, localProfile.getUriString());
- mContext.sendBroadcast(intent);
+ mContext.sendBroadcast(intent, android.Manifest.permission.USE_SIP);
if (mSipGroups.size() == 1) {
registerReceivers();
}
@@ -352,7 +352,7 @@ public final class SipService extends ISipService.Stub {
if (DBG) log("notify: profile removed: " + localProfile);
Intent intent = new Intent(SipManager.ACTION_SIP_REMOVE_PHONE);
intent.putExtra(SipManager.EXTRA_LOCAL_URI, localProfile.getUriString());
- mContext.sendBroadcast(intent);
+ mContext.sendBroadcast(intent, android.Manifest.permission.USE_SIP);
if (mSipGroups.size() == 0) {
unregisterReceivers();
}