Skip to content

Commit

Permalink
When the uid fails to be obtained, an exception is thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
Houvven committed May 16, 2024
1 parent 83f88d2 commit 75dd76e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public LServiceBridge(Context ctx, String apkPath) {
this.pm = ctx.getPackageManager();
try {
int uid = getUid(apkPath);
if (uid == -1) {
throw new RuntimeException("get uid failed.");
}
Os.setuid(uid);
if (isInstalledAutomatically) {
// 异步执行
Expand Down

0 comments on commit 75dd76e

Please sign in to comment.