History log of /frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
11cc516a925ac7fc814dbb0a79a7f0abfbfe1ce1 26-Apr-2017 Wale Ogunwale <ogunwale@google.com> Reduce use of static variables in window manager unit tests

This was causing test cross-contamination since different test might
expect different states from the variables.

Bug: 37682538
Test: tons of it!
Change-Id: Ie8a1ea400695b6346d7dfa3369b5c44bb467a33d
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
9f467df80493159c2a367ef8d08c79a14a7d52aa 04-Apr-2017 Bryce Lee <brycelee@google.com> Merge "Clean up activity/stack associations." into oc-dev
af691c0be7bbfea63e880dd717c51a38a0bc874a 20-Mar-2017 Bryce Lee <brycelee@google.com> Clean up activity/stack associations.

The stack currently holds a reference to resuming and pausing
activities. These are usually cleaned up when the activity ends or
the task is reparented. However, it is possible for an activity to
lose its reference to its task in other areas (such as
ActivityStarter), which can lead to the stack not being updated
correctly.

This changelist adds a method to the ActivityStack to disassociate
the stack from an ActivityRecord. In addition to places where this is
called when an activity ends, this method is invoked on the children
of a task when the task is reparented. The task member variable of
ActivityRecord is also now surrounded by a setter/getter, with the
setter always invoking the dissociation logic on a previous stack.

Test: bit FrameworksServicesTests:com.android.server.am.ActivityRecordTests
Change-Id: Iffeccdb6f011958896271673946acfed28856f53
Fixes: 36387417
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
a95bfff74604bbf05a66ff37947b1b2fb2fdcaa2 31-Mar-2017 Andrii Kulian <akulian@google.com> Fix some WM unit tests

WindowFrameTests#testLayoutNonfullscreenTask and
sizes because test assumed that frame for window was always
bigger than screen size. Now we calculate all frames relative
to real display size.

TestWindowManagerPolicy used in WM unit tests reported incorrect
value from rotationHasCompatibleMetricsLw(), which lead to
DisplayContent#mAltOrientation set to "true" after any rotation
and resulted in shrinked display metrics.

DisplayContentTests#testDefaultDisplayOverrideConfigUpdate was
not restoring the config applied to default display because
it was trying update values in config from non-empty to empty,
which is considered a no-diff.

Test: com.android.server.wm.WindowFrameTests
Test: #testCalculatePolicyCrop
Test: #testLayoutNonfullscreenTask
Test: com.android.server.wm.AppWindowTokenTests
Test: #testLandscapeSeascapeRotationByApp
Test: com.android.server.wm.DisplayContentTests
Test: #testDefaultDisplayOverrideConfigUpdate
Change-Id: Ia0ed46307f67f6b47859209ebcf13253b59b8002
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
55ddf8f9e5d8241130aeac6be7b4978860f41bf8 20-Mar-2017 Wale Ogunwale <ogunwale@google.com> Added support for maxAspectRatio manifest attribute.

- Allows an app to specify the maximum aspect ratio it supports.
- Support for overriding configuration and bounds at the activity
record and app window token level.

Test: cts/.../run-test CtsAppTestCases android.app.cts.AspectRatioTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Bug: 36505427
Bug: 33205955
Bug: 35810513
Change-Id: Ib2d46ed0c546dd903d09d6bb7162a98bd390ba81
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
186d9dee1bea76d3af1cfff0213925245d28c54b 09-Feb-2017 Robert Carr <racarr@google.com> Fix WindowFrameTest error.

It appears somehow we are using real display sizes and it varies from
device to device. This itself is somewhat concerning, but easy enough
to handle. If you look at the line before the modified lines
it seems like this is what I meant to do initially but somehow it didn't happen.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Fixes: 35197592
Change-Id: I05880ba95a8ee3b790fb14daf00c878b4f85095c
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
069bbd382898d3330d284912b3a472495045c363 03-Feb-2017 Wale Ogunwale <ogunwale@google.com> Removed android.R.attr#onTopLauncher

The product that the feature was intended for never launched, so
removing the complexity from the code base.

Test: builds
Change-Id: I75e60ee2da46f6012f03a6077f77bc6b9acecad5
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
5cd907d3d6ceebf8731ef1f69347cce6f76109e9 26-Jan-2017 Wale Ogunwale <ogunwale@google.com> Alert Windows behavioral changes

- Introduced TYPE_APPLICATION_OVERLAY window type. Can be used by apps
to display windows on top of other app windows, but below critical
system windows.
- Deprecate alert window types TYPE_PHONE, TYPE_SYSTEM_ALERT,
TYPE_SYSTEM_OVERLAY, TYPE_PRIORITY_PHONE, and TYPE_SYSTEM_ERROR.
Apps should now use TYPE_APP_OVERLAY for this.
- Apps targetting O or greater are not allowed to add the old alert
window types.
Apps targetting less than O can still add the old types.
Apps with permission INTERNAL_SYSTEM_WINDOW (system signature apps) can
still add the old types.
- Z-order old alert windows types below TYPE_APPLICATION_OVERLAY if
they are added by an app without the INTERNAL_SYSTEM_WINDOW permission.

Test: android.server.cts.AlertWindowsTests
Bug: 33256752
Change-Id: I12170955a7a333151d3387c169b51c53c32164fc
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
d339538a67b7d6bb3d7ad73f31ad20ffc932f891 13-Dec-2016 Winson Chung <winsonc@google.com> Remove dependency on resizable activity to enter PiP.

- Removing the requirement for activities to have both the
resizeableActivity and supportsPictureInPicture attribute
to enter PiP. The activity may still be resized when
entering picture-in-picture.

Bug: 34256643
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: If6bd4721c53072e5518f554a8c7598705517c132
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
829b9cd100ddea44fadb9931c0ff11b11aaba059 23-Jan-2017 Jorim Jaggi <jjaggi@google.com> Fill task snapshot with background color

Make sure to fill the portions that are not covered by the
snapshot are filled with the task background color.

Also fix an issue where the starting window was removed across
configuration changes.

Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotSurfaceTest
Bug: 31339431
Change-Id: I2451be87aff79b337015ab4bba72cfa03c0d3582
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
e1fe7fa288a34ecaaab390f49ef540edc4a6c52d 16-Dec-2016 Wale Ogunwale <ogunwale@google.com> Added TaskWindowContainerController

For linking TaskRecord in AMS to Task window container in WMS.

Bug: 30060889
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
Test: Existing test pass and manual testing.
Change-Id: I16248f3e96e5087ba24198a48a3bd10a12ae76a6
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
72919d2c310db04fdb860e926ccb0bfe6e3aef08 09-Dec-2016 Wale Ogunwale <ogunwale@google.com> Untangle creation of Task from addition of AppToken in WM.

Makes it easier to follow what is going on and also clean-up in
preparation of stand way for AM to interact with containers in WM.

Test: Existing tests pass and manual testing
Change-Id: I91754b6d974dce2f696453cdaed175efb0f10c73
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
fbbde85b045dde25450ce5cef075934102e28339 18-Oct-2016 Robert Carr <racarr@google.com> Some cleanups for window cropping functionality.

At a high level I had two sorts of goals:

1. To remove the weird pinned logic in setSurfaceBoundariesLocked
2. To seperate base crop calculation, and animation exceptions, between
window state and window state animator.

Itemized changes are as follows:

1. Rename updateSurfaceWindowCrop and calculateSurfaceWindowCrop to
applyCrop/calculateCrop. It doesn't feel that "SurfaceWindow" was
adding much.
2. Split screen space and window space (final v non) clip rect
computation, to make clarity about when each one should be used.
3. Eliminate weird case for pinned stack in setSurfaceBoundaries by
building it in to calculateFinalClipRect.
4. Extract calculateSystemDecorRect to WindowState as it mostly accesses
window members.
5. Extract part of calculateCrop to WindowState as
"calculatePolicyCrop". This was the part that fills mSystemDecorRect.
6. Extract wallpaper animation logic outside of calculatePolicyCrop

Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Change-Id: I8ff1dc6ec1206a34994f50ba44d765ab619efbff
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
15dd7efeb7491b80add341b0599027e246d07c6f 03-Nov-2016 Robert Carr <racarr@google.com> Tests for computeFrameLw docked type scenarios.

Add some computeFrameLw unit tests for non fullscreen
windows. A test a day keeps the chase-list away.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Change-Id: Ifd7c07f5d174b35aa73b78ddc3432520fb096bf9
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
e4ee8f8ab836ee115e9cbab360f35773e37fd5d5 31-Oct-2016 Robert Carr <racarr@google.com> Add some more computeFrameLw tests.

This time for producing insets in the fullscreen case.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Change-Id: I2566572af996f024d4b07c3bac945bc8ef7005b9
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
16a4e3cbf7068504e4628ed6e81e7700a6f8edbc 28-Oct-2016 Robert Carr <racarr@google.com> Begin series of computeFrame unit tests

Start with a fixture and some simple unit tests
for WindowState.computeFrame.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Change-Id: I3176837ee60dbd474f22a3b1857f19b4e82afee7
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java