summaryrefslogtreecommitdiffstats
path: root/telephony/java/android/telephony/PhoneStateListener.java
diff options
context:
space:
mode:
authorFyodor Kupolov <fkupolov@google.com>2015-06-03 16:29:01 -0700
committerFyodor Kupolov <fkupolov@google.com>2015-06-09 12:44:39 -0700
commit309b2f63f3265c341f6a43cbca2fb25f9c38109a (patch)
tree0ee8b1d211ca239ccec8533763df352576afcc3f /telephony/java/android/telephony/PhoneStateListener.java
parent66f6cd63b710e0accf15c584c0bda26561425931 (diff)
downloadframeworks_base-309b2f63f3265c341f6a43cbca2fb25f9c38109a.zip
frameworks_base-309b2f63f3265c341f6a43cbca2fb25f9c38109a.tar.gz
frameworks_base-309b2f63f3265c341f6a43cbca2fb25f9c38109a.tar.bz2
Do not enforce PHONE_STATE_PERMISSION to register listener
PHONE_STATE_PERMISSION should not be required to register to the following event types: - PhoneStateListener.LISTEN_CALL_STATE - PhoneStateListener.LISTEN_DATA_ACTIVITY - PhoneStateListener.LISTEN_DATA_CONNECTION_STATE In case of LISTEN_CALL_STATE, an empty string should be passed instead of incomingNumber, when caller has no PHONE_STATE_PERMISSION. Bug: 21588537 Change-Id: I5b6d0308924f7e4cd13a983b8e0c9b3a5bbb119b
Diffstat (limited to 'telephony/java/android/telephony/PhoneStateListener.java')
-rw-r--r--telephony/java/android/telephony/PhoneStateListener.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index d192288..16472c8 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -120,8 +120,7 @@ public class PhoneStateListener {
/**
* Listen for changes to the device call state.
* {@more}
- * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE
- * READ_PHONE_STATE}
+ *
* @see #onCallStateChanged
*/
public static final int LISTEN_CALL_STATE = 0x00000020;
@@ -137,8 +136,6 @@ public class PhoneStateListener {
* Listen for changes to the direction of data traffic on the data
* connection (cellular).
* {@more}
- * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE
- * READ_PHONE_STATE}
* Example: The status bar uses this to display the appropriate
* data-traffic icon.
*
@@ -388,6 +385,10 @@ public class PhoneStateListener {
/**
* Callback invoked when device call state changes.
+ * @param state call state
+ * @param incomingNumber incoming call phone number. If application does not have
+ * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} permission, an empty
+ * string will be passed as an argument.
*
* @see TelephonyManager#CALL_STATE_IDLE
* @see TelephonyManager#CALL_STATE_RINGING