History log of /frameworks/base/services/core/java/com/android/server/wm/Session.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8b7f7f1aa5cd56e8670ffc5ae17914f5e49b0991 12-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix NPE when calling Session#add" into pi-dev
9553a11557528a91d5a51134e9a20c26f5ef69cf 11-Apr-2018 Chavi Weingarten <chaviw@google.com> Merge "Synchronize stack position and size update for split screen" into pi-dev
4ab9e828b190ada929f39c2ead44c5af2be0ca7a 11-Apr-2018 Daichi Hirono <hirono@google.com> Fix NPE when calling Session#add

Bug: 77658328
Test: None
Change-Id: Id9f2db7219abbe7e522d727eb3f1b90db2b2065d
/frameworks/base/services/core/java/com/android/server/wm/Session.java
be43ac86865c8013bef120f1f327c2cfe98ebfe8 05-Apr-2018 chaviw <chaviw@google.com> Synchronize stack position and size update for split screen

When entering split screen, the secondary window changes position so
it's below the primary split screen when minimized. The WSA at the same
time is also changing size to fit the area. However, the size doesn't
change until the client requests a new size and a frame with the correct
size comes in. This causes the stack to update position before the
resize which causes content to get cut off and then a jump when the resize
completes.

This change updates the WSA position as soon as it recognizes that the
stack changed position due to entering split screen secondary. The WSA
sets its position as the negative of the stack position, making the
calculated window position at (0,0). When a relayout is requested, the
WSA's position is requested back to (0,0), deferring until the new frame.
This will put the WSA position at (0,0) when a frame with the correct size
is drawn. This places the window position at the stack's new position in
the same transaction that a WSA frame with the new size is drawn.

Change-Id: I8c88d7784f827d66926fb5c382af2346028dc48f
Fixes: 74354855
Test: Entering split screen with quick step is smooth
Test: Entering split screen with old launcher still works
/frameworks/base/services/core/java/com/android/server/wm/Session.java
65b44e7855acafaa527e65755f6340a36209c641 06-Apr-2018 Daichi Hirono <hirono@google.com> Fix NPE when calling Session#addToDisplayWithoutInputChannel

Bug: 77658328
Test: None
Change-Id: I633c5a32fc969987bd5302753a83bd5253876e2d
/frameworks/base/services/core/java/com/android/server/wm/Session.java
9e370f2912620a4f3239cb58d2bce23a58f78cd6 06-Mar-2018 Adrian Roos <roosa@google.com> Window: Provide frame size hint to ViewRootImpl

Provides a better estimate to the ViewRootImpl about the likely
window frame size than it can get from the configuration, which
allows it to avoid unneccessary measure passes.

Bug: 73813813
Test: atest PhoneWindowManagerLayoutTest
Change-Id: Ia4de6509416d90eed61929ce1646904c31afdd8d
/frameworks/base/services/core/java/com/android/server/wm/Session.java
08d6d728c7b874c7e7d8f9622f47dc39fa508676 28-Feb-2018 Chenjie Yu <cjyu@google.com> Avoid double logging for app overlay

Right now if an app is TYPE_APPLICATION_OVERLAY, it gets logged twice

Fix: 73952594
Test: manual test and cts test
Change-Id: Ieca79545c76f0773cb939efd236705a067bb1e6d
/frameworks/base/services/core/java/com/android/server/wm/Session.java
e89041951de087df428ca4a367a5c25a531bd039 09-Dec-2017 Chenjie Yu <cjyu@google.com> Add atom and logging for app overlay

Test: will add cts test
Change-Id: I8573abd8ec920467047fd0db9d9ce22173d84960
/frameworks/base/services/core/java/com/android/server/wm/Session.java
6c8f2e4559bb4828515c6325ab60c02880268a20 01-Feb-2018 Wale Ogunwale <ogunwale@google.com> Delete alert window notification channel when no longer used

We no longer need the notification channel for alert window
use for a process e.g. the package is uninstalled, then go ahead
and delete the channel.

Change-Id: I2dea9af0e73810f91b248ad85cab73fa4f8271f4
Fixes: 67883657
Test: steps from bug
/frameworks/base/services/core/java/com/android/server/wm/Session.java
07f35aa6165c7abd418faf3b419bc1a003f6d992 19-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic "shadow-in-app"

* changes:
Remove DragDropController#prepareDrag()
Create a drag shadow surface in app process,
fabca09f0f5cf32eeebb4c8ae793f498aa182d58 19-Dec-2017 Daichi Hirono <hirono@google.com> Remove DragDropController#prepareDrag()

The prepareDrag() call is used by apps to ask the system server to
create a surface for drag shadow. Now the app creates a surface by
itself, thus we can reduce the method.

Bug: 70818582
Test: com.android.server.wm.DragDropControllerTests,
android.server.wm.CrossAppDragAndDropTests,
manually check the drag and drop behavior on test app.
Change-Id: Iae4acbff4f9ad68faa6324beb32bf9a28dcd67be
/frameworks/base/services/core/java/com/android/server/wm/Session.java
a1fb9be437b672f52ad64e1506038757ec060dcf 18-Dec-2017 Daichi Hirono <hirono@google.com> Create a drag shadow surface in app process,

Previoulsy a drag shadow surface is created in the system process. App needs
to call one more binder call (prepareDrag) to obtain the surface from
the system process.

The CL lets an app to create a drag shadow surface by itself. Then app
transfer the surface to system server by using reparent
API.

Bug: 70818582
Test: com.android.server.wm.DragDropControllerTests,
android.server.wm.CrossAppDragAndDropTests,
manually check the drag and drop behavior on test app.
Change-Id: I72796efffbefe78a802d7c441dea308d1cdea572
/frameworks/base/services/core/java/com/android/server/wm/Session.java
4b6599e494e90904cdbae03bb9cabfcaf2d06de0 16-Jan-2018 Andrii Kulian <akulian@google.com> Set ActivityView's rect as tap exclude region

Track bounds of an ActivityView and set them as a tap exclude region,
so that taps on this area won't cause a focus switch between
hosting activity and activities inside of ActivityView.

Bug: 63902362
Test: Manual with ActivityView test app
Change-Id: I3cdafe32e0bdf414507fef0d622d9c140eee3188
/frameworks/base/services/core/java/com/android/server/wm/Session.java
92beccfe584ad743e05bc50ebad73187a21d016d 11-Dec-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add TaskPositioningController"
34fb7314fa3cdb53a6be48b05742bfa54cc52f2d 04-Dec-2017 Daichi Hirono <hirono@google.com> Add TaskPositioningController

The CL creates new TaskPositioningController class which lives over the
process WindowManagerService's life time and handle task positioning
tasks like resizing or moving by drag.

Bug: 64149458
Test: atest com.android.server.wm.TaskPositioningControllerTests
Change-Id: I65b3226ce5fa93c16037671ab9cd3b3d84d8f274
/frameworks/base/services/core/java/com/android/server/wm/Session.java
5c6b6223281e0669e674df3cb489d8544c20fb84 07-Nov-2017 Adrian Roos <roosa@google.com> Display Cutout: Dispatch Cutout from WindowManager

Adds the logic to dispatch a DisplayCutout from DisplayFrames
through WindowState to the View hierarchy. Does however not yet
change how windows are laid out in response to a DisplayCutout.

The display cutout is currently never present, the following CL
will add logic to emulate a display cutout on devices that do
not have a physical one.

Bug: 65689439
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
Change-Id: Ie4cd4b575755b66a7ffead31e28640983ef4894e
/frameworks/base/services/core/java/com/android/server/wm/Session.java
58e25e1145472b54270b1400c251dbdb8b662952 25-Oct-2017 Daichi Hirono <hirono@google.com> Move drag related handler code to DragHandler

The CL creates new Handler in DragDropController and moved drag related
message from WindowManagerService#H and DragState#DragStateHandler.

Bug: 65564090
Test: android.server.wm.CrossAppDragAndDropTests, manually check the
drag and drop behavior on test app.
Change-Id: Ifd0312853734468ef9ff8cf6490164a6fd8806fa
/frameworks/base/services/core/java/com/android/server/wm/Session.java
df5cf6259c9e23e573edb2ecf019beef6396d369 11-Sep-2017 Daichi Hirono <hirono@google.com> Move drag and drop related lines to DragDropController

The CL creates new DragDropController class where we can get together
everything related with drag and drop, and moves the following methods
to DragDropController.

* WindowManagerService#preapreDragSurface
* WindowManagerService.H#handleMessage for DRAG_START_TIMEOUT,
DRAG_END_TIMEOUT, and TEAR_DOWN_DRAG_AND_DROP_INPUT
* Session#preapreDrag
* Session#performDrag
* Session#reportDropResult
* Session#cancelDragAndDrop
* Session#dragRecipientEntered
* Session#dragRecipientExited

Note that the CL does not remove the binder interface methods in
Session e.g. Session#prepareDrag. These methods start delegating drag
and drop work to DragDropController.

Bug: 65564090
Test: Manually drag and drop files between apps, CTS CrossAppDragAndDropTests
Change-Id: I50f6f022f2ecd0ab160b5187ae39f0f533f05969
/frameworks/base/services/core/java/com/android/server/wm/Session.java
a559286fcff551d4a27da22fb7c8a72e23e506a6 23-Oct-2017 Bryce Lee <brycelee@google.com> Make Session package private.

This change requires moving initialization of the mock session until
after the dex flags and mock infrastructure has been set up.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowLayersControllerTests
Change-Id: Icb469d09d8f591da6bb6a81a3741e508a3a03bd5
/frameworks/base/services/core/java/com/android/server/wm/Session.java
0e00727faaf9d7f02a15f348bcf17fe60e379da5 02-Oct-2017 Robert Carr <racarr@google.com> Disable seamless-rotation when other windows are visible.

Was never supported but has gotten more horrific for whatever reason.

Bug: 65612427
Change-Id: I25758f40876c76a6daaf6330ed7cfa84c759fc0f
/frameworks/base/services/core/java/com/android/server/wm/Session.java
f12ec0fb6419920d3aa606141a91343cc9421275 23-Aug-2017 Jorim Jaggi <jjaggi@google.com> Sleep activities with AOD

Previously in the last release we started sleeping as soon as
the device was not interactive anymore. However, this caused
issues with ambiactive activites on Android Wear.

Instead, we introduce a new private flag on a window that signals
that all activities should be put to sleep. We use this flag in
SystemUI as soon as SystemUI is "dozing", which means its ambient
display is showing. This flag gets set before we request PWM to
wake-up, so it's ensured that this will not cause any spurious
lifecycle events.

Test: go/wm-smoke
Test: android.server.cts.KeyguardTests
Change-Id: I20f6dd4bfde220f945ef94d2ac1b89dd3694de32
Fixes: 64940094
/frameworks/base/services/core/java/com/android/server/wm/Session.java
01ad4345f92080439a5ccde9cb085f3f90d8709b 30-Jun-2017 Wale Ogunwale <ogunwale@google.com> Added PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS window flag.

When a window with this flag is visible, then any other window added
by an application process that requires OP_SYSTEM_ALERT_WINDOW
permission or that are of TYPE_TOAST will be hidden.

Bug: 62196835
Test: go/wm-smoke
Test: Added the new flag to the RecentsActivity onCreate, launched FB
chat heads and observed the head head become invisible when Recents is
visible and the chat head become visible when Recents is no longer
visible.

Change-Id: I1a3e3c5b1696a5f5b95eac187acb5a03863b4a0b
/frameworks/base/services/core/java/com/android/server/wm/Session.java
a9c161bc2801599c6a545855ea09f6c251f2b860 22-Jun-2017 Wale Ogunwale <ogunwale@google.com> Merge "Added more systrace points to window manager" into oc-dev
am: 182d5ec2d2

Change-Id: I6a1ac4ceee2ba943965382fc5cb7c782249b19a2
4958ad283f06452480569f317feea862ad5981e4 22-Jun-2017 Wale Ogunwale <ogunwale@google.com> Added more systrace points to window manager

To help debug performance issues

Test: external/chromium-trace/systrace.py -t 3
Bug: 62796190
Change-Id: Ie6012a895174053c4732fb58b9365546fdb979de
/frameworks/base/services/core/java/com/android/server/wm/Session.java
26f830d29fd8a1f8d4aa07518e1877f42359bed6 19-May-2017 Andrew Scull <ascull@google.com> wm/Server.java: add missing @Override annotations

error-prone reported these as warnings.

Change-Id: I92839207fdbdeda2289b81faaecfd73bf4036b33
Fix: 38442333
Test: Build
/frameworks/base/services/core/java/com/android/server/wm/Session.java
a10fc7e294771dc97536a3fdae6f2d105bb3ed55 06-Apr-2017 Wale Ogunwale <ogunwale@google.com> Don't show alert window notifications when in Vr mode.

Change-Id: I6ef60682197f6581fb101598290b2390ea676091
Fixes: 35854095
Test: manual
/frameworks/base/services/core/java/com/android/server/wm/Session.java
446079600ece83b22cb91865bcbeb694292b0108 16-Mar-2017 Andrii Kulian <akulian@google.com> Separate global and override config sent to client

There is some flakiness in View#onConfigurationChanged callback -
if ViewRootImpl receives config update earlier than ActivityThread,
it may not detect the configuration change and skip inner updates.
Also now ViewRootImpl assumes that it receives the global config as
a param, but instead it gets merged config from WM. This means that
ViewRootImpl#sConfigCallbacks was sending incorrect values to the
recipients.

This CL switches to sending global and override configuration to the
client separately. Also in case if there is a corresponding activity,
it first updates it and waits for update callback to ViewRootImpl.
This way global config and override config for activity will always
be set first and resources will be updated before inner state of
ViewRootImpl is updated.

Bug: 35870157
Bug: 34164473
Test: android.server.cts.ActivityManagerDisplayTests
Test: testOnMovedToDisplayCallback
Change-Id: Ic9e7541cf25ecfac6ec90e48f7efb0ece91f657e
/frameworks/base/services/core/java/com/android/server/wm/Session.java
d0a2cd306104ca6fc8af70d5a3d905ec54d5dc6e 14-Mar-2017 Robert Carr <racarr@google.com> Delete some SurfaceView support code.

repositionChild, performDeferredDestroy, and SurfaceControl with
background were all only used by SurfaceView and are now no longer
required in the wm.

Test: Only red.
Change-Id: Icb773572e6d6202f78a6d23b2431fbfacbe272c6
/frameworks/base/services/core/java/com/android/server/wm/Session.java
d76881e002cf1e266b5080b05d1aee80fc760770 10-Mar-2017 Wale Ogunwale <ogunwale@google.com> Updated alert window notification to new UX spec.

- Updated strings
- Removed action button
- Clicking on notification takes user to alert window permissions
activity

Bug: 36069437
Test: Manual
Change-Id: I32e59ed3faa7fba1641660095d59f5ebf9acec43
/frameworks/base/services/core/java/com/android/server/wm/Session.java
5aa8683bb78dc1c637a715efde7880d9010c6870 28-Feb-2017 Wale Ogunwale <ogunwale@google.com> Fixed some issues with alert window notifications

- Don't hold window manager lock while calling into notification
manager since it can end up calling into activity manager.
- Fixed issue with using checkCallingPermission() to check if the
system has the internal system window permission. This call fails
if it isn't a binder call. Change to use checkCallingorSelfPermission()
instead.
- Fixed class cast exception while getting app icon by using
IconUtilities class to the the drawable to bitmap convertion.

Change-Id: I4ef380618f558a8aac5b152d97536a614040397f
Fixes: 35780846
Fixes: 35846667
Fixes: 35854470
Bug: 35657567
Test: cts/hostsidetests/.../run-test CtsWindowManagerHostTestCases android.server.cts.AlertWindowsTests
/frameworks/base/services/core/java/com/android/server/wm/Session.java
387e4c61338ddf7aee89d10c8aac329e9562b831 13-Feb-2017 Wale Ogunwale <ogunwale@google.com> Display on-going notification for apps using alert windows.

Allows the user to associate alert windows with specific apps
and revoke the permission if they want.

Test: manual
Bug: 33256752
Change-Id: Ie28325b6bb799b3df253770ebe655f97ebbadd90
/frameworks/base/services/core/java/com/android/server/wm/Session.java
943002b47346ea82b4e69dca033cc03086969dd1 16-Feb-2017 Wale Ogunwale <ogunwale@google.com> Set importance for processes displaying app-overlays based on visibility

We were previously setting this based on when the window was added and
removed. This can lead to issues where an app isn't allowed to show
alert windows so window manager hides the window after the permission is
revoked, but the window still exist in the system so the process
importance will still be high. We now set the process importance based
on if it has visible window surfaces or not.

Bug: 33256752
Test: cts/.../run-test CtsAppTestCases android.app.cts.AlertWindowsTests
Change-Id: I4e406a94683ec0eecc0911d0195e641c693e1c4a
/frameworks/base/services/core/java/com/android/server/wm/Session.java
d993a573d7fcf1a69d35528cae4dd96581c9aacd 05-Feb-2017 Wale Ogunwale <ogunwale@google.com> Set oom adj for processes displaying app-overlays to PERCEPTIBLE_APP_ADJ

For processes with a window of type TYPE_APPLICATION_OVERLAY adjust their
oom importance to PERCEPTIBLE_APP_ADJ to reduce the chance of them getting
killed by the low-memory-killer since they are displaying something that
is perceptible to the user.

Also z-order TYPE_DREAM windows above alerts windows.

Bug: 33256752
Test: cts/.../run-test CtsAppTestCases android.app.cts.AlertWindowsTests
Change-Id: I4c05a9fee6fad61399bf4d10c8647467cc596ca6
/frameworks/base/services/core/java/com/android/server/wm/Session.java
0303c5723edfdb4f2db37543544d7cbe9b14df97 20-Oct-2016 Wale Ogunwale <ogunwale@google.com> Have DisplayContent be the call point for adjusting wallpaper windows

4th step in trying to make the WindowList private to DisplayContent
Have the rest of the system call DisplayContent when they need to
adjust the position of the wallpaper windows in the window list
instead of calling WallpaperController directly. That way the display
content can control the window list that the wallpaper controller sees.

Test: Existing tests pass and manual testing.
Change-Id: Iaa7f421d7cd24d36e5a83e091f77b4a08d0ae123
/frameworks/base/services/core/java/com/android/server/wm/Session.java
cfca258639f81b33dd60aa9c05dbc4f4190ac11e 19-Oct-2016 Wale Ogunwale <ogunwale@google.com> Fixed monkey test failure

Avoid duplicate attempt to remove WindowToken from its parent
container when removeImmediately is called by first removing the
token from the display before calling super.removeImmediately
which only tries to remove the child from the parent container
if it is still attached to the parent.

Also, added test for the failure case the monkey test was
triggering.

Bug: 32239922
Test: WindowTokenTests.testChildRemoval passes
Change-Id: I4153669d18260d956c4b570944d2f48516d692ac
/frameworks/base/services/core/java/com/android/server/wm/Session.java
68e5c9e93a8f1542cd988ac01ba1d98381ff4893 14-Sep-2016 Robert Carr <racarr@google.com> Log transaction state to RemoteSurfaceTrace.

Test: cts-tradefed run singleCommand cts -o --module CtsWindowManagerHostTestCases --test android.server.cts.SurfaceViewMovementTests#testSurfaceMovesWithParent
Change-Id: I2aeda867f0071bf6ac715153ab842a9f16cafa44
/frameworks/base/services/core/java/com/android/server/wm/Session.java
9bc47736362d03b3f099bf018255571457403c1f 10-Aug-2016 Wale Ogunwale <ogunwale@google.com> Removed child windows from WindowToken window list

With the window container hierarchy model, containers should only
link to their direct children and delegate any operation on
decendants of their children to their children.

Bug: 30060889
Change-Id: I99ca0d181d54cfe75bbe24c1b0daaa06cf7cfd9a
/frameworks/base/services/core/java/com/android/server/wm/Session.java
64b103a8c58926f63d9ef4c037534a7df87d07ef 10-Aug-2016 Vladislav Kaznacheev <kaznacheev@google.com> Dispose WMS.DragInputEventReceiver on the correct thread

WindowManagerService.DragInputEventReceiver should be disposed
on the same handler where input is being handled. This is required
to avoid races between nativeFinishInputEvent and native dispose.

Bug: 26927018
Change-Id: Ib476dc0e8a8825e1df81f1557d48b619b7f9dd8c
/frameworks/base/services/core/java/com/android/server/wm/Session.java
77bdfb512f963701082c5c78e9a9db00b167fcb6 03-May-2016 Robert Carr <racarr@google.com> Prepare to replace windows across recreate().

When the activity locally recreates itself, nothing
on the server side is able to prepare preserving windows,
or replacing windows. The activity was trying to defer
removing the old window, but it was just waiting
until the new one was created, not until it was drawn,
thus resulting in a flicker. It's easy to backpack on the
existing replacement infrastructure.

Bug: 28221875
Change-Id: I55fc4ca78e9e11809473fedd8b30b6a6350cf852
/frameworks/base/services/core/java/com/android/server/wm/Session.java
0b10c335c72cb610e71432a61f315e7670b9af41 29-Mar-2016 Robert Carr <racarr@google.com> Ensure we change SurfaceView size from UI thread.

We need to change the SurfaceView size from the UI thread
so that we can appropriately deliver the SurfaceChanged
callback. We also need to not preserve geometry
in this case, as if we don't update the surface
and layout size together we could get scaling. This still has
some potential for holes, as transactions are not synced with
the parent renderer, but we have other methods to avoid
these in the case of resizing. This fixes the remaining
issues with content sizing and surface view "out of sync".

Bug: 27780983
Bug: 27687126
Bug: 27676101

Change-Id: Idd7864f00e5cf7a4eb32dd66c0b389292a788069
/frameworks/base/services/core/java/com/android/server/wm/Session.java
6136273888c42faad74dce19ec49904a55affc15 22-Mar-2016 Chong Zhang <chz@google.com> Don't change geometry in relayout if preserve geometry is requested

This causes scaling to be applied in the relayout window since the
requested size won't match the window size. Apply the requested size
in repositionChild instead.

bug: 27676101
Change-Id: I03beee2b9fe118a6be329b5fd1338d54e48d9a22
/frameworks/base/services/core/java/com/android/server/wm/Session.java
09e1b8d02c1981d3ae2fa6875bb27dcc87a15f69 23-Feb-2016 Wale Ogunwale <ogunwale@google.com> Clear calling identity on Session.startingMovingTask

This call is comming from the client which doesn't have
the manage task permission required by setFocusTask in AM.

Bug: 27157914
Change-Id: I494a0c44e8fb4316a16bcd44c87bdd8d23e7e6d5
/frameworks/base/services/core/java/com/android/server/wm/Session.java
989b58a633ed6f2192a172855525d86477452884 10-Feb-2016 Vladislav Kaznacheev <kaznacheev@google.com> Update pointer icon when View.setPointerIcon is called

Currently the updated pointer icon is only displayed after
the next mouse move.

Bug:27107871
Change-Id: Ieed57b07fe44699735179cf57968a9bb08981396
/frameworks/base/services/core/java/com/android/server/wm/Session.java
c8680438c0481b9c1e2b0bc856f900057ea14ba2 23-Jan-2016 Vladislav Kaznacheev <kaznacheev@google.com> Merge "Change mouse pointer when drag and drop is active"
ba761124e624ffed2681a9e171cd3f7d8c6ed59e 22-Jan-2016 Vladislav Kaznacheev <kaznacheev@google.com> Change mouse pointer when drag and drop is active

Mouse pointer is set to STYLE_GRAB when the drag has started and
reset to STYLE_DEFAULT when the drag has ended.

Resetting the pointer shape to the one defined by an underlying
view will be handled in a separate patch.

Bug: 24415739
Change-Id: I8df0a08c5701a34a48f10ec6b43c2cf2e6362d61
/frameworks/base/services/core/java/com/android/server/wm/Session.java
e38283110918c6e0c921a5e6fde677ba0988ad2c 21-Jan-2016 Vladislav Kaznacheev <kaznacheev@google.com> Merge "Send ACTION_DRAG_LOCATION right after ACTION_DRAG_STARTED"
0102a8a8e957c38e8fe40e6cd184339ea9f38906 19-Jan-2016 Rob Carr <racarr@google.com> Merge "Replace SurfaceViews across resize trigerred relaunches."
23fa16b759f023ea18ab9f84e89df50d4b449dfd 13-Jan-2016 Robert Carr <racarr@google.com> Replace SurfaceViews across resize trigerred relaunches.

In resize modes where we are preserving the main application
window, we need to tell the WindowManager to prepare to replace
the child surfaces, or they will dissapear across relaunches.

Bug: 26070641
Change-Id: I864168688dc320e9280e651f9c5df614f52bc96c
/frameworks/base/services/core/java/com/android/server/wm/Session.java
d0ed8937ce07e7243d8349d6eb859e8bff24f50b 16-Jan-2016 Vladislav Kaznacheev <kaznacheev@google.com> Send ACTION_DRAG_LOCATION right after ACTION_DRAG_STARTED

When an app is both drag and drop origin and recipient, it might not
get ACTION_DRAG_ENTERED in some cases. Specifically, when
mouse is long-pressed and released in place, the sequence
of drag events is: ACTION_DRAG_STARTED, ACTION_DROP,
ACTION_DRAG_ENDED. This is happening because
ACTION_DRAG_ENTERED is emitted from ACTION_DRAG_LOCATION
handler (which is never called since mouse has not moved).

This problem does not exist with touch because (at least according
to observable behavior on Nexus 9) when drag and drop is initiated
by touch, MotionEvent.ACTION_MOVE immediately follows
MotionEvent.ACTION_DOWN (which normally causes
View.startDragAndDrop).

This CL fixes this problem by sending a single ACTION_DRAG_LOCATION
right after ACTION_DRAG_STARTED.

Bug: 26566708
Change-Id: Ifc8dd1005c04a5c8f0dc3f14be9e4839204cf281
/frameworks/base/services/core/java/com/android/server/wm/Session.java
2e95a488e0a12d4263d101e888fdd89fd123aec3 15-Jan-2016 Jorim Jaggi <jjaggi@google.com> More optimization while dragging docked divider

- Make sure mPendingBackdropFrame gets also set when if the window
triggers a relayout on it's own, so it doesn't call into window manager
all the time.
- Set the insets of the docked divider to empty so we don't trigger a
layout when we are just moving it - it doesn't need it in any case.
- Send a window move message to the divider when it moved
- Update attach info in all move cases, update light center

The whole resize operation now only takes around 4ms per frame, and
leaves a lot more resources for the apps to do configuration changes.

Bug: 25015474
Change-Id: Ica48129570a0fc858a89c21f46abf3442efb0224
/frameworks/base/services/core/java/com/android/server/wm/Session.java
0bd180d8880b3d1b9677f154c034a2af840b4796 08-Dec-2015 Filip Gruszczynski <gruszczy@google.com> Improve debugging setup for window manager package.

This moves debug flags to a dedicated class and also provides a
mechanism to either have fine grained tags or one common tag for easier
grepping the logcat. This mimicks the approach in activity manager
package.

Change-Id: Ie8c08b9a3d8b182335ee5547ee05d21b5933db6b
/frameworks/base/services/core/java/com/android/server/wm/Session.java
ce2aef9f12f18fdc7811ff0de8c1c37177e7f645 21-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Animate drag shadow when the drag is cancelled

Added a placeholder animation (scale and alpha going down to 0).
Final UX spec is pending.

Change-Id: I324635d270cc4d7f865c9fe9ad2802b975d1e9ca
/frameworks/base/services/core/java/com/android/server/wm/Session.java
8b6f38c7c7dee7d0a543bfdb4cfd936b3fd42c07 20-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> 'Drag and drop failed' animation

If the drop has not been consumed (DragState.mDragResult is false)
the drag shadow surface is not immediately destroyed, but animated
back into the position where the drag started.

The current animation is an OK placeholder, still waiting for the
final word from UX.

Bug: 24415573

Change-Id: Ia30135ce1e85655c8ba16e28dc69f0ebf9b36239
/frameworks/base/services/core/java/com/android/server/wm/Session.java
82063913ae6d3b158cb0c599141e473b691363a8 20-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Implement View.cancelDragAndDrop

View.cancelDragAndDrop cancels a drag operation initiated by
View.startDragAndDrop.

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: If9a265fd8cc4d26b207d582d0d02d5c9ae78eba1
/frameworks/base/services/core/java/com/android/server/wm/Session.java
54d6b95e86e9b248dd313ab72f4db6a681480d1e 19-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Revert "Implement View.cancelDrag"

This reverts commit 93cf731b26e2ab4db49bd80f60675b03e40512f3.

This is required because adding View.cancelDrag conflicts with existing app code.

Change-Id: I323fc5d2144266781d3168fe033c53cb5b37050e
/frameworks/base/services/core/java/com/android/server/wm/Session.java
93cf731b26e2ab4db49bd80f60675b03e40512f3 06-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Implement View.cancelDrag

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
/frameworks/base/services/core/java/com/android/server/wm/Session.java
64aadd08491172e90f6d6512d8affc9a4cfa04cc 06-Nov-2015 Robert Carr <racarr@google.com> Clarify geometry management for SurfaceView

In the hardware accelerated case, RenderThread needs
to be the authority of information on the geometry of
the SurfaceView (this will occur via moving the
repositionWindow call to RenderThread). In order
to support this we have to enable calling relayoutWindow
without geometry (so that it will not fight with
repositionWindow). Add such a mode to relayoutWindow
and use it from SurfaceView. Add size to repositionChild
while we are here.

Bug: 22802885
Change-Id: Ie45132c22f34cc6ecfe2446912b30bd1df414406
/frameworks/base/services/core/java/com/android/server/wm/Session.java
7d73643f7a3fbd635ba1818d6f819e551b7ffcf6 06-Nov-2015 Bart Sears <bsears@google.com> Revert "Clarify geometry management for SurfaceView"

This reverts commit 78a45f2bd8794d7a85e7443820862d466edf2324.

Change-Id: I782f688f52a85df84d9facef2fbf88c28f4a7082
/frameworks/base/services/core/java/com/android/server/wm/Session.java
78a45f2bd8794d7a85e7443820862d466edf2324 03-Nov-2015 Robert Carr <racarr@google.com> Clarify geometry management for SurfaceView

In the hardware accelerated case, RenderThread needs
to be the authority of information on the geometry of
the SurfaceView (this will occur via moving the
repositionWindow call to RenderThread). In order
to support this we have to enable calling relayoutWindow
without geometry (so that it will not fight with
repositionWindow). Add such a mode to relayoutWindow
and use it from SurfaceView. Add size to repositionChild
while we are here.

Change-Id: I12f85f586a38bf86367f3d964cb49f19003d441f
/frameworks/base/services/core/java/com/android/server/wm/Session.java
64e516f5fa56d71bf6b5076e5620c30dc5810ba1 29-Oct-2015 Rob Carr <racarr@google.com> Sync SurfaceView position changes to parent render.

In order to provide pixel perfect movement of SurfaceViews
'within' other views (e.g. scrolling) we need to be able to
synchronize the attached (parent window) painting with the
movement of the SurfaceView (recall, SurfaceViews are positioned
behind their attached windows and the parent must render a
transparent region for the SurfaceView to appear). Provide
a new WindowManager method to reposition an attaching window
(that is to say, a window which has an attached window like
SurfaceView) and defer the transaction until the parent frame.
SurfaceView is hooked up to use this for movement. This is still
'racy' in the hardware accelerated case as the render thread
could be on either side of dequeing the frame we are working on.

Bug: 22802885
Change-Id: I025d2bdcbe15c1c11047cc0dbca2cf2b7d67c632
/frameworks/base/services/core/java/com/android/server/wm/Session.java
7e1d861a9a3f76e1f79eb6806d4aa8bbeb560773 16-Oct-2015 Rob Carr <racarr@google.com> Revert "Sync SurfaceView position changes to parent render."

This reverts commit 6104dc95606b3399356dd011ca6d71fcd954154c.

Change-Id: If9d709bc65e7a817bd2c1b5768c7c33a9317638f
/frameworks/base/services/core/java/com/android/server/wm/Session.java
6104dc95606b3399356dd011ca6d71fcd954154c 28-Sep-2015 Robert Carr <racarr@google.com> Sync SurfaceView position changes to parent render.

In order to provide pixel perfect movement of SurfaceViews
'within' other views (e.g. scrolling) we need to be able to
synchronize the attached (parent window) painting with the
movement of the SurfaceView (recall, SurfaceViews are positioned
behind their attached windows and the parent must render a
transparent region for the SurfaceView to appear). Provide
a new WindowManager method to reposition an attaching window
(that is to say, a window which has an attached window like
SurfaceView) and defer the transaction until the parent frame.
SurfaceView is hooked up to use this for movement. This is still
'racy' in the hardware accelerated case as the render thread
could be on either side of dequeing the frame we are working on.

Change-Id: Ic33915043380ab8cd9eb4920e224b35234ed867d
/frameworks/base/services/core/java/com/android/server/wm/Session.java
8e89b31a62fb9ec5ad33908c5e8e9c7ab2fd949f 10-Sep-2015 Chong Zhang <chz@google.com> Move window moving and resizing handling to WindowManager

- add a startMoving API to initiate a window move from app, once
the move starts WindowManager will take over the event handling.

- detect touch events along window's outside border and start
a resize if necessary

Change-Id: Ic7e8baba34e0aa27a43173e044ffb46e93e219e0
/frameworks/base/services/core/java/com/android/server/wm/Session.java
e8069dcfcff15e060fc397b9ed5ea8b915b1cfa7 18-Aug-2015 Wale Ogunwale <ogunwale@google.com> Moved window manager wallpaper control into separate class

Change-Id: Ia3c12065678992614667dc210d4611a1250ca22b
/frameworks/base/services/core/java/com/android/server/wm/Session.java
0e95bc4fb2c9255223d1a27b1727416d81e4835c 29-Jul-2015 Vadim Tryshev <vadimt@google.com> Adding a drag flag to make drag shadow opaque.

The default is still a semitransparent shadow.

Bug: 22028725
Change-Id: I4b0090053fe28cc4ac009960b5b7866d1219a675
/frameworks/base/services/core/java/com/android/server/wm/Session.java
2987f616faca534a792686a53304c9932634310c 01-Jul-2015 Filip Gruszczynski <gruszczy@google.com> resolved conflicts for merge of 300ccf4a to mnc-dev

Change-Id: Ia315e314bfde0c066a2c25d93f8cbdc71fee0a14
0ec1328f85a08a610868856c688ebb8196c79c17 25-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Calculate outset hint when adding window.

Outsets aren't dynamic so they are a great candidate for a hint when the
window is added through the window manager. Thanks to this during first
view hierarchy measure or wallpaper window layout they are immediately
available and don't require multiple measure/layout passes.

Bug: 21593814
Change-Id: I573c15ffbbe4fcd8a6ed9c5e4fcd6cfbbcd7434f
/frameworks/base/services/core/java/com/android/server/wm/Session.java
2217f61e51ba4b19c56b19297c1e9cf74d7d860f 26-May-2015 Filip Gruszczynski <gruszczy@google.com> Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""

This includes the fix for the broken dialog windows. The outsets will
only be calculated and applied if the window is full screen, since
they don't make much sense otherwise.

This reverts commit 4bb6b751fbbb218e8a298db4aa008472a0aa8d31.

Change-Id: I977a85a78c990c1840784dc0be0dddd5a6d84e6b
/frameworks/base/services/core/java/com/android/server/wm/Session.java
4bb6b751fbbb218e8a298db4aa008472a0aa8d31 23-May-2015 Dianne Hackborn <hackbod@google.com> Revert "resolved conflicts for merge of 47249f2a to mnc-dev"

This reverts commit c7becb7ee78881646251ff4846e63eb6b96bf7ec, reversing
changes made to 8562b08f04c1309cf40db1e749d612b6824f1d12.
/frameworks/base/services/core/java/com/android/server/wm/Session.java
c7becb7ee78881646251ff4846e63eb6b96bf7ec 21-May-2015 Filip Gruszczynski <gruszczy@google.com> resolved conflicts for merge of 47249f2a to mnc-dev

This is a merge of chin support.

Change-Id: I436b751b3c4aaa6b46cfcdb475e02eedfa5a5635
3e11bf33a6094da92d97702213aa12c67b21c4d1 20-Apr-2015 Filip Gruszczynski <gruszczy@google.com> Support for devices with a chin.

Information about the chin is now part of the config.xml instead of the
theme. It is retrieved by WindowManagerService and passed to the clients
as insets. Clients can adjust their behavior in a way that makes it
invisible to the user, that part of the surface doesn't actually exist.

Bug: 19908853

Change-Id: Iedf57bf3c848201b854f91ffeb3b59187d375c1f
/frameworks/base/services/core/java/com/android/server/wm/Session.java
1fb55286438967f82e305a8449c0528a7cd07fce 24-Feb-2015 Chad Jones <chadj@google.com> resolved conflicts for merge of 57bb5f5c to master

Change-Id: Id5dfe7fc919305658312771a031c0764cef5515c
c2932a1be3e320679034212698aff376d5104dbe 21-Nov-2014 Jeff Brown <jeffbrown@google.com> Hold a wake lock while dozing when display updates are pending.

When the display state is DOZE or DOZE_SUSPEND, assume this means
that the AP may go to sleep at any time so hold a wake lock for
a little while starting when traversals are scheduled to ensure
that the AP remains awake long enough to draw and post the frame
to the display hardware.

This patch is somewhat approximate but should be good enough for
most devices today.

Note that the implementation uses the window manager to ensure that
the window which wants to draw is actually visible before acquiring
the wake lock. There is a cost to this test (a round-trip) which
should not be significant today since we do not expect apps to draw
more than one frame or two while dozing. However, if we wanted to
support animations in general, we might want to optimize it or
eliminate the check altogether (since we can already account for
the app's use of the wake lock).

Another way to implement this functionality might be for the view
hierarchy to listen for the power manager to report that it has entered
a non-interactive power state before deciding to poke draw locks.
This would be somewhat more accurate than watching the display state.
Also, the draw lock timeout logic could be implemented more directly
instead of using an ordinary timed wake lock.

Bug: 18284212
Change-Id: I84b341c678303e8b7481bd1620e634fe82cc4350
/frameworks/base/services/core/java/com/android/server/wm/Session.java
165be0c70d128f0ece876d54e1c7e95ef04c6960 28-Jan-2015 Craig Mautner <cmautner@google.com> Remove TYPE_UNIVERSE_BACKGROUND from system

An experiment that is over and has been occupying space.

Fixes bug 18088522 item #7

Change-Id: Ib0fcaa24243ed9b0581143e1d5114c1fd2b0aa6e
/frameworks/base/services/core/java/com/android/server/wm/Session.java
37d7a68de7e353c31a3a4736054cd86f0e002eaf 06-Nov-2014 Adrian Roos <roosa@google.com> Fix inset hinting when adding window

Windows with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS were
getting an incorrect content inset hint, because the
hinting didn't see the adjusted systemUiVisibility.

Also adds hinting for the stable insets.

Bug: 17508238
Change-Id: If9647277feb6811b15665b801accd896c51dbd12
/frameworks/base/services/core/java/com/android/server/wm/Session.java
067e5f68b9216b233df1c6529db182ff9b2887ab 08-Sep-2014 Dianne Hackborn <hackbod@google.com> Add new wallpaper features for insets and offsets.

Issue #17394151: WallpaperService / Engines need to get notified
of WindowInsets

Issue #17394203 Wallpapers need a system API to be shifted in order
to support burn in protection

Adds a new API on WallpaperManager to set additional offsets to
make wallpapers extend beyond the display size.

Insets are now reported to wallpapers, to use as they may. This
includes information about the above offsets, so they can place
their content within the visible area. And to help with this, also
expose the stable offsets APIs in WindowInsets which is also very
useful information for the wallpaper.

Another new API on WallpaperManager to set a raw offset to apply
to the wallpaper window, forcing it to move on the screen regardless
of what the wallpaper is drawing.

Fix wallpapers when used with overscan enabled, so they still extend
out across the entire screen. Conveniently, the above new window
insets information is very useful for this case as well!

And a new wallpaper test app for all this stuff.

Change-Id: I287ee36581283dd34607609fcd3170d99d120d8e
/frameworks/base/services/core/java/com/android/server/wm/Session.java
fa10423fa00f3495e451016acba9b6848eb995c9 21-Jun-2014 Adrian Roos <roosa@google.com> Add stable insets for stable system windows

Adds a new kind of inset that only accounts for stable system
windows like the system or navigation bar.

Bug: 15457292
Change-Id: I681b711f6f40a94c25b7acd3a44eb3539486afab
/frameworks/base/services/core/java/com/android/server/wm/Session.java
f7174e87b6007000777b0124de9cef70d8618788 12-Jun-2014 Svetoslav <svetoslavganov@google.com> Fix backwards compatibility for introspected windows.

1. The APIs for introspecting interactive windows were reporting only
the touchable windows but were missing the focused window. The user
can interact with the latter by typing, hence it should always be
reported. Also this was breaking backwards compatibility as if the
focused window is covered by a modal one, the focused window was not
reporeted and this was putting the active window in a bad state as
the latter is either the focused window or the one the user is touching.

2. Window change events are too frequent as on window transition things
are chanign a lot. Now we are trottling the windows changed events
at the standard recurring accessibility event interval.

3. Fixed a wrong flag comparison and removed some unneded code.

buy:15434666
bug:15432989

Change-Id: I825b33067e8cbf26396a4d38642bde4907b6427a
/frameworks/base/services/core/java/com/android/server/wm/Session.java
eb94fa7975b1e8742f3b00cec6bd4f9d6b329e3a 04-Jun-2014 Dianne Hackborn <hackbod@google.com> Improvements to low power mode.

Add new public API for monitoring low power mode.

BatteryService now puts device in to low power mode when
battery level is low.

Window manager now watches low power mode to turn off
animations.

Modifying the animator scale now gets propagated to all
processes.

Change-Id: I8fa566994764ddd4e1977631e28381ab9409f8ee
/frameworks/base/services/core/java/com/android/server/wm/Session.java
df88d73092c62a1a3cd2b2056ca63ae2e70cc238 27-Jan-2014 Craig Mautner <cmautner@google.com> Add IIntentSender to ActivityContainer.startActivity

PendingIntents and IntentSenders can now be launched. Still does not
work once the host activity has been paused and resumed.

Window manager TaskStacks now exist independently of Displays and app
windows persist after Displays are removed below them. Attaching the
stack to a new Display does not yet restore the windows to it.

Fixes bug 12747909.

Change-Id: I509007ee23fda400b353f483cf6ecce08177763b
/frameworks/base/services/core/java/com/android/server/wm/Session.java
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/wm/Session.java