diff options
Diffstat (limited to 'PermissionController/role-controller/java/com/android/role/controller/behavior/CompanionDeviceGlassesRoleBehavior.java')
-rw-r--r-- | PermissionController/role-controller/java/com/android/role/controller/behavior/CompanionDeviceGlassesRoleBehavior.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/PermissionController/role-controller/java/com/android/role/controller/behavior/CompanionDeviceGlassesRoleBehavior.java b/PermissionController/role-controller/java/com/android/role/controller/behavior/CompanionDeviceGlassesRoleBehavior.java index 136c64cd8..429c03de3 100644 --- a/PermissionController/role-controller/java/com/android/role/controller/behavior/CompanionDeviceGlassesRoleBehavior.java +++ b/PermissionController/role-controller/java/com/android/role/controller/behavior/CompanionDeviceGlassesRoleBehavior.java @@ -17,7 +17,6 @@ package com.android.role.controller.behavior; import android.content.Context; -import android.os.Process; import android.os.UserHandle; import androidx.annotation.NonNull; @@ -32,14 +31,14 @@ import com.android.role.controller.util.NotificationUtils; public class CompanionDeviceGlassesRoleBehavior implements RoleBehavior { @Override - public void grant(@NonNull Role role, @NonNull String packageName, @NonNull Context context) { - UserHandle user = Process.myUserHandle(); + public void grantAsUser(@NonNull Role role, @NonNull String packageName, + @NonNull UserHandle user, @NonNull Context context) { NotificationUtils.grantNotificationAccessForPackageAsUser(packageName, user, context); } @Override - public void revoke(@NonNull Role role, @NonNull String packageName, @NonNull Context context) { - UserHandle user = Process.myUserHandle(); + public void revokeAsUser(@NonNull Role role, @NonNull String packageName, + @NonNull UserHandle user, @NonNull Context context) { NotificationUtils.revokeNotificationAccessForPackageAsUser(packageName, user, context); } } |