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

Commit 5adc858b authored by Santos Cordon's avatar Santos Cordon Committed by Android (Google) Code Review
Browse files

Merge "Dont clear serviceConnections on subsequent bind() calls." into lmp-dev

parents 72d271c4 4f50f8e2
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -261,8 +261,6 @@ public final class InCallController extends CallsManagerListenerBase {
    private void bind() {
        ThreadUtil.checkOnMainThread();
        if (mInCallServices.isEmpty()) {
            mServiceConnections.clear();

            PackageManager packageManager = mContext.getPackageManager();
            Intent serviceIntent = new Intent(InCallService.SERVICE_INTERFACE);

@@ -289,11 +287,14 @@ public final class InCallController extends CallsManagerListenerBase {
                        continue;
                    }

                    Log.i(this, "Attempting to bind to InCall " + serviceInfo.packageName);
                    InCallServiceConnection inCallServiceConnection = new InCallServiceConnection();
                    ComponentName componentName = new ComponentName(serviceInfo.packageName,
                            serviceInfo.name);

                    Log.i(this, "Attempting to bind to InCall %s, is dupe? %b ",
                            serviceInfo.packageName,
                            mServiceConnections.containsKey(componentName));

                    if (!mServiceConnections.containsKey(componentName)) {
                        Intent intent = new Intent(InCallService.SERVICE_INTERFACE);
                        intent.setComponent(componentName);