summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-03-22 20:42:53 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-03-22 20:42:53 +0000
commite9e5cb8c47e8ea304bf2c3402493f03ffd8bd826 (patch)
tree078914c850d51282a3bf762227be50c856d07ddc
parent0438dde9e4a6cc784f81b0b0ed8eba12e5349ba1 (diff)
parent39cfeafaa8fe43e4cb709d26463db2a29e1245fe (diff)
downloadTelephony-oreo-m4-s5-release.tar.gz
Merge cherrypicks of [3782287, 3782954, 3783025, 3783026, 3783027, 3783028, 3783029, 3783030, 3783164, 3783165, 3783167, 3783168, 3783170, 3783171, 3783172, 3782288, 3783031, 3782196, 3782955] into oc-m4-releaseandroid-8.1.0_r32android-8.1.0_r31oreo-m4-s6-releaseoreo-m4-s5-release
Change-Id: I51e97c58d23fcb8b6b90f458828c1463f864e9b7
-rw-r--r--src/com/android/phone/PhoneInterfaceManager.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 59b768484..616acda12 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -71,6 +71,7 @@ import android.telephony.UssdResponse;
import android.telephony.VisualVoicemailSmsFilterSettings;
import android.text.TextUtils;
import android.util.ArraySet;
+import android.util.EventLog;
import android.util.Log;
import android.util.Pair;
import android.util.Slog;
@@ -1171,7 +1172,12 @@ public class PhoneInterfaceManager extends ITelephony.Stub {
* @return true is a call was ended
*/
public boolean endCallForSubscriber(int subId) {
- enforceCallPermission();
+ if (mApp.checkCallingOrSelfPermission(permission.MODIFY_PHONE_STATE)
+ != PackageManager.PERMISSION_GRANTED) {
+ Log.i(LOG_TAG, "endCall: called without modify phone state.");
+ EventLog.writeEvent(0x534e4554, "67862398", -1, "");
+ throw new SecurityException("MODIFY_PHONE_STATE permission required.");
+ }
return (Boolean) sendRequest(CMD_END_CALL, null, new Integer(subId));
}