Don't make assumptions about the current user serial

Fix #1157
This commit is contained in:
MM20
2024-12-21 18:45:54 +01:00
parent 9d98756fa7
commit f11b20a865
3 changed files with 6 additions and 5 deletions
@@ -6,7 +6,6 @@ import android.os.UserHandle
import android.os.UserManager
fun UserHandle.getSerialNumber(context: Context): Long {
if (this == Process.myUserHandle()) return 0L
val userManager = context.getSystemService(Context.USER_SERVICE) as UserManager
return userManager.getSerialNumberForUser(this)
}