When reparenting a task to another stack have window manager move the
destination stack to the front at the same time it is reparenting the
task if REPARENT_MOVE_STACK_TO_FRONT is set to avoid jank.
Test: manual
Bug: 37299899
Change-Id: I45678e742188a4871f93a11178f7ab2b60c7bcc3
* changes:
Fixing missing movement bounds notification to SystemUI.
Fixing animating bounds regression.
Tightening up rotation behavior for PIP (2/3)
Tightening up rotation behavior for PIP (1/3)
- Change BoundsAnimationController to be more consistent:
1) Ensure that on animation end is always called even when cancelled to
ensure animation start/end parity in the callbacks
2) Ensure that setPinnedStackSize() is only called between start/end
3) Prevent calling setPinnedStackSize() to the final bounds if the
animation is cancelled
- With that, we add a flag to cancel the current bounds animation when a
rotation happens while the bounds are animating. In addition, we also
add a check from AM to WM before applying the resize during the animation
in the case where WM sends the bounds to AM, but AM lock is held while
updating the exact stack bounds (once that finishes the old stale bounds
would have been applied)
- In addition, we can then move the handling of the of the rotation to the
config change update in WM, if we handle it before the other checks.
Bug: 36879891
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: I62c6df8b349971cc82a7898ae8b26834723faec5
AccountManagerService sends an intent with the action when account of any type is removed or renamed.
Test: manual, APCT.
Bug: 37280078
Change-Id: I53b1bb9d6cde1edba5c37ecf3e4e13d748b19005
This reverts commit bd441caaf6fb268b2756bc51304efa038bf58376 due to
causing NPE crashes.
Bug: 37314851
Change-Id: I933eaa3888f84945873de8f7fca0d235306f6aaa
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
This better accomodates those apps that play their own sounds.
Since most apps don't play their own sounds, update the documentation
on notificationchannel to add guidance about when they should add a
sound.
Fixes: 37237013
Test: runtest systemui-notification
Change-Id: If00b15b1b44da66d24dacb2895e9a6c0a06d1890
Per a recent discussion unbind should always be called, even if
bind() returns false.
Restructured the NetworkScoreService code to allow for easier and
more robust testing of the inner ServiceConnection class.
Bug: 36999204
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Change-Id: I08870b7109cb7f51cdab8b632b7d1d0898c3c015
Also don't throw when can't verify listener.
And update mocking in tests to clean state between tests.
Bug: 36783632
Fixes: 37263567
Test: runtest-systemui-notification, create a secondary user
Change-Id: I5ec95539c9859b67b8fbc7e6a85334e08e6b5a98
We don't want to show a task snapshot if the intent wasn't the
launcher intent. Likely the app will show something different, so
we shouldn't show a snapshot in this case.
Test: AppWindowContainerControllerTests
Test: Open app, make sure we get snapshot window
Test: Open Chrome, go home, Open chrome incognito from shortcut,
make sure no flash
Change-Id: Ib608ba8070ce09f418f1036248d81eebfa354128
Fixes: 35099602
This should vastly improve the speed of the FileCollector.
Change-Id: I7a878a0622bbd6c758fb1d36125414d8b025e709
Fixes: 35807386
Test: Existing tests continue to pass.
Remove the retrieval cache on system_server. It's not needed at
this point.
Instead, we cache the low-res thumbnails on SystemUI side that
will be visible when recents launches. For that, we introduce
a strong thumbnail cache, which gets filled up whenever the task
stack changes.
Also fix a couple of issues like that the visibility report was
pretty wrong as well as some tasks got unloaded because tasks were
bound before layout happend.
Also fix a merge issue where we didn't load the reduced resolution
thumbnail :/
Test: TaskSnapshotCacheTest
Test: Open a couple of apps, open recents, make sure all
thumbnails are already loaded.
Fixes: 36374895
Change-Id: Idbf1acd4ceab6a7c4656e9791e245a8b102017f2
- Callbacks when channels and groups are modified
- Allow them to read and update channels and groups
Test: runtest systemui-notification
Change-Id: Ie4d02bd4583f71f9faf27603bcc59a1ec0eeaf46
This reverts commit ba53d8ae410976709e1413b74173a791e8dead15.
Also fixes that we always had a size mismatch.
Test: TaskSnapshotSurfaceTest
Test: Open app in different orientation than snapshot, make sure
looks ok.
Bug: 36991071
Change-Id: If572b68fd72cec7679984fdff0be5905caba69f4
Fixes: 36703868
1. ActivityConfigCallback might not have been registered
because DecorView was not yet attached to window and ViewRootImpl
was not available. In this CL the callback is set as soon as a
DecorView is attached to window.
2. When private display was removed from system, its stacks were
moved to bottom in AM but moved to top in WM.
3. When reparenting stack visibility of activities should be updated
before reparenting in WM, because otherwise WM will be resizing
windows that should no longer visible and reporting it to clients.
Bug: 34164473
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Test: #testContentDestroyOnDisplayRemoved
Change-Id: I6ccc27d873d0d60d7650659fb25cbfcaaeb0fd07
We create a new thread on which everything is running that
directly impacts window animations, i.e. layout, anim tick and
starting window creation. This is such that any work on
android.display can not lead to jank in the window animation,
specifically lock contention on activity manager lock that blocks
callbacks from android.display into AM can not lead to window
animation jank.
Test: Run animation, take systrace, make sure animation is on
android.anim
Test: AppWindowContainerControllerTestTest: AppWindowContainerControllerTestss
Fixes: 36792959
Change-Id: I5d41419a709b7984724e7053a3afdcc1ffe1aaa2
If any(Bundle.class) is used in the mock's when() clause instead of
nullable(Bundle.class), the mock is not called when the bundle argument
is null.
Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest
frameworks-services
Bug: 36808416
Change-Id: Iab96fe88837e8f27a1da5775494b4611a547f13a
We have already removed the non-functional WebView stub, so we can now
remove the logic ensuring that a primary device user could use any
valid WebView package even when a secondary user did not have any
WebView package to choose from (since all device users should always
have a valid package to use as WebView implementation).
Bug: 34730873
Test: run WebViewUpdateServiceTest tests.
Test: Create new user, disable Chrome for that user, ensure WebView
loads for that user and for the primary user.
Change-Id: Ia77cc2efd9e40a157fb5b68a988425ef15508033