Merge "Syncronize frameowrk and ImsStack operation for ImsFeatureStatusCallback."
This commit is contained in:
@@ -425,8 +425,8 @@ public class ImsService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
private IImsRcsFeature createRcsFeatureInternal(int slotId, int subI) {
|
||||
RcsFeature f = createRcsFeatureForSubscription(slotId, subI);
|
||||
private IImsRcsFeature createRcsFeatureInternal(int slotId, int subId) {
|
||||
RcsFeature f = createRcsFeatureForSubscription(slotId, subId);
|
||||
if (f != null) {
|
||||
f.setDefaultExecutor(mExecutor);
|
||||
setupFeature(f, slotId, ImsFeature.FEATURE_RCS);
|
||||
|
||||
@@ -394,10 +394,12 @@ public abstract class ImsFeature {
|
||||
@VisibleForTesting
|
||||
public void addImsFeatureStatusCallback(@NonNull IImsFeatureStatusCallback c) {
|
||||
try {
|
||||
// If we have just connected, send queued status.
|
||||
c.notifyImsFeatureStatus(getFeatureState());
|
||||
// Add the callback if the callback completes successfully without a RemoteException.
|
||||
mStatusCallbacks.register(c);
|
||||
synchronized (mStatusCallbacks) {
|
||||
// Add the callback if the callback completes successfully without a RemoteException
|
||||
mStatusCallbacks.register(c);
|
||||
// If we have just connected, send queued status.
|
||||
c.notifyImsFeatureStatus(getFeatureState());
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
Log.w(LOG_TAG, "Couldn't notify feature state: " + e.getMessage());
|
||||
}
|
||||
@@ -409,7 +411,9 @@ public abstract class ImsFeature {
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public void removeImsFeatureStatusCallback(@NonNull IImsFeatureStatusCallback c) {
|
||||
mStatusCallbacks.unregister(c);
|
||||
synchronized (mStatusCallbacks) {
|
||||
mStatusCallbacks.unregister(c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user