summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2014-09-03 15:28:12 -0700
committerWink Saville <wink@google.com>2014-09-03 15:44:02 -0700
commit2e40ba9dca6c00394e8ce267281f113b1c3320d8 (patch)
tree6f2cb6dd48564328133681d18b25f9f5c136f74f /telephony
parent628025335aaf74be7804d176e8d95ea7f9c9707d (diff)
downloadframeworks_base-2e40ba9dca6c00394e8ce267281f113b1c3320d8.zip
frameworks_base-2e40ba9dca6c00394e8ce267281f113b1c3320d8.tar.gz
frameworks_base-2e40ba9dca6c00394e8ce267281f113b1c3320d8.tar.bz2
Add PhoneStateListener(Looper looper) and some documentation.
Bug: 17374935 Change-Id: I1eeb77fd7478cb81cde92f43a26ed19697323e6a
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/PhoneStateListener.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 350c27e..34da1c9 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -221,18 +221,39 @@ public class PhoneStateListener {
private final Handler mHandler;
+ /**
+ * Create a PhoneStateListener for the Phone with the default subscription.
+ * This class requires Looper.myLooper() not return null. To supply your
+ * own non-null looper use PhoneStateListener(Looper looper) below.
+ */
public PhoneStateListener() {
this(SubscriptionManager.DEFAULT_SUB_ID, Looper.myLooper());
}
/**
+ * Create a PhoneStateListener for the Phone with the default subscription
+ * using a particular non-null Looper.
+ * @hide
+ */
+ public PhoneStateListener(Looper looper) {
+ this(SubscriptionManager.DEFAULT_SUB_ID, looper);
+ }
+
+ /**
+ * Create a PhoneStateListener for the Phone using the specified subscription.
+ * This class requires Looper.myLooper() not return null. To supply your
+ * own non-null Looper use PhoneStateListener(long subId, Looper looper) below.
* @hide
*/
public PhoneStateListener(long subId) {
this(subId, Looper.myLooper());
}
- /** @hide */
+ /**
+ * Create a PhoneStateListener for the Phone using the specified subscription
+ * and non-null Looper.
+ * @hide
+ */
public PhoneStateListener(long subId, Looper looper) {
if (DBG) log("ctor: subId=" + subId + " looper=" + looper);
mSubId = subId;