History log of /frameworks/base/services/java/com/android/server/am/ProviderMap.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cbfd23ee6f14445c3e17c5169abbc80c216fa137 11-Jun-2013 Dianne Hackborn <hackbod@google.com> Add new API to retrieve a dumpsys of a single package.

Adds a platform API, and pm command. Fixes some issues with
dumping per-package data in package manager, makes battery
stats able to dump per-package state.

Change-Id: I76ee6d059f0ba17f7a7061886792b1b716d46d2d
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
be4e6aaa0252dd7da28b7aa85beba982538efa46 07-Jun-2013 Dianne Hackborn <hackbod@google.com> Initial super-primitive process tracker.

The goal of this is to keep track of what app processes
are doing, to determine who is being abusive, when the system
is getting into memory constrained situations, and help the
user determine how to resolve this.

Right now it doesn't really do any of that, just keeps track
of how long every process has been running since boot.

Also update the activity manager to use "cached" as the terminology
for what it used to interchangeably call hidden and background
processes, and switch ProcessMap over to using ArrayMap.

Change-Id: I270b0006aab1f38e17b7d9b65728679173c343f2
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
7ad34e5fb2bc8eda0a64377cedf8a8e899644dd9 06-Jun-2013 Dianne Hackborn <hackbod@google.com> Improve debug printing in activity manager.

Dumping per-package data is now much cleaning, and only really
prints information related to the package. Also clean up the
formatting and such of the new activity stack states.

Change-Id: Ie5f31d72b7e77b34fd9acd835f28ed1db1dff328
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
390517be2d60dd6e6264150c190c372d89bb331a 31-May-2013 Dianne Hackborn <hackbod@google.com> Clean up some temporary allocations.

Yay to ArrayMap, letting me get rid of a bunch of temporary
iterators in core code paths like updateOomAdj. (Now I definitely
need an ArraySet to finish that up.)

Also clean up various other things that are doing unnecessary
allocations, clean up some debug output, make more of the debug
output respect package filtering.

Change-Id: Ib4979faf4de8c7912739bc0937c3fa9e7bfcde67
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
2d1b37819112274f538d1886c379ff337eb0d9ed 10-Sep-2012 Dianne Hackborn <hackbod@google.com> Various fixes.

Bug #7132226: Can't start instrumentation due to ActivityManagerService crash
Bug #6912004: tap on gmail notification sends me to home screen

Change-Id: I824128b01f368de95dee288f8e49039b84479a7e
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
5e03e2ca7d25b899b129baad2dd5eca6bf99d88a 06-Sep-2012 Dianne Hackborn <hackbod@google.com> More multi-user stuff:

- New (hidden) isUserRunning() API.
- Maintain LRU list of visited users.
- New FLAG_IS_DATA_ONLY for ApplicationInfo.
- Clean up pending intent records when force-stopping a user (or package).
(Also fixes bug #6880627: PendingIntent.getService() returns stale
intent of force stopped app)
- Fix force-stopping when installing an app to do the force-stop across
all users for that app.
- When selecting which processes to kill during a force stop, do this
based on the actual packages loaded in the process, not just process
name matching.
- You can now use --user option in am when starting activities, services,
and instrumentation.
- The am --user option accepts "current" and "all" as arguments.
- The pm uninstall command now uninstalls for all users, so it matches
the semantics of the install command.
- PhoneWindowManager now explicitly says to start home in the current
user.
- Activity manager call to retrieve the MIME type from a content provider
now takes a user argument, so it will direct this to the proper user.
- The package manager uninstall paths are now implemented around
PackageSetting, not PackageParser.Package. This allows them to work
even if the application's apk has been removed (in which case it only
exists as a PackageSetting, not the PackageParser.Package parsed from
the apk).

Change-Id: I3522f6fcf32603090bd6e01cc90ce70b6c5aae40
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
4120375d46091df8527bb701882e056fbb0e6b06 31-Aug-2012 Dianne Hackborn <hackbod@google.com> Remove Binder.getOrigCallingUid().

Replaced all remaining places that used it with explicit user
specification.

While doing this, I ran into stuff that was creating PendingIntent
objects (that now need to specify the explicit user they are for),
which are also posting notifications... but have no way to specify
the user for the notification.

So the notification manager in the system process now also gets a
formal concept of a user associated with the notification, which
is passed in to all the necessary aidl calls. I also removed the
old deprecated aidl interface for posting/cancelling notifications,
since we now always need a user supplied.

There is more work that needs to be done here, though. For example
I think we need to be able to specify USER_ALL for a notification that
should be shown to all users (such as low storage or low battery).
Along with that, the PendingIntent creation needs to be tweaked to
be able to handle USER_CURRENT by evaluating the user at the point the
pending intent is sent.

That's for another change, however.

Change-Id: I468e14dce8def0e13e0870571e7c31ed32b6310c
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
2d78fa2d2558dc8c6d6400232c742da7936c6204 20-Aug-2012 Amith Yamasani <yamasani@google.com> am ff7735b0: am a3db5297: Merge "ProviderMap: remove hashmap when entire user specific entries are removed"

* commit 'ff7735b0ee8c3347d0f3cb1866e454be0e9534e2':
ProviderMap: remove hashmap when entire user specific entries are removed
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/services/java/com/android/server/am/ProviderMap.java
8809004bc5125d48a1bbfc292509514374cc4fce 16-Aug-2012 Vairavan Srinivasan <vairav@codeaurora.org> ProviderMap: remove hashmap when entire user specific entries are removed

User specific entries in mProvidersByNamePerUser and mProvidersByClassPerUser
isn't cleared when entire user specific providers are removed. Fix is to remove
the user specific hashmap in such cases.

Change-Id: I6edf211ced873e59f3b89ffceb9eceec13ea8f3f
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
f88dd0b32ea2042eb2011170be465259a21d2563 09-Aug-2012 Dianne Hackborn <hackbod@google.com> Small service cleanup.

Get rid of duplication between find/retrieve service funcs; when
a service in a persistent process crashes, restart it immediately
since the persistent process is going to be immediately restarted
anyway; when a new process is attaching, immediately restart any
services associated with it that are waiting to restart, since
it is weird to not let them run if the process comes back for some
other reason.

Change-Id: Id087fe04ebf2b6a4bd00732796c8326364765ea7
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
7d19e0242faac8017033dabb872cdf1542fa184c 08-Aug-2012 Dianne Hackborn <hackbod@google.com> More mult-user API work.

- You can now use android:singleUser with receivers and providers.
- New API to send ordered broadcasts as a user.
- New Process.myUserHandle() API.

For now I am trying out "user handle" as the name for the numbers
representing users.

Change-Id: I754c713ab172494bb4251bc7a37a17324a2e235e
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
6ae8d1821822296df0606c9cd1c46708cc21cb58 23-May-2012 Dianne Hackborn <hackbod@google.com> Fix (mostly) issue #5109947: Race condition between retrieving a...

...content provider and updating its oom adj

This introduces the concept of an "unstable" reference on a content
provider. When holding such a reference (and no normal stable ref),
the content provider dying will not cause the client process to be
killed.

This is used in ContentResolver.query(), .openAssetFileDescriptor(),
and .openTypedAssetFileDescriptor() to first access the provider
with an unstable reference, and if at the point of calling into the
provider we find it is dead then acquiring a new stable reference
and doing the operation again. Thus if the provider process dies
at any point until we get the result back, our own process will not
be killed and we can safely retry the operation.

Arguably there is still the potential for a race -- if somehow the
provider is killed way late by the OOM killer after the query or
open has returned -- but this should now be *extremely* unlikely.
We also continue to have the issue with the other calls, but these
are much less critical, and the same model can't be used there (we
wouldn't want to execute two insert operations for example).

The implementation of this required some significant changes to the
underlying plumbing of content providers, now keeping track of the
two different reference counts, and managing them appropriately. To
facilitate this, the activity manager now has a formal connection
object for a client reference on a content provider, which hands to
the application when opening the provider.

These changes have allowed a lot of the code to be cleaned up and
subtle issues closed. For example, when a process is crashing, we
now have a much better idea of the state of content provider clients
(olding a stable ref, unstable ref, or waiting for it to launch), so
that we can correctly handle each of these.

The client side code is also a fair amount cleaner, though in the
future there is more than should be done. In particular, the two
ProviderClientRecord and ProviderRefCount classes should be combined
into one, part of which is exposed to the ContentResolver internal
API as a reference on a content provider with methods for updating
reference counts and such. Some day we'll do that.

Change-Id: I87b10d1b67573ab899e09ca428f1b556fd669c8c
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
9da2d403344d7e8b67c966db4f064c4c7a2f5901 15-Mar-2012 Dianne Hackborn <hackbod@google.com> Fix swiping away recents to always kill processes.

This would only kill processes if there were activities associated
with the recent task; now it always kills processes.

Always fix some debug output.

Change-Id: Iccda19ba0a20823347b06c13b450587283d28284
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
37ce3a8af6faab675319d0803b288ab1dddc76be 06-Feb-2012 Amith Yamasani <yamasani@google.com> Multi-user - wallpaper service

- Allow each user to have their own wallpaper (live or static).
- Migrate old wallpaper on upgrade.
- Update SystemBackupAgent to backup/restore from primary user's
new wallpaper directory.

Reduce dependency on Binder.getOrigCallingUser() by passing the
userId for bindService.

Change-Id: I19c8c3296d3d2efa7f28f951d4b84407489e2166
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
de7408c94e09a34fe0779ee894c64b4315aec17c 08-Feb-2012 Marco Nelissen <marcone@google.com> Fix "dumpsys activity provider"

Change-Id: Ic0678a6edb539bb5648529dd9c38a382bc9cc3fb
/frameworks/base/services/java/com/android/server/am/ProviderMap.java
742a67127366c376fdf188ff99ba30b27d3bf90c 04-May-2011 Amith Yamasani <yamasani@google.com> Multi-user - 1st major checkin

Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)

Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.

Commands added to pm and am to allow creating and switching profiles.

Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
/frameworks/base/services/java/com/android/server/am/ProviderMap.java