From 91b2555e8c9b4ab8d3b042514b2a5f7f1b98c7c5 Mon Sep 17 00:00:00 2001 From: Jordan Liu Date: Mon, 11 Feb 2019 11:36:49 -0800 Subject: [PATCH] Clarify PhoneStateListener documentation onXStateChanged() methods are called when the X state changes, but also once on initial registration. This is called out in the documentation for TelephonyManager.listen(), but we should clarify it here too. Fixes: 124204168 Test: no change to behavior Change-Id: Ie0fe8c90ff5610597f810d6ba8425138b8a286ee --- telephony/java/android/telephony/PhoneStateListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java index fea1b7b08a203..2c9ba1dfff7b1 100644 --- a/telephony/java/android/telephony/PhoneStateListener.java +++ b/telephony/java/android/telephony/PhoneStateListener.java @@ -45,7 +45,8 @@ import java.util.concurrent.Executor; *

* Override the methods for the state that you wish to receive updates for, and * pass your PhoneStateListener object, along with bitwise-or of the LISTEN_ - * flags to {@link TelephonyManager#listen TelephonyManager.listen()}. + * flags to {@link TelephonyManager#listen TelephonyManager.listen()}. Methods are + * called when the state changes, os well as once on initial registration. *

* Note that access to some telephony information is * permission-protected. Your application won't receive updates for protected