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

Commit 21c6a7f9 authored by Guojing Yuan's avatar Guojing Yuan
Browse files

[CDM] Remove role holders onPackageRemoveOrDataClearInternal

Fix: 215661412

Test: CTS tests
Change-Id: Idfb7cc81c62b147edc474eefe72b11fdefff1485
parent bb4bc860
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@

package com.android.server.companion;

import static android.Manifest.permission.DELIVER_COMPANION_MESSAGES;
import static android.Manifest.permission.MANAGE_COMPANION_DEVICES;
import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_VISIBLE;
import static android.content.pm.PackageManager.CERT_INPUT_SHA256;
@@ -88,7 +87,6 @@ import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.util.ArraySet;
import android.util.Base64;
import android.util.ExceptionUtils;
import android.util.Log;
import android.util.Slog;
@@ -501,6 +499,10 @@ public class CompanionDeviceManagerService extends SystemService {
        for (AssociationInfo association : associationsForPackage) {
            mAssociationStore.removeAssociation(association.getId());
        }
        // Clear role holders
        for (AssociationInfo association : associationsForPackage) {
            maybeRemoveRoleHolderForAssociation(association);
        }

        mCompanionAppController.onPackagesChanged(userId);
    }