From 583e768e67954707c76d73e586148bb5740956a3 Mon Sep 17 00:00:00 2001 From: Q Date: Sun, 19 Nov 2023 11:18:27 +0800 Subject: [PATCH] add device id --- .../main/java/rikka/shizuku/server/ShizukuService.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/rikka/shizuku/server/ShizukuService.java b/server/src/main/java/rikka/shizuku/server/ShizukuService.java index 7a850af1c..1654342ce 100644 --- a/server/src/main/java/rikka/shizuku/server/ShizukuService.java +++ b/server/src/main/java/rikka/shizuku/server/ShizukuService.java @@ -316,10 +316,11 @@ public void dispatchPermissionConfirmationResult(int requestUid, int requestPid, continue; } + int deviceId = 0;//Context.DEVICE_ID_DEFAULT if (allowed) { - PermissionManagerApis.grantRuntimePermission(packageName, PERMISSION, userId); + PermissionManagerApis.grantRuntimePermission(packageName, PERMISSION, deviceId, userId); } else { - PermissionManagerApis.revokeRuntimePermission(packageName, PERMISSION, userId); + PermissionManagerApis.revokeRuntimePermission(packageName, PERMISSION, deviceId, userId); } } } @@ -390,10 +391,11 @@ public void updateFlagsForUid(int uid, int mask, int value) throws RemoteExcepti continue; } + int deviceId = 0;//Context.DEVICE_ID_DEFAULT if (allowed) { - PermissionManagerApis.grantRuntimePermission(packageName, PERMISSION, userId); + PermissionManagerApis.grantRuntimePermission(packageName, PERMISSION, deviceId, userId); } else { - PermissionManagerApis.revokeRuntimePermission(packageName, PERMISSION, userId); + PermissionManagerApis.revokeRuntimePermission(packageName, PERMISSION, deviceId, userId); } // TODO kill user service using