2117 Commits

Author SHA1 Message Date
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
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
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
c489f6234a Merge "Fix activity move between displays" into oc-dev am: c2ec7bf965
am: f44551b505

Change-Id: I8d92ec6381c4063c6f1af6fb229e5bda09ad9380
2017-04-10 19:42:56 +00: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
c4f821c16e Merge "Fix mock of setApplicationRestrictions()" into oc-dev am: c9a6e75682
am: 0a6fd9847c

Change-Id: Ic9cde2e7e7e8c6e338419006401a66cbeca7119b
2017-04-10 12:32:44 +00: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
Jorim Jaggi
0da214bc73 Merge changes I5d41419a,I763be06c into oc-dev am: bc4bd823d9
am: 90fb71789a

Change-Id: I689f16b796cbb7a6157c5a5fcc9242ab4c93c0f6
2017-04-07 22:21:56 +00: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
d15484d130 Merge "Don't delete new notification channels not present in backup" into oc-dev am: 9394a8fc62
am: 0271fbdaf9

Change-Id: Ia9ae659c2994cc4101385bba8cc06db073e8f026
2017-04-07 18:32:09 +00:00
Gustav Sennton
59092b2706 Merge "Remove WebView-fallback code for handling the non-functional stub." into oc-dev am: fc33499c64
am: feb6cf4aa1

Change-Id: I02691db9d70fb04643c9c683044ad14e5263e2ef
2017-04-07 18:28:08 +00: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
Esteban Talavera
89d1d31955 Merge "Add managed profile whitelist to control NotificationListenerServices" 2017-04-07 13:26:30 +00: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