As a preparation to fix Bug 25373872, this introduce an additional
parameter to IInputMethodClient.unbind() so that the IME client
that is running in the application side can know why IMMS needs
to unbind the connection.
In future the "unbindReason" parameter is supposed to be used to
optimize the behavior of IMM runtime running in the application process,
but for now it is not used unless we build the sytem with debug message
enabled. Hence there should be no user-visible change with this CL.
Bug: 25373872
Change-Id: I74e83c8ca9d1d53e31e9c7b5bda1dec6274e59c8
As a preparation to fix Bug 25373872, this CL does a mechanical
code clean-ups in InputMethodManagerService.
As a follow up of I6c3186050592526fc95c5b27f18e2155acff5ebc, this CL
introduces IMMS#resetCurrentMethodAndClient() to make it clear when we
are resetting both IMMS->IME and IMMS->Apps connections.
This is literally mechanical. No behavior change is intended.
Bug: 25373872
Change-Id: Ia4161854d9da71783fd028fcb79407e4b9463aee
View.cancelDrag cancels a drag operation initiated by
View.startDrag.
It has to be called on a View in the same window (under the
same ViewRootImpl) that the view which started the drag.
Bug: 24415683
Change-Id: Iae5ff3534b6c747ae174f170fdd01ff4d3b1c312
If an L device has a privileged app on the system image which was
updated and an M OTA renames the app package (supported only for
privileged apps) we end up with a disabled system package setting
with no package information. Since we are not doing a null check
of the package we get from the disabled package settings during
default grants we crash leaving the system in a bad state.
bug:25687380
Change-Id: I4f2ebcaf471e4bd1696298eab4716b50c52ca5c4
Recents to freeform animation must hang on the first frame and inform
Recents to hide its views. This mirrors the transition from freeform
to Recents, where the animation needs to hang on the last frame.
We need a special window flag for recents to force a redraw after the
animation launches. At this point Recents will become not visible
from the perspective of the activity manager, which would prevent
further drawing. We make recents ignore that and instead depend on
window visibility which will change after recents exit animation
finishes.
Bug: 24913782
Change-Id: Ief743b7e6fcebb3d8789d4745fb122ac607c1cf0
Split-user systems will allow for combinations of management modes,
specifically managed-{user,profile} on systems with a device-owner.
Bug: 25671630
Bug: 25680065
Change-Id: I5716f55eb6c8318129b4614adc22897d53901bee
Also separates magnification state and touch event handling. Moves
callbacks for window manager changes and display state changes into
the magnification controller.
Bug: 22718911
Change-Id: I3a8ba060a07d8f1f51856855a5f85601766fd45d
Also includes some small, nice refactoring:
* move code that sets the move animation into WindowStateAnimator;
* a few fields can be made private in WindowStateAnimator this way;
* one boolean flag in WindowStateAnimator popped out as unused after
being privatized, so could be deleted.
Bug: 25690109
Change-Id: I8144114244892c4f27aff21455e8e76eddbd039f
Actually, this implementation is more what we want for ephemeral
apps. I am realizing the two are not really the same thing. :(
For this implementation, we now keep track of how long a uid has
been in the background, and after a certain amount of time
(currently 1 minute) we mark it as "idle". Any packages associated
with that uid are then no longer allowed to run in the background.
This means, until the app next goes in the foreground:
- No manifest broadcast receivers in the app will execute.
- No services can be started (binding services is still okay,
as this is outside dependencies on the app that should still
be represented).
- All alarms for the app are cancelled and no more can be set.
- All jobs for the app are cancelled and no more can be scheduled.
- All syncs for the app are cancelled and no more can be requested.
Change-Id: If53714ca4beed35faf2e89f916ce9eaaabd9290d
The device idle service now knows when the system is actively
doing significant things (syncs, jobs, alarms, downloads). It
uses this, when in an idle maintenance window, to determine when
it can end that window early -- when such work is no longer
happening.
For now this just allows us to shorten the windows. In the future
we should use this to allow us to expand the windows to a longer
potential time, adjusting future windows to shorter durations if
earlier ones use more time. This will allow us to batch occasional
long operations (such as downloads) into one window, making up
for that with much shorter later windows.
Change-Id: Ie482abd50bc43be9a8917a769a5175851eee4ec4
Prevents the input region of a window from extending outside
the stack bounds. For example, if you have a non-sizeable
activity in docked mode you don't want the app getting touchs
when you tap on the side occupied by the other app.
Bug: 25710884
Change-Id: I044b4e87448fbd3eb51822e6d71e8ed8d06f55ec
Set-up dummy animation so we can start treating windows associated
with the replacing app token like they are in transition before the
new app window is ready for us to run the real transition animation.
This allows us to make the right decisions at various call points
where an animation is expected to be running for a replacing window
but the real animation isn't set yet.
Also, removed unused field indicating if an app token is animating
a replacement window since it was always set to true and checked/set
to the same value as AppWindowToken.mWillReplaceWindow.
Bug: 25645069
Change-Id: Ie216ed5bd60fb2a15da61c7050c9344c48b1c5fb
All operations are performed with WindowManagerService.mWindowMap lock
held, therefore the second lock is not necessary.
Change-Id: I762fb322ddeb8b45191a3d297de0d33a10674f8a