Merge "Add javadoc and deprecate addOnSubscriptionsChangedListener(android.telephony.SubscriptionManager.OnSubscriptionsChangedListener)" am: 35c5908f80 am: 0b0e2a7aad am: 81becd1a42

Change-Id: Ica52243002be1dc1e9801e80663bed637300278a
This commit is contained in:
Automerger Merge Worker
2020-03-04 23:46:35 +00:00
2 changed files with 6 additions and 2 deletions

View File

@@ -48045,7 +48045,7 @@ package android.telephony {
public class SubscriptionManager {
method public void addOnOpportunisticSubscriptionsChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener);
method public void addOnSubscriptionsChangedListener(android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
method @Deprecated public void addOnSubscriptionsChangedListener(android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
method public void addOnSubscriptionsChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void addSubscriptionsIntoGroup(@NonNull java.util.List<java.lang.Integer>, @NonNull android.os.ParcelUuid);
method public boolean canManageSubscription(android.telephony.SubscriptionInfo);

View File

@@ -973,11 +973,15 @@ public class SubscriptionManager {
* individual records themselves. When a change occurs the onSubscriptionsChanged method of
* the listener will be invoked immediately if there has been a notification. The
* onSubscriptionChanged method will also be triggered once initially when calling this
* function.
* function. The callback will be invoked on the looper specified in the listener's constructor.
*
* @param listener an instance of {@link OnSubscriptionsChangedListener} with
* onSubscriptionsChanged overridden.
*
* @deprecated Will get exception if the parameter listener is not initialized with a Looper.
* Use {@link #addOnSubscriptionsChangedListener(Executor, OnSubscriptionsChangedListener)}.
*/
@Deprecated
public void addOnSubscriptionsChangedListener(OnSubscriptionsChangedListener listener) {
if (listener == null) return;
addOnSubscriptionsChangedListener(listener.mExecutor, listener);