diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2017-01-03 19:56:07 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2017-01-03 19:56:07 +0000 |
| commit | dbc2ef417b5689dc502c52312e99f5dc2fd730a3 (patch) | |
| tree | 70248bb119f0ca04a0ea256458be34c0393637fc /core/java/android/os/UserHandle.java | |
| parent | 7751269d37c571716573081da425937ea1fdbdec (diff) | |
| parent | 7664e6188574a6a10b5dcb70791b15fe3a8c4707 (diff) | |
Merge "Offer to measure disk stats using quotas." am: f8720b95be am: 4b80a4a372 am: 1e1cdbead1
am: 7664e61885
Change-Id: I91c0810aad2ec530650855bcd2f1d25c309717a1
Diffstat (limited to 'core/java/android/os/UserHandle.java')
| -rw-r--r-- | core/java/android/os/UserHandle.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java index b04d149c3427..4aec8aea24c5 100644 --- a/core/java/android/os/UserHandle.java +++ b/core/java/android/os/UserHandle.java @@ -215,6 +215,15 @@ public final class UserHandle implements Parcelable { } /** + * Returns the cache GID for a given UID or appId. + * @hide + */ + public static int getCacheAppGid(int id) { + return Process.FIRST_APPLICATION_CACHE_GID + (id % PER_USER_RANGE) + - Process.FIRST_APPLICATION_UID; + } + + /** * Generate a text representation of the uid, breaking out its individual * components -- user, app, isolated, etc. * @hide |
