Merge "Add getSlotId API for ImsFeature and docs changes"
This commit is contained in:
@@ -7424,6 +7424,7 @@ package android.telephony.ims.feature {
|
||||
public abstract class ImsFeature {
|
||||
ctor public ImsFeature();
|
||||
method public abstract void changeEnabledCapabilities(android.telephony.ims.feature.CapabilityChangeRequest, android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy);
|
||||
method public final int getSlotIndex();
|
||||
method public abstract void onFeatureReady();
|
||||
method public abstract void onFeatureRemoved();
|
||||
method public final void setFeatureState(int);
|
||||
@@ -7437,7 +7438,7 @@ package android.telephony.ims.feature {
|
||||
field public static final int STATE_UNAVAILABLE = 0; // 0x0
|
||||
}
|
||||
|
||||
@Deprecated public static class ImsFeature.Capabilities {
|
||||
public static class ImsFeature.Capabilities {
|
||||
field @Deprecated protected int mCapabilities;
|
||||
}
|
||||
|
||||
|
||||
@@ -132,15 +132,20 @@ public abstract class ImsFeature {
|
||||
public @interface ImsState {}
|
||||
|
||||
/**
|
||||
* This {@link ImsFeature}'s state is unavailable and should not be communicated with.
|
||||
* This {@link ImsFeature}'s state is unavailable and should not be communicated with. This will
|
||||
* remove all bindings back to the framework. Any attempt to communicate with the framework
|
||||
* during this time will result in an {@link IllegalStateException}.
|
||||
*/
|
||||
public static final int STATE_UNAVAILABLE = 0;
|
||||
/**
|
||||
* This {@link ImsFeature} state is initializing and should not be communicated with.
|
||||
* This {@link ImsFeature} state is initializing and should not be communicated with. This will
|
||||
* remove all bindings back to the framework. Any attempt to communicate with the framework
|
||||
* during this time will result in an {@link IllegalStateException}.
|
||||
*/
|
||||
public static final int STATE_INITIALIZING = 1;
|
||||
/**
|
||||
* This {@link ImsFeature} is ready for communication.
|
||||
* This {@link ImsFeature} is ready for communication. Do not attempt to call framework methods
|
||||
* until {@link #onFeatureReady()} is called.
|
||||
*/
|
||||
public static final int STATE_READY = 2;
|
||||
|
||||
@@ -208,11 +213,14 @@ public abstract class ImsFeature {
|
||||
|
||||
/**
|
||||
* Contains the capabilities defined and supported by an ImsFeature in the form of a bit mask.
|
||||
* <p>
|
||||
* Typically this class is not used directly, but rather extended in subclasses of
|
||||
* {@link ImsFeature} to provide service specific capabilities.
|
||||
* @hide
|
||||
* @deprecated Use {@link MmTelFeature.MmTelCapabilities} instead.
|
||||
*/
|
||||
@SystemApi // SystemApi only because it was leaked through type usage in a previous release.
|
||||
@SystemApi
|
||||
public static class Capabilities {
|
||||
/** @deprecated Use getters and accessors instead. */
|
||||
protected int mCapabilities = 0;
|
||||
|
||||
/**
|
||||
@@ -305,12 +313,12 @@ public abstract class ImsFeature {
|
||||
/** @hide */
|
||||
protected final Object mLock = new Object();
|
||||
|
||||
private final Set<IImsFeatureStatusCallback> mStatusCallbacks = Collections.newSetFromMap(
|
||||
new WeakHashMap<IImsFeatureStatusCallback, Boolean>());
|
||||
private final Set<IImsFeatureStatusCallback> mStatusCallbacks =
|
||||
Collections.newSetFromMap(new WeakHashMap<>());
|
||||
private @ImsState int mState = STATE_UNAVAILABLE;
|
||||
private int mSlotId = SubscriptionManager.INVALID_SIM_SLOT_INDEX;
|
||||
private final RemoteCallbackList<IImsCapabilityCallback> mCapabilityCallbacks
|
||||
= new RemoteCallbackList<>();
|
||||
private final RemoteCallbackList<IImsCapabilityCallback> mCapabilityCallbacks =
|
||||
new RemoteCallbackList<>();
|
||||
private Capabilities mCapabilityStatus = new Capabilities();
|
||||
|
||||
/**
|
||||
@@ -321,6 +329,16 @@ public abstract class ImsFeature {
|
||||
mSlotId = slotId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The SIM slot index associated with this ImsFeature.
|
||||
*
|
||||
* @see SubscriptionManager#getSubscriptionIds(int) for more information on getting the
|
||||
* subscription IDs associated with this slot.
|
||||
*/
|
||||
public final int getSlotIndex() {
|
||||
return mSlotId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The current state of the feature, defined as {@link #STATE_UNAVAILABLE},
|
||||
* {@link #STATE_INITIALIZING}, or {@link #STATE_READY}.
|
||||
@@ -490,7 +508,9 @@ public abstract class ImsFeature {
|
||||
public abstract void onFeatureRemoved();
|
||||
|
||||
/**
|
||||
* Called when the feature has been initialized and communication with the framework is set up.
|
||||
* Called after this ImsFeature has been initialized and has been set to the
|
||||
* {@link ImsState#STATE_READY} state.
|
||||
* <p>
|
||||
* Any attempt by this feature to access the framework before this method is called will return
|
||||
* with an {@link IllegalStateException}.
|
||||
* The IMS provider should use this method to trigger registration for this feature on the IMS
|
||||
|
||||
Reference in New Issue
Block a user