Language

Process.AreUidsForSameApplication(Int32, Int32) Method

Definition

Returns true if the two UIDs belong to the same application, taking mathematically mapped UIDs (such as Private Compute Core sandbox) into account.

[Android.Runtime.Register("areUidsForSameApplication", "(II)Z", "", ApiSince=37)]
public static bool AreUidsForSameApplication(int uid1, int uid2);
[<Android.Runtime.Register("areUidsForSameApplication", "(II)Z", "", ApiSince=37)>]
static member AreUidsForSameApplication : int * int -> bool

Parameters

uid1
Int32

The first UID to compare, which can be an application UID or its mapped Private Compute Core UID.

uid2
Int32

The second UID to compare, which can be an application UID or its mapped Private Compute Core UID.

Returns

true if the UIDs are equal after mapping any Private Compute Core UIDs to application UIDs; otherwise, false. UIDs for different Android users do not compare equal.

Attributes

Remarks

Returns true if the two UIDs belong to the same application, taking mathematically mapped UIDs (such as Private Compute Core sandbox) into account.

This method is user-aware. It will return false if the UIDs belong to different users, even if they map to the same base App ID.

Android reference for android.os.Process.areUidsForSameApplication.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to