Add ApplicationInfo.userHandle

Bug: 235727273
Test: Manual with Settings App
Change-Id: I42863c8be83f6321c04b40635e9ad39efed95ce5
This commit is contained in:
Chaohui Wang
2022-09-19 15:57:06 +08:00
parent e275759b54
commit 8e1ad7f884

View File

@@ -22,4 +22,7 @@ import android.os.UserHandle
val ApplicationInfo.userId: Int
get() = UserHandle.getUserId(uid)
val ApplicationInfo.userHandle: UserHandle
get() = UserHandle.getUserHandleForUid(uid)
fun ApplicationInfo.toRoute() = "$packageName/$userId"