Loading services/companion/java/com/android/server/companion/RolesUtils.java +7 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.annotation.UserIdInt; import android.app.role.RoleManager; import android.companion.AssociationInfo; import android.content.Context; import android.os.Binder; import android.os.UserHandle; import android.util.Log; import android.util.Slog; Loading Loading @@ -84,6 +85,8 @@ final class RolesUtils { Slog.i(TAG, "Removing CDM role holder, role=" + deviceProfile + ", package=u" + userId + "\\" + packageName); final long identity = Binder.clearCallingIdentity(); try { roleManager.removeRoleHolderAsUser(deviceProfile, packageName, MANAGE_HOLDERS_FLAG_DONT_KILL_APP, userHandle, context.getMainExecutor(), success -> { Loading @@ -92,6 +95,9 @@ final class RolesUtils { + " from the list of " + deviceProfile + " holders."); } }); } finally { Binder.restoreCallingIdentity(identity); } } private RolesUtils() {}; Loading Loading
services/companion/java/com/android/server/companion/RolesUtils.java +7 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.annotation.UserIdInt; import android.app.role.RoleManager; import android.companion.AssociationInfo; import android.content.Context; import android.os.Binder; import android.os.UserHandle; import android.util.Log; import android.util.Slog; Loading Loading @@ -84,6 +85,8 @@ final class RolesUtils { Slog.i(TAG, "Removing CDM role holder, role=" + deviceProfile + ", package=u" + userId + "\\" + packageName); final long identity = Binder.clearCallingIdentity(); try { roleManager.removeRoleHolderAsUser(deviceProfile, packageName, MANAGE_HOLDERS_FLAG_DONT_KILL_APP, userHandle, context.getMainExecutor(), success -> { Loading @@ -92,6 +95,9 @@ final class RolesUtils { + " from the list of " + deviceProfile + " holders."); } }); } finally { Binder.restoreCallingIdentity(identity); } } private RolesUtils() {}; Loading