For restore use-case, session creation needs to complete quickly, so
delay ASEC allocation until session is opened. When preflighting
size checks, only consider external when we have a known size for the
container. Also relax size checks when using MODE_INHERIT_EXISTING
on external, since we don't know how much of existing app will be
copied over.
Consider session as "active" while commit is ongoing, until we're
either finished or pending user interaction.
Always publish first client needle movement away from 0. Use 25% of
internal progress to reflect ASEC allocation.
Avoid CloseGuard messages about leaking PFDs.
Bug: 17405741, 17402982
Change-Id: I6247a1d335d26621549c701c4c4575a8d16ef8c2
When the top activity is finishing we don't want to be comparing
it for matches to launching activities. This was keeping curTop
from matching itself when launching a lower task.
Fixes bug 17383648.
Change-Id: I837ac087ef965d99d12c98ab1c779de46716e204
The requirement that the top app be resumed in order to request
background visibility was too strict. In particular when the
background app is pausing the top app will be stopped waiting for
pause to complete. This is an appropriate time for the background
app to request visibility but we were rejecting that request.
Also, there is no need for the top app to have an active thread
except to notify it of the changed state.
Fixes bug 17383876.
Change-Id: I52f910baf6c109565694e053445516e1e5fd1c48
Surfaces were being modified after destroy(). The check for mSurface
being null was not done while holding window the window manager lock.
This change adds locking to the surface modification methods.
Fixes bug 17383628.
Change-Id: I12ebbddc0f2cd7b43659370fac2c4fb053999bb5
Add a new activity attribute, resumeWhilePausing, that allows an
activity specifying it to immediately start running without waiting
for the previous activity to pause. The recents activity is updated
to use this.
The implementation of this is ultimately fairly simple -- if we are
in the path of resuming such an activity, and find that we first need
to pause the existing activity, then within the activity manager we
do the regular pause flow but act like it has immediately finished
pausing right then so that we can immediately go on to the resume.
To make this clean, we tell the activity when asking it to pause that
it should not come back and tell us it is done, because we aren't in
any way waiting for it.
One potentially important change I needed to make here is the pause
callback no longer provides the saved persistent state, because we
now can't count on that callback happening. I don't think there was
really any utility in this anyway -- all modern apps will have their
save state flow happen as part of stopping, not pausing, so we'll
only capture that saved state when the stop is reported back anyway.
And since we do send the saved state back when stopping, it would
always blow away whatever we had gotten at the pause.
Finally, update the documentation for AppTask.startActivity(), and
fix the implementation handling that to be cleaner -- we need to
deal with inTask first before getting in to "oh noes add NEW_TASK
if this isn't coming from a calling activity" flow.
Change-Id: Ia1da0fac90d7bdbaafdda2e34850d795ce17a39f
Don't restore it too soon, because the rarely-needed fallback path
will need to be executed as system, too.
Bug 17394246
Change-Id: Ic5e662d4eae331b016fc91ffd08647bd8d4d6ff3
Also change name to setStagingProgress() to make it clearer that
system may adjust the range. Start throwing from openSession() in
preparation for ASEC allocation moving.
Bug: 17405741
Change-Id: Id7da51a32d5d89cb512ddafbd7ceaafbcd41cac6
...in cases involving uninstalled apps, or apps whose install state
varies across different users.
Bug 17398315
Change-Id: I7297d82f8bf5d49c50a7fd53d795a706bf2d2313
NativeDaemonEvent.unescapeArgs() was improperly skipping the terminating
quote in cases like "\\", where the char preceding the quote is a
backslash, but the backslash itself is escaped, so the quote is indeed
an unescaped terminator.
unescapeArgs() doesn't unescape "\xxx" decimal escapes used by mDNS, so
fix NsdService to do that sort of unescaping explicitly (which is only
applicable when it receives a "fullname", in SERVICE_RESOLVED).
Bug: 16983542
Bug: 16986203
Change-Id: Idfa79749336c68424d961bc414f984c525b7e5e6
This way the audio system can route the adjustments correctly when a bt
headset is connected.
bug:17281977
Change-Id: Ic41d038e47179baffc86e539562da285446148c7
For the system restore use-case, an installer may need to enqueue
their sessions quickly before badging details, like icons, have been
downloaded. This change relaxes to allow an installer to update
their session badging after the session has been created. Notify
observers when badging changes.
Rename callback registration methods to match style guide. Relax
constraint that observers are home app. Fix bug around internal
progress reporting.
Bug: 17376797, 17389236, 17334199
Change-Id: I5fb88508baea2f08e89a1504fcf5ef972afad4a7