Now when memory low, if a service's process is above
a selected pss, then the process is not allowed to go
in to the service a list.
Also simplified the normal meminfo details dump to not
include the shared dirty and shared clean sizes by
default, since these can be very confusing. You will
still get to see them with the "-a" flag.
Finally some small steps to better managing service
processes in the LRU list, so hopefully we can some
day be better about letting them drop down in the list
when there isn't really much interesting happening in
the process. Not yet used at this point.
Change-Id: I654bfd6d05de2a63120185ebb15ffda8cbeb5dac
Change our Intent flag to indicate that a Uri permission grant is
persistable, but don't actually persist it until explicitly taken by
the receiving app. This prevents apps from spamming each other if
persisted permissions aren't really required.
Remember the last time a persisted grant was taken by an app, and
use this to prune away the oldest grants when the number of grants
grows too large. Allow apps to query persisted grants they are
holding, and allow them to release previously persisted grants. Add
public UriPermission class to return grant details and timestamp.
Track various permission strengths separately, and combine together
after each mutation pass. Persistable grants are currently treated
like global grants, but they could be moved to have owners in the
future. Require that grant holders trying to extend a persistable
permission actually hold a persistable permission themselves.
Bug: 10835779
Change-Id: I95b2f797c04ce7fd2612f9a644685dbd44e03759
The previous fix for keeping activities from running on startup,
ag/363992, was keeping the home task from launching when the
keyguard should have allowed it.
This fix permits the home activity to launch in such situations.
Fixes bug 10916877.
Change-Id: I429f0d5a13e06a247b9b6b7241f9a3514044c371
The problem was that the ResolverActivity filters some activities
out of the list it shows, but it uses that display list as the
list of components the preference is set against when ultimately
setting it on the package manager... but that filtered list is *not*
the right component set, since it is not the same as the package
manager's view on it.
The fix here is to retain the original set of matching components
and use that when setting the preferred activity. Note that this
does mean that in very unusual cases where filtering is happeing
(such as one of the activities not being exported but being seen
as a possible completion from another app), then you will be setting
the preference for the complete set. Ultimately we probably need
to have the package manager apply these filtering rules up-front so
this is all consistent, but this is a very rare case so not that
important.
And then most of the change here is just improving the debug
output for intent resolution.
Change-Id: Ie35ac2c05a45946439951bbf41433c8b7de79c05
Following boot the initial activity was automatically resumed even if
a lockscreen is obscuring it. Refer to CL 363859 for why this breaks
things.
This fix pauses all activities the first time a lockscreen appears.
Completes the fix for bug 10732489.
Change-Id: I6fcac14b574c495aa0e16d798cddc1263c6b4c25
Method had been rewritten to be task-based and there were errors
when a task had no apptokens. New version is much easier to
maintain.
Maybe fixes bug 10689184.
Change-Id: I5e4c8447a33a4f5686296c20b9f9fe302c9ae49f
1. The fused printers provider was dropping on the floor received printers
if it was not active. It is in fact a loaded and if not active it should compute
the printers and not deliver them until activated. This fixes an issue where
opening the print dialog, then enabling a print service results in the printers
reported by the service not showing up in the print dialog.
2. Printer discovery session was created twice which leads to incorrect behavior
as the pint system is designed around the contract that there is a single
printer discovery session per service at a time. This was possible due to an
incorrect initialization of a member variable resulting in double session creation
when the print service is connected.
3. When a print service is enabled during discovery we did not use the correct
condition to start printer discovery resulting in starting it all the time even if
not needed. Also if some of the printers that had to be tracked are reported
by the service just enabled (typically historical printers) we did not ask the
service to start tracking them.
4. Removed some logging.
bug:10903343
Change-Id: I46c049471a4b099fc668df3aee2aaedc8d7786ac
...ActivityManagerService.updateLruProcessInternalLocked on bluetooth
Don't try to move process records associated with dead service
connections.
Technically we should probably be clearing the binding/service's
app entry so we don't get into this case, but the least intrusive
change for now is this check.
Change-Id: I6683e692eb5a8fa4f8ec1fa31bd63ec3d7f878ef
...activity chooser from being shown
Add more useful output when intent filter debugging is enabled.
Change-Id: I3722b03ed625046398e81233cf7fb6aa5ded5eca
Changed public constants from integers to strings. Internally
everything is still integers, since we want that more efficient
representation for most things.
Changed the Callback interface to OnOpChangedListener. We also
have a private versin that again takes an int, and tricks to
make both work.
Reworked the class documentation to be appropriate to the SDK
(as much as it can be); most of the existing documentation is
moved to the private implementation. Also added documentation
of the MODE constants.
Change-Id: I4f7e73cc99fe66beff9194e960e072e2aa9458f8
TLDR: Having a resumed activity behind keyguard can cause the keyguard
not to be dismissed.
Swiping the home button to launch Google Now causes an ASSIST intent
to be launched. The ASSIST intent starts SearchActivity which then
launches GEL. If an activity is resumed behind the keyguard when this
happens then that activity will be paused.
Because that activity is PAUSING, ActivityStackSupervisor
startActivityLocked() doesn't call dismissKeyguard() immediately.
Instead dismissKeyguard will be called later when GEL switches from
not-visible to visible. However, if the paused activity happens to be
GEL then there is never a not-visible to visible transition and
dismissKeyguard never gets called.
This fix removes an unnecessary call to resumeTopActivitiesLocked
which was causing activities behind the lockscreen to be resumed.
This fixes bug 10732489 except immediately after boot. Pausing the
initial activity if the lockscreen is visible after boot is deferred
for another CL.
Change-Id: I323262596ae41bc5a2700bae5942f6a4fba80936
...in ActivityManagerService.updateLruProcessInternalLocked on bluetooth
Add more debug output to help track down what is going on.
Also fix a little problem where, when a service ANRs, if you ask to
wait and it still wasn't responding, the ANR dialog wouldn't be
shown again.
Change-Id: I5be2b1705a0a39ca2992624ae683945c5f38065d
Gah I messed up when refactoring so it would always be told
RAM is low.
Also slightly tune the low memory parameters to go into low
memory states a bit more aggressively.
Change-Id: I5f970349760ad349d515a85c266ab21b387ee353
If fsck made changes to the filesystem, then upload
the logs to the dropbox. We can then get them into
Android Problem Reports.
Bug: 10021342
Change-Id: I202d2b2ba4060a2f379ca78f1b3f2c7a3f5796e0
The user has to explicitly enable a print service from the settings UI
before using it. Usually, users very rarely if at all interact with print
services, therefore all print service management task are performed from
the print settings. We also have to get user consent warning that the
user's data is about to be given to a third-party app. We now post a
notification allowing the user to go directly to the settings screen to
turn the service on.
bug:10447510
Change-Id: Iea56c0825f0bf38328ad94912f0ea5576e9339b3
Apps without sdcard_r or sdcard_rw are still able to write to
their package-specific directory, but someone needs to first make
that directory on their behalf. This change will delegate the
mkdirs() call through to vold when an app fails to create directly.
MountService validates that the path belongs to the calling user, and
that it's actually on external storage, before passing to vold.
Update Environment to make app-vs-vold paths clearer.
Bug: 10577808
Change-Id: I43b4a77fd6d2b9af2a0d899790da8d9d89386776
Moving a task to the bottom was also moving its stack to the back.
Since chrome always finishes by calling moveTaskToBack this put
the home stack in front of the application stack and would cause
bizarre window layering effects.
Definitely fixes 10764463.
Maybe fixes 10678010.
Change-Id: Ic202ae4fad44b36a8444255764d2135fccd4743d
When transitioning from activity-over-launcher to task-over-launcher
ensureActivitiesVisibleLocked() was too aggressive in showing the
launcher. If there were any non-fullscreen activities in a task that
sits over the launcher then the launcher would be shown.
This fix adds a test to make sure the launcher will only be shown if
the bottommost activity in such a task is non-fullscreen.
Fixes bug 10840919.
Change-Id: I5dcd63be3fa2865ae38cbb921332937dfa4b5d47