History log of /frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1533b2b2f9934a493030658c4788d00bdad5eb2d 15-Sep-2017 Bryce Lee <brycelee@google.com> Consider task's root activity when determining if resizable.

We consider an activity resizable if the root activity of the its
parent task is resizable. This changelist adds this condition to
consideration.

Change-Id: I4162ff7eb6cad3f4a3f9fdf35ccc0b0d2383ff15
Fixes: 65668913
Test: bit FrameworksServicesTests:com.android.server.am.ActivityRecordTests#testCanBeLaunchedOnDisplay
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerDisplayTests#testLaunchNonResizeableActivityFromSecondaryDisplaySameTask
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
9f6affdde2555c91e5dd98ae16d58cddad651261 01-Sep-2017 Bryce Lee <brycelee@google.com> Do not consider overlays when finding task to reuse.

An overlay should not be considered the top activity in a task when
considering a task when launching an activity. Doing so will alter
the behavior of launch modes, such as singleTop and singleTask. In
these cases, the developer has chosen such mode with the expectation
that their task will not have activities from other tasks placed on
top, which is the case for features such as locking a work profile.

This changelist addresses the issue by not considering an overlay to
be the top activity when finding a task based on ActivityRecord.

Fixes: 64839155
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackTests#testFindTaskWithOverlay
Change-Id: I2684baf6929e5af321404e2eef597f456ff87ee8
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
29a649da5f8097efdb28d6982edbe43091eda44f 18-Aug-2017 Bryce Lee <brycelee@google.com> Remove activity from stopping activities once resumed.

Previously we were waiting for the activity to become visible before
removing from this list. This can lead to a race condition where the
activity is resumed and the stopping activities are cleaned up. If
the activity has not become visible, the resumed activity will be
stopped.

This CL addresses the issue by removing the activity from the
stopping activities list once resume has completed.

Change-Id: Ic33906327e538920961e60064a6ae976864509be
Fixes: 63804822
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackSupervisorTests#testStoppingActivityRemovedWhenResumed
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
f62360cafa21aef36f2176512d4a5241ae38aa8c 17-Mar-2017 David Stevens <stevensd@google.com> DO NOT MERGE Let external activities run when the primary display is off

- Make activity sleep state independent of power manager wakefulness
state. The state is now entirely dependent on sleep tokens (and the
voice interactor).
- Make sleep tokens operate on a per-display basis (and convert the
keyguard to a sleep token).
- Make ActivityStackSupervisor acquire/release sleep tokens for
non-default displays when the displays are turned on/off.
- Make WindowManagerService.okToDisplay operate on a per-display basis.

Bug: 34280365
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testExternalDisplayActivityTurnPrimaryOff
Test: #testLaunchExternalDisplayActivityWhilePrimaryOff
Test: #testExternalDisplayToggleState
Change-Id: I92086d7006a67b4b4f320c9bb3aa606954f85012
(cherry picked from commit 9440dc87a60dbe8b1065a3f21d85b48555859b1f)
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
94e82d9b0e7ee2e657564e5904b556eeefc1d423 14-Jul-2017 Andrii Kulian <akulian@google.com> DO NOT MERGE ActivityView be gone!

This hidden functionality is no longer support/needed since
we now have multi-window/display. A new view group class
will be added later that uses multi-window to support remaining
functionality of this class.

Test: go/wm-smoke
Change-Id: Ie2fa2de92841d33199da9988741905060dd1ddf4
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
3a1619d68e829829848cf0c41fcf86e4671042d8 07-Jul-2017 Andrii Kulian <akulian@google.com> Position app with short aspect ratio opposite of nav bar

When an application doesn't support tall aspect ratio of the
screen where it's displayed, it should be positioned on the
opposite side from navigation bar. It's supposed to create
an effect of extended black nav bar.

Bug: 62893418
Test: go/wm-smoke
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarBottom
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarLeft
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarRight
Change-Id: I2cd3d236ee8d0cc263fee4c0a436d78c755eb9b7
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
a71febe2aaa2796cde538aa21c3e2ff006e7d3f3 22-May-2017 Winson Chung <winsonc@google.com> Fix issue with aspect ratio not applying correctly when PIP is expanded

- The current code always used the default min edge size to calculate the
PIP bounds when the aspect ratio changes, so if a PIP app sets the aspect
ratio in response to the an action, the bounds would be resized down
incorrectly.
- This CL fixes the issue with current aspect ratio not being initialized
correctly, and also ensures that SystemUI always updates the min edge
size when expanding the PIP.

Bug: 38324839
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: go/wm-smoke

Change-Id: Ida0f68b2f8f93f9bf1915dda8762a156704d4709
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
943ebe705cece8f643d9d7ace005322ddf114d86 04-May-2017 Bryce Lee <brycelee@google.com> Prevent NPE in ActivityStack#shouldbeVisible.

If there is a visibleBehind activity, we check to see if the top
activity in the top stack is not fullscreen. However, it is possible
for the top stack to be empty. This can happen if the previously top
activity is being re-installed.

This changelist addresses the issue by checking if the top activity is
null before referencing it.

Change-Id: I6de904bed1c7035ed1e112c9cacc1b6c2bac4e8f
Fixes: 32180256
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackTests#testShouldBeVisibleWithVisibleBehindActivity
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
9c844410572cd432f589d3e1c5a8ea5b67647775 28-Apr-2017 Winson Chung <winsonc@google.com> Fixing test due to null PiP default bounds.

- Also moving the default bounds call into the pinned stack window
controller

Bug: 37682538
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackSupervisorTests\#testReplacingTaskInPinnedStack

Change-Id: Id6608d484617ec1a596e608aab649a082b4b1e95
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
3345c4ea9687bb35a8c419ec21ec90b49616b2c9 25-Apr-2017 Bryce Lee <brycelee@google.com> Don't call adjustFocusedActivityStackLocked on finished activity.

When an activity is finished, adjustFocusedActivityStackLocked is
already called on the associated record and the task association is
lost. Calling it again is redundant and leads to a crash as we
assume the task is still associated with the activity.

Change-Id: Ie7cc9ad8b1542d7415b7409e539c88d3b4ec8dcd
Fixes: 37329424
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackTests#testStopActivityWhenActivityDestroyed
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
04ab3466fabb7244660adf54740a4f60874b02a1 11-Apr-2017 Bryce Lee <brycelee@google.com> Allow at most one pinned stack task.

This changelist enforces only one task may be present in the pinned
stack at a time. If a task is already persent, the existing task is
moved to the fullscreen stack.

Fixes: 36844394
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerPinnedStackTests#testPipMovedToFullscreenStack
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackSupervisorTests#testDisallowMultipleTasksInPinnedStack

Change-Id: Iaf0fbda6df835d93738fdf6f7f3a8c5956c2b262
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
840c566d13b8c84ad5edb37006176d6731bad250 13-Apr-2017 Bryce Lee <brycelee@google.com> Remove window container from empty task when destroying.

Previously, the window container was being removed whenever we were
removing the task in a destroy mode. However, this caused issues
where an activity may still be present in the task record, leading to
a subequent change to limit this to tasks with overlays. This led to
the situation where the window container would not be destroyed when
it was supposed to, such as moving an activity to recents, but
otherwise destroying.

This changelist addresses the issue by always removing the window
container from tasks when removed from their parent stack in a
destroy mode and empty. In the recents flow, this will fire and
cleanup when the activity is destroyed.

Change-Id: I87548d6ff8e4d77b6294504d7cc78370cd5d31fa
Fixes: 37301159
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackTests
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
3115bdf15af01ea43c28e1251657c7154e9acc91 05-Apr-2017 Bryce Lee <brycelee@google.com> Fix ActivityRecordTests.

Tests are not guaranteed to run on the same thread as setup methods.
Therefore, we must ensure any loopers used are already created by the
time the test runs. We do this now by creating a HandlerThread and
referencing its Looper later. Loopers are initialized per
HandlerThread, which will allow us to both isolate its usage and
guarantee the Looper initialization by test time.

Change-Id: If15494783959e5c399375033253cef69b921ff84
Fixes: 36916522
Test: bit FrameworksServicesTests:com.android.server.am.ActivityRecordTests
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
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/am/ActivityTestsBase.java