2077 Commits

Author SHA1 Message Date
Julia Reynolds
b9e712ebde Also use the notification's sound for the misc channel
Even if it's nonexistent.

Test: runtest systemui-notification
Change-Id: I1167fdf10b776460de696657dd49ab6f2be85753
Fixes: 37414045
2017-04-17 14:33:30 +00:00
Wale Ogunwale
c4555784be Merge "Move stack to front in-sync with task reparenting" into oc-dev 2017-04-14 17:33:03 +00:00
Daniel Nishi
864d53d6fc Merge "Revert "Use the StorageStatsManager in FileCollector."" into oc-dev 2017-04-14 17:11:30 +00:00
Wale Ogunwale
2719cc134e Move stack to front in-sync with task reparenting
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
2017-04-14 09:45:27 -07:00
TreeHugger Robot
4191d99614 Merge changes I789945c1,I532b0928,I62c6df8b,Ib2bd81ad into oc-dev
* 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)
2017-04-14 04:39:01 +00:00
Winson Chung
19953caad3 Tightening up rotation behavior for PIP (2/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
2017-04-13 17:36:41 -07:00
Dmitry Dementyev
a461e30053 Add ACTION_ACCOUNT_REMOVED to Account Manager.
AccountManagerService sends an intent with the action when account of any type is removed or renamed.

Test: manual, APCT.
Bug: 37280078

Change-Id: I53b1bb9d6cde1edba5c37ecf3e4e13d748b19005
2017-04-13 21:10:50 +00:00
Bryce Lee
61bce9ab13 Merge "Remove window container from empty task when destroying." into oc-dev 2017-04-13 20:10:56 +00:00
Daniel Nishi
3cf3b199e3 Revert "Use the StorageStatsManager in FileCollector."
This reverts commit bd441caaf6fb268b2756bc51304efa038bf58376 due to
causing NPE crashes.

Bug: 37314851
Change-Id: I933eaa3888f84945873de8f7fca0d235306f6aaa
2017-04-13 20:10:39 +00:00
TreeHugger Robot
f726b4aa9a Merge "Always call unbind." into oc-dev 2017-04-13 17:28:52 +00:00
Bryce Lee
840c566d13 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
2017-04-13 10:16:59 -07:00
Julia Reynolds
d178ec489f Merge "Allow notification channels to be silent." into oc-dev 2017-04-13 17:07:46 +00:00
Hyunyoung Song
76c13a5fce Merge "Update API, add more documentation on AdaptiveIconDrawable" into oc-dev 2017-04-13 16:53:43 +00:00
TreeHugger Robot
3d6225b4e2 Merge "Companion device mgr doesn't always exist" into oc-dev 2017-04-13 16:50:50 +00:00
Julia Reynolds
727a728836 Companion device mgr doesn't always exist
E.g. on tvs.

Test: runtest systemui-notification
Change-Id: I1f1fd3cc5d361d3854eef5e5726816b50f5d7eb6
Fixes: 37276184
2017-04-13 15:05:45 +00:00
Julia Reynolds
184b86da38 Allow notification channels to be silent.
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
2017-04-13 11:03:57 -04:00
Julia Reynolds
889280c4c3 Only foreground notis should be sorted higher
Having the ongoing flag is not enough.

Test: runtest systemui-notification
Change-Id: I8a6c15af819f2bb4ad3937ae45d33361663fbe13
2017-04-13 11:03:57 -04:00
Jeremy Joslin
1e2595d792 Always call unbind.
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
2017-04-12 16:47:00 -07:00
Hyunyoung Song
92e3da2354 Update API, add more documentation on AdaptiveIconDrawable
and fix multiple miscellaneous bugs.

Bug: 37079814
Bug: 37100106
Bug: 34829216

Test: $ runtest --path=frameworks/base/core/tests/coretests/src/android/graphics/drawable/IconTest.java
Test: $ runtest --path=frameworks/base/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
Test: $ runtest --path=frameworks/base/core/tests/coretests/src/android/grpahics/drawable/AdaptiveIconDrawableTest.java

Change-Id: I0f5b2232853031bf3860ebea2736e894d17e4d2e
2017-04-12 16:06:45 -07:00
Julia Reynolds
43dd3ba3c4 Merge "Clear calling identity before verifying listeners" into oc-dev 2017-04-12 19:13:05 +00:00
Jorim Jaggi
fe99773a70 Merge "Disallow task snapshot starting window for intent != ACTION_MAIN" into oc-dev 2017-04-12 17:06:15 +00:00
Daniel Nishi
feada91060 Merge "Use the StorageStatsManager in FileCollector." into oc-dev 2017-04-12 16:37:53 +00:00
Julia Reynolds
da78147f29 Clear calling identity before verifying listeners
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
2017-04-12 12:08:56 -04:00
TreeHugger Robot
de99065a40 Merge "Allow companion device mgrs channel access" into oc-dev 2017-04-12 01:22:52 +00:00
Jorim Jaggi
bae01b1a70 Disallow task snapshot starting window for intent != ACTION_MAIN
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
2017-04-11 17:24:26 -07:00
Daniel Nishi
bd441caaf6 Use the StorageStatsManager in FileCollector.
This should vastly improve the speed of the FileCollector.

Change-Id: I7a878a0622bbd6c758fb1d36125414d8b025e709
Fixes: 35807386
Test: Existing tests continue to pass.
2017-04-11 16:53:23 -07:00
Jorim Jaggi
cdef591e52 Improve caching behavior of thumbnails
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
2017-04-11 14:06:42 -07:00
Julia Reynolds
73ed76bc6f Allow companion device mgrs channel access
- Callbacks when channels and groups are modified
- Allow them to read and update channels and groups

Test: runtest systemui-notification
Change-Id: Ie4d02bd4583f71f9faf27603bcc59a1ec0eeaf46
2017-04-11 19:08:59 +00:00
TreeHugger Robot
971fe468a4 Merge "Revert "Revert "Handle case when snapshot dimensions don't match""" into oc-dev 2017-04-11 18:16:00 +00:00
TreeHugger Robot
f4077aa374 Merge "Fix race condition in removeForegroundServiceFlag" into oc-dev 2017-04-11 15:32:12 +00:00
Jorim Jaggi
30d64f3a93 Revert "Revert "Handle case when snapshot dimensions don't match""
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
2017-04-10 18:10:44 -07:00
Andrii Kulian
c2ec7bf965 Merge "Fix activity move between displays" into oc-dev 2017-04-10 19:20:37 +00:00
Geoffrey Pitsch
415e454f55 Fix race condition in removeForegroundServiceFlag
Also fix flake in our tests.

Test: runtest systemui-notification
Fixes: 36550043
Fixes: 36551790
Change-Id: I910e9233a17ef325bcb173c50c00d9982dc72224
2017-04-10 13:52:07 -04:00
Eric Sandness
c9a6e75682 Merge "Fix mock of setApplicationRestrictions()" into oc-dev 2017-04-10 12:18:16 +00:00
Andrii Kulian
51c1b67022 Fix activity move between displays
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
2017-04-07 18:39:32 -07:00
TreeHugger Robot
bc4bd823d9 Merge changes I5d41419a,I763be06c into oc-dev
* changes:
  Introduce android.anim thread in system_server
  Fix thread booster
2017-04-07 22:05:18 +00:00
Jorim Jaggi
ed7993b5d1 Introduce android.anim thread in system_server
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
2017-04-07 22:10:34 +02:00
Geoffrey Pitsch
9394a8fc62 Merge "Don't delete new notification channels not present in backup" into oc-dev 2017-04-07 18:16:35 +00:00
Eric Sandness
a9b8253b38 Fix mock of setApplicationRestrictions()
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
2017-04-07 18:17:24 +01:00
Gustav Sennton
963dbbbdb6 Remove WebView-fallback code for handling the non-functional stub.
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
2017-04-07 12:59:20 +00:00
Sudheer Shanka
e78467f671 Merge "Add tests for verifying network availability on activity start." into oc-dev 2017-04-06 22:06:20 +00:00
Sudheer Shanka
d17ebaba9a Merge "Fix testWaitForNetworkStateUpdate." into oc-dev 2017-04-06 22:05:55 +00:00
Jason Monk
e7ac324c71 Merge "Revert "Handle case when snapshot dimensions don't match"" into oc-dev 2017-04-06 19:51:12 +00:00
Jason Monk
ba53d8ae41 Revert "Handle case when snapshot dimensions don't match"
This reverts commit aea6b74e17a0f7b105999adad50dd20eac17df35.
Bug: 36991071
Bug: 36703868
Change-Id: Ie71992144e78a6580bfce17dfdf20396af80eacd
2017-04-06 18:30:11 +00:00
Sudheer Shanka
cfeb32287a Merge "Don't populate a setting instead of defaulting to 0 when not set." into oc-dev 2017-04-06 17:40:58 +00:00
Calin Juravle
539128f6d6 Merge "Keep track of protected data dirs in DexManager" into oc-dev 2017-04-06 15:55:04 +00:00
Julia Reynolds
9a8f641801 Merge "Remove unneeded methods" into oc-dev 2017-04-06 15:13:13 +00:00
Geoffrey Pitsch
6eccf0016b Don't delete new notification channels not present in backup
Test: runtest systemui-notification
Change-Id: Ib25a680487b20700b9936926c1769a4d8f81b62a
Fixes: 36785228
2017-04-06 11:10:04 -04:00
TreeHugger Robot
343715b1c1 Merge "Do not stop lock task if it is starting background user" into oc-dev 2017-04-06 13:24:48 +00:00
Julia Reynolds
6031533702 Remove unneeded methods
Test: make, make cts, make cts-verifier, runtest systemui-notification
Change-Id: I25b559cfcc30f2d85f468adf840f9124e80f00b0
2017-04-05 18:36:07 -04:00