From bdb30882f3d54553ca160310e7d4328dc194b60e Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Thu, 15 Aug 2019 16:24:34 -0700 Subject: Fixes MmTelFeatureConnection regression during creation The MmTelFeatureConnection creation process involves notifying the MmTelFeature if the connected MmTelFeature is available. The notification of this had been moved to an executor, which caused the update to happen asynchronously after the creation. Since the default state of the MmTelFeatureConnection is "not available", this was causing the ImsManager.Connector to retry multiple times. Set the state of mIsAvailable to true when created, since we will only create the MmTelFeatureConnection if the Binder is already available. Bug: 139500829 Bug: 139171862 Test: atest GtsTelephonyTestCases Change-Id: Ic2be4984fc62fc85da641cebe36533d3fca6717b Merged-In: Ic2be4984fc62fc85da641cebe36533d3fca6717b --- src/java/com/android/ims/MmTelFeatureConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/com/android/ims/MmTelFeatureConnection.java b/src/java/com/android/ims/MmTelFeatureConnection.java index 1709dcba..31095c73 100644 --- a/src/java/com/android/ims/MmTelFeatureConnection.java +++ b/src/java/com/android/ims/MmTelFeatureConnection.java @@ -423,7 +423,8 @@ public class MmTelFeatureConnection { private Context mContext; private Executor mExecutor; - private volatile boolean mIsAvailable = false; + // We are assuming the feature is available when started. + private volatile boolean mIsAvailable = true; // ImsFeature Status from the ImsService. Cached. private Integer mFeatureStateCached = null; private IFeatureUpdate mStatusCallback; -- cgit v1.2.3