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

Commit 461cb38a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[CDM bug] Fix CDM crash when there's no CDM service" into tm-dev am: e2a47a2c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988949

Change-Id: I9a1e51d7da578a5fc684fb2f772286f6110c13bf
parents 7a8cf63d e2a47a2c
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -118,8 +118,6 @@ class CompanionApplicationController {

            serviceConnectors = CollectionUtils.map(companionServices, componentName ->
                            new CompanionDeviceServiceConnector(mContext, userId, componentName));
            mBoundCompanionApplications.setValueForPackage(userId, packageName, serviceConnectors);
        }

            if (serviceConnectors.isEmpty()) {
                Slog.e(TAG, "Can't find CompanionDeviceService implementer in package: "
@@ -127,6 +125,9 @@ class CompanionApplicationController {
                return;
            }

            mBoundCompanionApplications.setValueForPackage(userId, packageName, serviceConnectors);
        }

        // The first connector in the list is always the primary connector: set a listener to it.
        serviceConnectors.get(0).setListener(this::onPrimaryServiceBindingDied);