From 7c72c2d3c2c4943a914abb2e1598610961db8f57 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Tue, 28 Oct 2014 14:12:02 -0700 Subject: [PATCH] Add comment to TelecomManager.getCallState Explain why READ_PHONE_STATE permission is not required so that people don't try to add it in the future. Requiring the permission causes stability crashes with legacy apps and system components that don't have the permission. Change-Id: Idf8766aa409d4a2c4ed3d6f81a398f4a0eb24615 --- telecomm/java/android/telecom/TelecomManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 2652b45328990..13c9ea2dd1e30 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -684,6 +684,11 @@ public class TelecomManager { * {@link TelephonyManager#CALL_STATE_RINGING} * {@link TelephonyManager#CALL_STATE_OFFHOOK} * {@link TelephonyManager#CALL_STATE_IDLE} + * + * Note that this API does not require the + * {@link android.Manifest.permission#READ_PHONE_STATE} permission. This is intentional, to + * preserve the behavior of {@link TelephonyManager#getCallState()}, which also did not require + * the permission. * @hide */ @SystemApi