Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee1b56d5 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Adds TransactionManager dumpsys info and cleanups

1) Adds new call sequencing flag for general DSDA development in Telecom
2) Adds a new Transaction History in TransactionManager
  - Keeps track of when a transaction was added/started/completed
  - prints the state of pending and completed transactions for
  dumpsys purposes. Limits the completed transaction queue to 20
  items for now.
  - Modifies SerialTransaction to not remove sub-transactions so that
  we can collect histry about the transaction when finished
3) Cleans up the visibility of some methods and adds flag propogation
changes for testing

Fixes: 315879576
Test: atest TelecomUnitTests:VoipCallTransactionTest
Change-Id: Ifac05d24f70c7e12b1dd5d8f89308d550d3e3ae5
parent 4c419e7d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -13,3 +13,10 @@ flag {
  description: "This fix ensures the MO calls won't switch from Active to Quite b/c setDialing was not called"
  bug: "309540769"
}

flag {
  name: "enable_call_sequencing"
  namespace: "telecom"
  description: "Enables simultaneous call sequencing for SIM PhoneAccounts"
  bug: "297446980"
}
+4 −5
Original line number Diff line number Diff line
@@ -700,7 +700,8 @@ public class CallsManager extends Call.ListenerBase
        mCallLogManager = new CallLogManager(context, phoneAccountRegistrar, mMissedCallNotifier,
                mAnomalyReporter, featureFlags);
        mConnectionServiceRepository =
                new ConnectionServiceRepository(mPhoneAccountRegistrar, mContext, mLock, this);
                new ConnectionServiceRepository(mPhoneAccountRegistrar, mContext, mLock, this,
                        featureFlags);
        mInCallWakeLockController = inCallWakeLockControllerFactory.create(context, this);
        mClockProxy = clockProxy;
        mToastFactory = toastFactory;
@@ -5880,8 +5881,7 @@ public class CallsManager extends Call.ListenerBase
            return;
        }
        ConnectionServiceWrapper service = mConnectionServiceRepository.getService(
                phoneAccountHandle.getComponentName(), phoneAccountHandle.getUserHandle(),
                mFeatureFlags);
                phoneAccountHandle.getComponentName(), phoneAccountHandle.getUserHandle());
        if (service == null) {
            Log.i(this, "Found no connection service.");
            return;
@@ -5906,8 +5906,7 @@ public class CallsManager extends Call.ListenerBase
            return;
        }
        ConnectionServiceWrapper service = mConnectionServiceRepository.getService(
                phoneAccountHandle.getComponentName(), phoneAccountHandle.getUserHandle(),
                mFeatureFlags);
                phoneAccountHandle.getComponentName(), phoneAccountHandle.getUserHandle());
        if (service == null) {
            Log.i(this, "Found no connection service.");
            return;
+6 −4
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ public class ConnectionServiceRepository {
    private final Context mContext;
    private final TelecomSystem.SyncRoot mLock;
    private final CallsManager mCallsManager;
    private final FeatureFlags mFeatureFlags;

    private final ServiceBinder.Listener<ConnectionServiceWrapper> mUnbindListener =
            new ServiceBinder.Listener<ConnectionServiceWrapper>() {
@@ -54,18 +55,19 @@ public class ConnectionServiceRepository {
            PhoneAccountRegistrar phoneAccountRegistrar,
            Context context,
            TelecomSystem.SyncRoot lock,
            CallsManager callsManager) {
            CallsManager callsManager,
            FeatureFlags featureFlags) {
        mPhoneAccountRegistrar = phoneAccountRegistrar;
        mContext = context;
        mLock = lock;
        mCallsManager = callsManager;
        mFeatureFlags = featureFlags;
    }

    @VisibleForTesting
    public ConnectionServiceWrapper getService(
            ComponentName componentName,
            UserHandle userHandle,
            FeatureFlags featureFlags) {
            UserHandle userHandle) {
        Pair<ComponentName, UserHandle> cacheKey = Pair.create(componentName, userHandle);
        ConnectionServiceWrapper service = mServiceCache.get(cacheKey);
        if (service == null) {
@@ -77,7 +79,7 @@ public class ConnectionServiceRepository {
                    mContext,
                    mLock,
                    userHandle,
                    featureFlags);
                    mFeatureFlags);
            service.addListener(mUnbindListener);
            mServiceCache.put(cacheKey, service);
        }
+1 −3
Original line number Diff line number Diff line
@@ -1351,7 +1351,6 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
    private final CallsManager mCallsManager;
    private final AppOpsManager mAppOpsManager;
    private final Context mContext;
    private final FeatureFlags mFlags;

    private ConnectionServiceFocusManager.ConnectionServiceFocusListener mConnSvrFocusListener;

@@ -1386,7 +1385,6 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        mCallsManager = callsManager;
        mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
        mContext = context;
        mFlags = featureFlags;
    }

    /** See {@link IConnectionService#addConnectionServiceAdapter}. */
@@ -2540,7 +2538,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                isCallerConnectionManager = true;
            }
            ConnectionServiceWrapper service = mConnectionServiceRepository.getService(
                    handle.getComponentName(), handle.getUserHandle(), mFlags);
                    handle.getComponentName(), handle.getUserHandle());
            if (service != null && service != this) {
                simServices.add(service);
            } else {
+2 −2
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ public class CreateConnectionProcessor implements CreateConnectionResponse {
            Log.i(this, "Trying attempt %s", attempt);
            PhoneAccountHandle phoneAccount = attempt.connectionManagerPhoneAccount;
            mService = mRepository.getService(phoneAccount.getComponentName(),
                    phoneAccount.getUserHandle(), mFlags);
                    phoneAccount.getUserHandle());
            if (mService == null) {
                Log.i(this, "Found no connection service for attempt %s", attempt);
                attemptNextPhoneAccount();
@@ -260,7 +260,7 @@ public class CreateConnectionProcessor implements CreateConnectionResponse {
                        PhoneAccountHandle remotePhoneAccount = attempt.targetPhoneAccount;
                        ConnectionServiceWrapper mRemoteService =
                                mRepository.getService(remotePhoneAccount.getComponentName(),
                                remotePhoneAccount.getUserHandle(), mFlags);
                                remotePhoneAccount.getUserHandle());
                        if (mRemoteService == null) {
                            mCall.setConnectionService(mService);
                        } else {
Loading