History log of /frameworks/base/core/java/android/os/UserHandle.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
48aa86bd0b30815f4c02561f713bd33b032ef2b7 10-Feb-2016 Jeff Davidson <jpd@google.com> Expose APIs to analyze UIDs in UserHandle/Process.

Clients of the NetworkStatsManager public APIs may get UIDs belonging
to other users, and UIDs which don't actually represent applications.
These APIs allow clients to understand whether a given ID belongs to
the same user as themselves, and whether an ID represents an
application or something else (e.g. a system UID).

Change-Id: Ia56d5891521ce98e5594c41da8f9d756819deb66
/frameworks/base/core/java/android/os/UserHandle.java
47f7108c1270a9e81d9560b6b0570c659bb93a71 02-Feb-2016 Jeff Sharkey <jsharkey@android.com> Prepare user storage just before using it.

Wire up preparing of user-specific app storage to existing user
lifecycle hooks. This way we're sure the storage is ready to roll
just before we start reconciling app data directories.

This also has the nice property that we only prepare storage when
we know that keys are unlocked.

Bug: 25796509
Change-Id: Ic7df9ddbcfb1e20649d11b6cf68d424e3c365ee1
/frameworks/base/core/java/android/os/UserHandle.java
940e8577a1569140521fb605336997863529f7ad 26-Jan-2016 Fyodor Kupolov <fkupolov@google.com> Added SystemApi for getting serial numbers of users

Also added UserHandle version of queryBroadcastReceiversAsUser.

Bug: 25844894
Change-Id: I78ecbef186e4ced10425ae2899db72c2d91c5792
/frameworks/base/core/java/android/os/UserHandle.java
cd65448ccd13c4c2d0fe9e9623fec3a898ab9372 09-Jan-2016 Jeff Sharkey <jsharkey@android.com> Even more PackageManager caller triage.

Finish moving all UID/GID callers to single AIDL method that requires
callers to provide flags.

Triage AppWidgets and PrintServices, which currently can only live on
internal storage; we should revisit that later.

Fix two bugs where we'd drop pending install sessions and persisted
Uri grants for apps installed on external storage.

Bug: 26471205
Change-Id: I66fdfc737fda0042050d81ff8839de55c2b4effd
/frameworks/base/core/java/android/os/UserHandle.java
8588bc1ef1f020bbe4a24d46874f675708149a57 07-Jan-2016 Jeff Sharkey <jsharkey@android.com> Add flags to requests for package UID/GIDs.

This gives callers the ability to request details for missing
packages. Also add annotations for userId and appId variables and
start tagging their usage.

Change-Id: I63d5d7f870ac4b7ebae501e0ba4f40e08b14f3f6
/frameworks/base/core/java/android/os/UserHandle.java
a73b8fd1f4faaad00d8a49d6e496aaf249fa7003 07-Jan-2016 Jeff Sharkey <jsharkey@android.com> Add some TestApis to fix build.

Change-Id: Icf0d8d63f3a41d99e46ebe96003863bae637bd9d
/frameworks/base/core/java/android/os/UserHandle.java
3cdb56efea044112bfe1b97b3ed78ee05e0dba46 11-Nov-2015 Dianne Hackborn <hackbod@google.com> Some debugging improvements.

- Fix dumping of package manager intent filters so the option
to print the filter detail works again.
- Extend dump resolvers to allow you to specify the specific
types of resolvers you'd like to dump.
- Add new package manager commands for querying activities,
services, receivers.
- Move the code for parsing a command line into an intent to
the framework, so it can be used by the new package manager
commands and later elsewhere.

Change-Id: I56ea2bb8c3dd0e5198ee333be8f41ad9dcdb626f
/frameworks/base/core/java/android/os/UserHandle.java
1fa7680c9cd2d6a8ae44ce9e90f2ba5dee47b219 13-Oct-2015 Xiaohui Chen <xiaohuic@google.com> Add UserHandle.isSystem() api

This is added in order to deprecate the isOwner() api.

Bug: 24869636
Change-Id: I80a7a5559525faf261b9d9c7a8593e6ff5db4b22
/frameworks/base/core/java/android/os/UserHandle.java
02cb6e773b323a0d54b21f43460a23f668b7727c 19-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Added --restricted option for create-user command

Also moved restricted profile create/setup logic from Settings to
UMS.createRestrictedProfile.

Bug: 24212155
Bug: 24303609
Change-Id: I0346a3368de53f4bb4b6e054349f19adac959d7f
/frameworks/base/core/java/android/os/UserHandle.java
9249a9097707bb57ae0a7d114eff54bc82ad462d 26-Sep-2015 Bart Sears <bsears@google.com> Revert "Added --restricted option for create-user command"

This reverts commit 737b216b5c28f7d7162f219136d4e8a9eb1a486b.

Change-Id: I4c43967933bb2e46cdb8ad6e643d7037d722cab2
/frameworks/base/core/java/android/os/UserHandle.java
737b216b5c28f7d7162f219136d4e8a9eb1a486b 19-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Added --restricted option for create-user command

Also moved restricted profile create/setup logic from Settings to
UMS.createRestrictedProfile.

Bug: 24212155
Bug: 24303609
Change-Id: I5f0d48bcbd3c0b51927926b874fd057c15ac5219
/frameworks/base/core/java/android/os/UserHandle.java
eecb98197c4115744b6c4285758f6575e13e4f96 16-Sep-2015 Xiaohui Chen <xiaohuic@google.com> Refactor UserHandle.java

Remove the "final" keyword on methods, since the class is already
"final".

Change-Id: Ided5813d8a5417c492fd2bf73f9d8018140e5594
/frameworks/base/core/java/android/os/UserHandle.java
7c69636c9a406265e1da368f3edfd8fb9651132c 16-Sep-2015 Xiaohui Chen <xiaohuic@google.com> Cleanup USER_OWNER in various services

Bug: 19913735
Change-Id: I980370bab18e1b9ccf4043eed2b9fd721a940f72
/frameworks/base/core/java/android/os/UserHandle.java
e789fc02ae0259932f5738cca15b623038f8ff94 14-Aug-2015 Adam Lesinski <adamlesinski@google.com> am c852a3e3: am eb694bb6: am 546909c9: am 479c482c: am 504600bb: Merge "Fix UserHandle.getAppIdFromSharedAppGid to allow system UIDs" into mnc-dev

* commit 'c852a3e39c1bbb112e2705edc6714b6b687cb55d':
Fix UserHandle.getAppIdFromSharedAppGid to allow system UIDs
621e06a64d0a18f357a874de15a84c3ec1d64d49 14-Aug-2015 Adam Lesinski <adamlesinski@google.com> Fix UserHandle.getAppIdFromSharedAppGid to allow system UIDs

System UIDs are also run as shared GIDs, so this should not throw
an exception.

Bug:23189342
Change-Id: Ia180db012c25615cde1720ae0d41d1378f7bfb1a
/frameworks/base/core/java/android/os/UserHandle.java
9776c69790e474ef77566f8a0fc9c70106a675a5 04-Jul-2015 Dianne Hackborn <hackbod@google.com> am 9fac4c59: am 71b97214: am 36e52cdc: Merge "Device idle fixes: issue #22209630 and issue #22225665" into mnc-dev

* commit '9fac4c590568ae86efe597456955cc4a42ddc8d9':
Device idle fixes: issue #22209630 and issue #22225665
3b16cf4f47142a845bf0ede54ef8ef956506c6c3 02-Jul-2015 Dianne Hackborn <hackbod@google.com> Device idle fixes: issue #22209630 and issue #22225665

Issue #22209630: Only allow whitelisted apps to put apps on the temp whitelist

We now check whether the calling app is a system uid or in the whitelist
and, if not, throw an exception.

Issue #22225665: Alarm still goes off in idle mode (doze)

Fix a bug where we were not clearing the calling identity when coming
through the dump command to the service, and as a result when we would
eventually call out to the alarm manager it wouldn't do what we want.
This was only broken when being controlled by the shell.

Also adjust the network policy manager service's handling of device
idle transitions to only toggle the device idle state, which gets rid
of the long delay we have coming out of idle mode. And add in a bit
of logging around going in/out of idle mode to try to understand where
things may be slow in the future.

Change-Id: I4a41f790e9b0bb31330314b94111557d479f2ba5
/frameworks/base/core/java/android/os/UserHandle.java
e8e322fe3ce9159b31bb9f4d991a991a1469f7d5 01-Jul-2015 Adam Lesinski <adamlesinski@google.com> am 0a7b6d6c: am 509dbdb6: am 49a2a698: Merge "Add helper function to extract app ID from shared app gid." into mnc-dev

* commit '0a7b6d6cf9c73d63339dc0b4cb7867cb90b038db':
Add helper function to extract app ID from shared app gid.
f4216d30cd768638eebdb4124abae95bdf5b3597 27-Jun-2015 Adam Lesinski <adamlesinski@google.com> Add helper function to extract app ID from shared app gid.

Bug:22008744
Change-Id: Ifadc7df3777dd74932833f4d22a0e285d7bdaf95
/frameworks/base/core/java/android/os/UserHandle.java
70f6c38644a4a6e28c016c265e6987bf00dd61f1 28-Apr-2015 Xiaohui Chen <xiaohuic@google.com> Introduce system user and primary user.

Bug: 19913735
Change-Id: I2c7855915d778cf80a7154314321ddd90e2eaaac
/frameworks/base/core/java/android/os/UserHandle.java
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/core/java/android/os/UserHandle.java
b6e0cb97b7d8e4acf345efc8066f1587408b83e0 25-Nov-2014 Alan Viverette <alanv@google.com> Load SPEAK_PASSWORD from currently active user rather than self

Also fixes a typo in UserHandle's docs.

BUG: 18295054
Change-Id: I1f5384f84062b9ea7dcbebe1e5f64af331028d41
/frameworks/base/core/java/android/os/UserHandle.java
0e8d7d63ba439cc0604af7055679dae3d30fdc48 03-Sep-2014 Amith Yamasani <yamasani@google.com> Add some @SystemApi tags for internal user-related APIs

Also added an internal isManagedProfile()

Bug: 17371392
Change-Id: Ibcc26771d954505cbd530192bf4a8a25a8d4cae0
/frameworks/base/core/java/android/os/UserHandle.java
cbd7a6ecbb7aa5a4ea146cf05f1ec254eb3e60b9 06-Aug-2014 Christopher Tate <ctate@google.com> Introduce system API for distinguishing the owner user

Support services that special case the owner but are instantiated
per-user, and so need to be able to distinguish.

Bug 16661321

Change-Id: I7ff5168c91e39821317fdf5cfaba34e90d30de95
/frameworks/base/core/java/android/os/UserHandle.java
c1cf161af036e0f337b58ef0739a8ff2e42f01e7 05-Jun-2014 Alexandra Gherghina <alexgherghina@google.com> Modifies APIs for retrieving managed profile accounts.

This is needed for Account Settings UI.

Bug: 13656853
Change-Id: I33129e4b7b33b428a7bf670259accacb60f62d9b
/frameworks/base/core/java/android/os/UserHandle.java
e66b6890ee59d108ae5c608f6ec8d4ad20cb06a8 29-Apr-2014 Robin Lee <rgl@google.com> Assign AID_EVERYONE gid to newly-created processes

Change-Id: I0ec45e07d77a4e6a47b6ba0d761c8375f433f528
/frameworks/base/core/java/android/os/UserHandle.java
a4cc205ee840a5374a96c9635dc5121d82a3eaf9 09-Jul-2013 Dianne Hackborn <hackbod@google.com> More procstats work.

The historical data is now a more central part of the stats.
When a checkin happens, the data is not deleted, just marked
as checked in so we can continue to access it.

The default procstats dump is now a new "summary" mode that
shows a more useful set of data for all of the running processes.
By default the current and all committed states are shown; you
use "--current" to only show the current. Use "--details" to
get the previous more detailed data (which now includes detailed
process data like the per-package data).

Also tweaked uid printing to be a little more compact.

Change-Id: I5414ea7c07134ebd5dc83f6f7b9f6e30151eda85
/frameworks/base/core/java/android/os/UserHandle.java
a06de0f29b58df9246779cc4bfd8f06f7205ddb6 12-Dec-2012 Dianne Hackborn <hackbod@google.com> New "app ops" service.

Initial implementation, tracking use of the vibrator, GPS,
and location reports.

Also includes an update to battery stats to also keep track of
vibrator usage (since I had to be in the vibrator code anyway
to instrument it).

The service itself is only half-done. Currently no API to
retrieve the data (which once there will allow us to show you
which apps are currently causing the GPS to run and who has
recently accessed your location), it doesn't persist its data
like it should, and no way to tell it to reject app requests
for various operations.

But hey, it's a start!

Change-Id: I05b8d76cc4a4f7f37bc758c1701f51f9e0550e15
/frameworks/base/core/java/android/os/UserHandle.java
d0c6ccbafdebc73d03cf3cd47f02f9f6c78a69ff 15-Sep-2012 Jeff Sharkey <jsharkey@android.com> Move NetworkPolicy from apps to UID.

For multi-user devices, switch to storing policy per-user instead of
per-app. Also watch for user added/removed broadcasts to clean up
policies and apply global restrictions.

Bug: 7121279
Change-Id: Ia7326bd0ebe0586fa4ec6d3a62f6313dc8814007
/frameworks/base/core/java/android/os/UserHandle.java
e091f22e226f7177e45e23850670c1ad9b63fd75 12-Sep-2012 Kenny Root <kroot@google.com> Use shared app gid for forward-locked processes

Use a shared app gid for each app across different users which allows
forward-locked applications to share the same APK file.

Change-Id: Ifecf51ee7865547117746f83e9733083d3dd5111
/frameworks/base/core/java/android/os/UserHandle.java
8a9f5d42a5cc373439ee8bbb9185dcce9086770d 11-Sep-2012 Dianne Hackborn <hackbod@google.com> USER_CURRENT_OR_SELF had the same int as USER_CURRENT!

Change-Id: I0f2b0fa4fb82d1f871450b509a7a4d13e9817320
/frameworks/base/core/java/android/os/UserHandle.java
5ac72a29593ab9a20337a2225df52bdf4754be02 30-Aug-2012 Dianne Hackborn <hackbod@google.com> Improve multi-user broadcasts.

You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
/frameworks/base/core/java/android/os/UserHandle.java
7767eac3232ba2fb9828766813cdb481d6a97584 24-Aug-2012 Dianne Hackborn <hackbod@google.com> Keep track of whether an app is installed for each user.

This add a new per-user state for an app, indicating whether
it is installed for that user.

All system apps are always installed for all users (we still
use disable to "uninstall" them).

Now when you call into the package manager to install an app,
it will only install the app for that user unless you supply
a flag saying to install for all users. Only being installed
for the user is just the normal install state, but all other
users have marked in their state for that app that it is not
installed.

When you call the package manager APIs for information about
apps, uninstalled apps are treated as really being not visible
(somewhat more-so than disabled apps), unless you use the
GET_UNINSTALLED_PACKAGES flag.

If another user calls to install an app that is already installed,
just not for them, then the normal install process takes place
but in addition that user's installed state is toggled on.

The package manager will not send PACKAGE_ADDED, PACKAGE_REMOVED,
PACKAGE_REPLACED etc broadcasts to users who don't have a package
installed or not being involved in a change in the install state.
There are a few things that are not quite right with this -- for
example if you go through a full install (with a new apk) of an
app for one user who doesn't have it already installed, you will
still get the PACKAGED_REPLACED messages even though this is
technically the first install for your user. I'm not sure how
much of an issue this is.

When you call the existing API to uninstall an app, this toggles
the installed state of the app for that user to be off. Only if
that is the last user user that has the app uinstalled will it
actually be removed from the device. Again there is a new flag
you can pass in to force the app to be uninstalled for all users.

Also fixed issues with cleaning external storage of apps, which
was not dealing with multiple users. We now keep track of cleaning
each user for each package.

Change-Id: I00e66452b149defc08c5e0183fa673f532465ed5
/frameworks/base/core/java/android/os/UserHandle.java
79af1dd54c16cde063152922b42c96d72ae9eca8 17-Aug-2012 Dianne Hackborn <hackbod@google.com> Switch public APIs to use new UserHandle class for identifying users.

Gets rid of "yet another integer" confusion.

Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
/frameworks/base/core/java/android/os/UserHandle.java
f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Rename UserId to UserHandle.

This is the start of turning this into a formal public API.

Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
/frameworks/base/core/java/android/os/UserHandle.java