diff options
author | Wink Saville <wink@google.com> | 2014-09-03 23:37:14 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-03 23:37:17 +0000 |
commit | cf39f86b50c6cb78c64b786b8777e86605827ff3 (patch) | |
tree | ac9e6c2965ed8b2752d152d9b638f2549f31f13f /telephony | |
parent | c02154f862049ee53393705efe2d09bbc1f214fe (diff) | |
parent | 2e40ba9dca6c00394e8ce267281f113b1c3320d8 (diff) | |
download | frameworks_base-cf39f86b50c6cb78c64b786b8777e86605827ff3.zip frameworks_base-cf39f86b50c6cb78c64b786b8777e86605827ff3.tar.gz frameworks_base-cf39f86b50c6cb78c64b786b8777e86605827ff3.tar.bz2 |
Merge "Add PhoneStateListener(Looper looper) and some documentation." into lmp-dev
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/PhoneStateListener.java | 23 |
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; |