Skip to content

Commit

Permalink
add device id
Browse files Browse the repository at this point in the history
  • Loading branch information
vfishv authored and RikkaW committed Nov 19, 2023
1 parent 22ae521 commit 583e768
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/src/main/java/rikka/shizuku/server/ShizukuService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 583e768

Please sign in to comment.