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

Commit 9e70a422 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Add UserHandle.getAppId to SystemApi

This is consistent with other methods in this class, and unbundled
system apps such as the network stack need this API to verify their
callers regardless of the userid. The method is already marked as
TestApi.

Test: m
Bug: 123655057
Change-Id: I0ecef4abcd850dc641cd70681a56cb038778c04c
parent 9fdc6d29
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4303,6 +4303,7 @@ package android.os {
  }
  public final class UserHandle implements android.os.Parcelable {
    method public static int getAppId(int);
    method public int getIdentifier();
    method @Deprecated public boolean isOwner();
    method public boolean isSystem();
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ public final class UserHandle implements Parcelable {
     * @hide
     */
    @TestApi
    @SystemApi
    public static @AppIdInt int getAppId(int uid) {
        return uid % PER_USER_RANGE;
    }