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

Commit 7c72c2d3 authored by Yorke Lee's avatar Yorke Lee
Browse files

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
parent e8d9810c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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