2133 Commits

Author SHA1 Message Date
Wale Ogunwale
0e502c0250 Merge "Move stack to front in-sync with task reparenting" into oc-dev am: c4555784be
am: 7654775b8a

Change-Id: Icdfa610740ae34fe46e83dd3b604651392466ad9
2017-04-14 18:34:34 +00:00
Daniel Nishi
44f3507dfc Merge "Revert "Use the StorageStatsManager in FileCollector."" into oc-dev am: 864d53d6fc
am: 33f74edaa4

Change-Id: Ifd1b2a4c522cb87bed58b47653292567a48c7aa2
2017-04-14 18:32:11 +00:00
Winson Chung
e0c9bc1582 Merge changes I789945c1,I532b0928,I62c6df8b,Ib2bd81ad into oc-dev am: 4191d99614
am: 7031cdda50

Change-Id: I6eb6069005460d372288d79b8a2387518842e73f
2017-04-14 17:40:39 +00:00
Dmitry Dementyev
25b5fa9d79 Merge "Merge "Add ACTION_ACCOUNT_REMOVED to Account Manager." into oc-dev am: 2a30085e5c" into oc-dev-plus-aosp
am: 0bf753d2e5

Change-Id: I362b107071fc3f9c61a5e183d9a4fdd685ded1d7
2017-04-14 17:33:46 +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
Bryce Lee
5aa7e073bc Merge "Remove window container from empty task when destroying." into oc-dev am: 61bce9ab13
am: a27128b8c7

Change-Id: Iadbae988357788bb50bbaebd7e4a580aaefb4308
2017-04-14 16:06:48 +00: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
Mike Tsao
9c1a13271e Merge "Add tests for ag/2086796" 2017-04-13 21:16:31 +00: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
Mike Tsao
cfe4ffecce Add tests for ag/2086796
Fixes: 37192695
Change-Id: Id0b3cbf986490d64cdc5592541dee1b004853503
Test: added
2017-04-13 11:01:31 -07:00
Jeremy Joslin
101c773b81 Merge "Always call unbind." into oc-dev am: f726b4aa9a
am: 3a74fcedad

Change-Id: I7c60a76c4ce352e76042c89841f917f3f97e078a
2017-04-13 17:59:03 +00:00
Julia Reynolds
ed5a121516 Merge "Allow notification channels to be silent." into oc-dev am: d178ec489f
am: 41de81ea75

Change-Id: Ie1d34910cdbd1d534296dd848baa3af8b181357a
2017-04-13 17:40:55 +00:00
Hyunyoung Song
47da8197b1 Merge "Update API, add more documentation on AdaptiveIconDrawable" into oc-dev am: 76c13a5fce
am: e99cf60039

Change-Id: Ib821f43548e938a7652f62ef444e0a116aa8a58b
2017-04-13 17:31:16 +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
94d7dba7f2 Merge "Companion device mgr doesn't always exist" into oc-dev am: 3d6225b4e2
am: a98a3444fb

Change-Id: I4d540fadf69842a45fc86f08f8fc3f10cab5a0c7
2017-04-13 17:12:16 +00: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
223330a0c7 Only foreground notis should be sorted higher am: 889280c4c3
am: 1a6ac41f72

Change-Id: I5560a2f0f3a8d8f589882d0214e2f974d266b092
2017-04-13 15:31:38 +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
b0453ce03d Merge "Clear calling identity before verifying listeners" into oc-dev am: 43dd3ba3c4
am: bf3f4dd7f5

Change-Id: Ib0285d815731cf3ef6ed4c06272584284d54209a
2017-04-12 21:32:54 +00:00
Julia Reynolds
43dd3ba3c4 Merge "Clear calling identity before verifying listeners" into oc-dev 2017-04-12 19:13:05 +00:00
Jorim Jaggi
31bf361a68 Merge "Disallow task snapshot starting window for intent != ACTION_MAIN" into oc-dev am: fe99773a70
am: 7b2bcd0410

Change-Id: I9deaf6b8740be2b162a452b3a06183edcb56fd7b
2017-04-12 17:34:48 +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
35356eed7e Merge "Use the StorageStatsManager in FileCollector." into oc-dev am: feada91060
am: 00ab1deef7

Change-Id: I5bf0caf625bd8798e4edef911d29919c577cee6d
2017-04-12 16:54:38 +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
Pavel Grafov
103f797a4c Merge "Introduce DISALLOW_BLUETOOTH_SHARING." 2017-04-12 10:17:19 +00:00
Julia Reynolds
163bc0480e Merge "Allow companion device mgrs channel access" into oc-dev am: de99065a40
am: a38256bb7b

Change-Id: Ieef842a262e0f10f01ef801d4b8e4f3c80b83ef6
2017-04-12 01:35:07 +00: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
Jorim Jaggi
2c5ecee959 Merge "Improve caching behavior of thumbnails" into oc-dev am: b67e105e74
am: a18b3c475c

Change-Id: I4e3c4b8a1c4757ff1206786ca161acd0a0e59503
2017-04-12 00:16:12 +00: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
Jorim Jaggi
0e0f0dca1d Merge "Revert "Revert "Handle case when snapshot dimensions don't match""" into oc-dev am: 971fe468a4
am: 4d384aa34e

Change-Id: Ia4c5959b59e6a76908fbacbcd9768f9836437719
2017-04-11 18:59:28 +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
Geoffrey Pitsch
2338343f4d Merge "Fix race condition in removeForegroundServiceFlag" into oc-dev am: f4077aa374
am: 752567179c

Change-Id: Ie37d895ed679980c8ce5b079b94fa754efd7245d
2017-04-11 15:55:30 +00:00
TreeHugger Robot
f4077aa374 Merge "Fix race condition in removeForegroundServiceFlag" into oc-dev 2017-04-11 15:32:12 +00:00
Pavel Grafov
7f4ad75218 Introduce DISALLOW_BLUETOOTH_SHARING.
When this restriction is enforced Bluetooth sharing option should not be
present when the user tries to share something. Previously this was handled
by explicitly disabling bluetooth sharing activity during managed
provisioning, now this code is to be removed (see topic CLs) and the same
behavior should be achieved by setting this restriction for profile owners
by default.

In Bluetooth:
1) Don't check restrictions on boot, it is invoked anyway through the
  listener during boot.
2) Ignore when the restriction is "changed" from true to true - i think
  it was the initial intent in that condition.
3) Disable the component for a particular user and not always the
  system user. This is something that has to be fixed in O I think since
  currently in secondary user the bluetooth itself gets disabled but the
  sharing thing still shows up.

In DPMS:
1) Now ActiveAdmin for PO also contains a set of restrictions applied by
  default.
2) Now all ActiveAdmins for POs are loaded quite early. That shouldn't
  have huge impact though.

Bug: 36249732
Test: run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testBluetoothSharingRestriction
Test: run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java
Change-Id: I78c4ffbd503c4a10138e8c0862a9f206f24c5631
2017-04-11 12:22:09 +01:00