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

Commit 7e378832 authored by Eugene Susla's avatar Eugene Susla
Browse files

Don't require MANAGE_ROLE_HOLDERS when removing CDM associatons

Test: manual, using a test app
Fixes: 176133554
Change-Id: Iaeb2eee9936c3ebd8772ad3c8790b3c592b2e401
parent 65144f2e
Loading
Loading
Loading
Loading
+19 −14
Original line number Diff line number Diff line
@@ -612,6 +612,8 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
                        + " for " + association
                        + " - profile still present in " + otherAssociationWithDeviceProfile);
            } else {
                long identity = Binder.clearCallingIdentity();
                try {
                    mRoleManager.removeRoleHolderAsUser(
                            association.getDeviceProfile(),
                            association.getPackageName(),
@@ -626,6 +628,9 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
                                            + " for user " + association.getUserId());
                                }
                            });
                } finally {
                    Binder.restoreCallingIdentity(identity);
                }
            }
        }
    }