Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e1ad7f8 authored by Chaohui Wang's avatar Chaohui Wang
Browse files

Add ApplicationInfo.userHandle

Bug: 235727273
Test: Manual with Settings App
Change-Id: I42863c8be83f6321c04b40635e9ad39efed95ce5
parent e275759b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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"