Commit Graph

13256 Commits

Author SHA1 Message Date
Andrii Kulian
5007c67a70 Merge "Don't require post-execution state for onActivityResult" into pi-dev 2018-04-20 23:21:25 +00:00
Andrii Kulian
e55b009a3d Don't require post-execution state for onActivityResult
According to the documentation, onActivityResult() should be called
immediately before onResume(). This, however, was not always the case
in previous releases and fixing this caused some app compatibility
issues.
This CL removes required post execution state for ActivityResultItem.

Bug: 77695691
Test: ActivityLifecycleTests
Change-Id: Id8c02e9b49f9758aac616e37948570722d802de8
2018-04-20 12:58:49 -07:00
Jeff Sharkey
c3c8d16380 Give CTS a way to force-poll network stats.
Collecting network statistics is pretty heavy, which is why we're
throttling callers.  However, to keep CTS running fast, we provide a
way for tests to force a poll event, instead of making them wait for
the throttle timeout.

Bug: 77908520
Test: atest cts/tests/tests/app.usage/src/android/app/usage/cts/NetworkUsageStatsTest.java
Change-Id: Ia792f0cd495023366ff8c4839df54e7da2ae8331
2018-04-20 12:18:23 -06:00
TreeHugger Robot
5e12ebfffd Merge "Defer resizing invisible stacks while drag resizing" into pi-dev 2018-04-20 14:43:38 +00:00
Adrian Roos
a6d6aab0e0 Defer resizing invisible stacks while drag resizing
Works around a source of jank when drag resizing in split
screen mode: instead of immediately resizing the (potentially
numerous) invisible secondary stacks, we defer that until
the user lets go of the handle.

Change-Id: I3b9faa83005fa86185d4e51b2849e3a826b7f6a9
Fixes: 78214347
Test: Open a gazillion (resizeable) tasks. Enter split screen. Drag handle, verify there is no jank
Test: atest RectTest
2018-04-20 15:09:02 +02:00
Jeff Sharkey
ddb15c471c Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev 2018-04-20 02:38:01 +00:00
Winson Chung
1c0d00fac4 Merge "Workaround to ensure we cancel the recents animation prior to starting home" into pi-dev 2018-04-20 01:54:09 +00:00
Jeff Sharkey
0ad6283da7 Protect usage data with OP_GET_USAGE_STATS.
APIs that return package usage data (such as the new ArtManager)
must ensure that callers hold both the PACKAGE_USAGE_STATS permission
and the OP_GET_USAGE_STATS app-op.

Bug: 77662908
Test: atest vendor/xts/gts-tests/hostsidetests/dexapis/host/
Change-Id: I7a85d959f1682d2bd5cf3684415e368fece88101
2018-04-19 15:46:59 -06:00
Winson Chung
703719be15 Workaround to ensure we cancel the recents animation prior to starting home
- It is possible for the call from SystemUI to cancel the recents animation
  to be processed and handled after the virtual key has been processed in
  PhoneWindowManager. This causes a misordering in which the canceling of
  the Recents animation clears the pending start activity remote animation
  (which is waiting for app transition ready).

  Instead, move the canceling of the Recents animation to PhoneWindowManager
  where the nav button is handled, to ensure that we cancel the animation
  on the same thread before we start the activity.

Bug: 73188263
Test: Only able to reproduce so far artificially, which points to this
      misordering

Change-Id: I1f3477acdf988953a5b3cef2e3b2b402af2d9909
Signed-off-by: Winson Chung <winsonc@google.com>
2018-04-19 13:58:19 -07:00
Beverly Tai
39997ea603 Merge "Don't mute ringer if apps can bypass dnd" into pi-dev 2018-04-19 16:08:28 +00:00
Jeff Sharkey
1cd96854d4 Merge "Visit Uris in RemoteViews for granting purposes." into pi-dev 2018-04-19 14:58:02 +00:00
Jeff Sharkey
23b3118f28 Visit Uris in RemoteViews for granting purposes.
RemoteViews end up passing around Uris, so we need to extend Uri
permission grants for them to ensure the recipient of a Notification
object is able to render its contents.

Bug: 9069730
Test: atest frameworks/base/services/tests/uiservicestests/src/com/android/server/notification
Change-Id: Id31b5adaf2ee66113a1b503e32126aeddbf97b28
2018-04-18 21:40:47 -06:00
Jason Monk
e96443e5a7 Make Instrumentation more robust to other inputs
Test: atest cts/tests/app/src/android/app/cts/InstrumentationTest.java
Change-Id: I2d55274ab19c4687ce85c086f2da61a4316b8096
Fixes: 70720100
2018-04-18 15:43:50 -04:00
Beverly
86d076f9d3 Don't mute ringer if apps can bypass dnd
Test: atest RankingHelperTest
Change-Id: I587e5b8d4f6cfe3b384c5b4b9e72de12b6639b6f
Fixes: 77729075
2018-04-18 14:10:19 -04:00
Jason Monk
0c179a94a9 Slices: Don't use public namespace for internal intent
Test: manual
Change-Id: I21bc0a367456b58de195d71fc29cca0dbbca6927
Fixes: 78214697
2018-04-18 10:37:19 -04:00
Julia Reynolds
6013e5cc96 Color and text changes
Change-Id: I2b1837ffd16911be20b5d5f9a7007ff3071265ab
Fixes: 78191129
Fixes: 77810424
Fixes: 78196346
Test: manual inspection
2018-04-18 08:45:12 -04:00
Sudheer Shanka
850c6662b0 Merge "Update Instrumentation.newActivity to pass non-null application." into pi-dev 2018-04-17 22:06:09 +00:00
Patrick Baumann
eb59580abd Checks that secondary instrumentation ABI matches
This adds checks that the secondary ABI for an instrumentation package
matchs that of its target before using it when forced and warns of
mismatches.

Change-Id: I394427721c83cbd1c3c6af6cee24a93b18d8c65f
Fixes: 77152863
Test: gts-tradefed > run gts -m GtsBackupHostTestCases -a armeabi-v7a do not all fail with NPE
2018-04-17 09:55:47 -07:00
TreeHugger Robot
5037beea1c Merge "Docs: update the method description for installKeyPair() to cover parameter change." into pi-dev 2018-04-17 10:53:36 +00:00
Jeff Sharkey
936c0868f8 Merge "Protect usage data with OP_GET_USAGE_STATS." into pi-dev 2018-04-17 00:04:53 +00:00
Jeff Sharkey
6b64925737 Protect usage data with OP_GET_USAGE_STATS.
APIs that return package usage data (such as the new StatsManager)
must ensure that callers hold both the PACKAGE_USAGE_STATS permission
and the OP_GET_USAGE_STATS app-op.

Add noteOp() method that can be called from native code.

Also add missing security checks on command interface.

Bug: 77662908, 78121728
Test: builds, boots
Change-Id: Ie0d51e4baaacd9d7d36ba0c587ec91a870b9df17
2018-04-16 12:44:32 -06:00
Bryce Lee
216b50ad97 Merge "Remove temporary logging." into pi-dev 2018-04-16 17:36:45 +00:00
Benjamin Miller
8040fd1b62 Docs: update the method description for installKeyPair() to cover parameter change.
Update the description to cover the parameter changed from (boolean)isUserSelectable to (int)flags.
Bug: 78113127
Test: make ds-docs and inspect generated HTML.

Change-Id: I8356ffd2d0a61f4c2c62bbf2440a6315399a33ef
2018-04-16 15:52:15 +00:00
Benjamin Miller
cc12c5fb11 Doc change: removed reference to the reverted Password Blacklist feature.
Bug: 73750934
Test: make ds-docs and inspected HTML output.

Change-Id: I545ef13219dc994a4f157cc6f2380eac59331498
2018-04-16 13:45:54 +00:00
Bryce Lee
1d0d514dac Remove temporary logging.
This changelist reverts the following CLs that added temporary
logging:
d946f86f12
a33c13df13
e7b2f6920b

Fixes: 71506345
Test: presubmit
Change-Id: Icfc016a752e5ac2bfb1537be67cda1c4ea3e6442
2018-04-13 10:30:01 -07:00
TreeHugger Robot
b672c1f97c Merge "Fix pinned slices returning different Uris." into pi-dev 2018-04-13 02:48:39 +00:00
Jason Monk
199286b084 Fix pinned slices returning different Uris.
Test: cts
Bug: 77980070
Change-Id: I3c5ba18e40a58371e2c9ccade9d565b38ad12a54
2018-04-12 20:05:27 -04:00
TreeHugger Robot
e0a25acf08 Merge "Changed the appearance of phone call notifications" into pi-dev 2018-04-12 21:01:16 +00:00
Selim Cinek
396cacaaa8 Changed the appearance of phone call notifications
The old design didn't work at all because of various
paddings. The new design adds more paddings and a
new button style

Fixes: 72814598
Test: runtest systemui
Change-Id: I4b4ac0790afe45db97f912740446c6da09620be3
2018-04-12 11:09:23 -07:00
Julia Reynolds
e273f08c0b Add method to get blocked app count
So we can sure it in settings

Test: runtest systemui-notification
Bug: 73018368
Change-Id: Ib0185e97f8e1cec1864ca1e4efb23bf8db097901
2018-04-12 13:48:49 -04:00
Rohan Shah
8e7f23a74c Merge "[Notif] Allow locking importance on notification" into pi-dev 2018-04-12 14:49:11 +00:00
Wale Ogunwale
fb10508cfa Merge "Clean up APIs before declaring API 28." into pi-dev 2018-04-12 12:19:56 +00:00
TreeHugger Robot
aab3304a22 Merge "Fix broken target SDK checks." into pi-dev 2018-04-12 04:40:06 +00:00
Rohan Shah
590e1b2aa5 [Notif] Allow locking importance on notification
Currently locking  only works on channel - this CL allows doing
so on the overarching notification too. Added locking field in
appropriate places in record and surfaced it to other bits via
the RankingHelper.

Test: Visually, reproduced organically (+ deleting /data/ files)
Fixes: 77775657
Change-Id: Ie46093921dd6c1ae3533ded7b87faaa475a631e4
2018-04-11 21:57:49 -04:00
Sudheer Shanka
378207114e Update Instrumentation.newActivity to pass non-null application.
Activity.attach expects a non-null application, so pass an empty
applicaiton if Instrumentation.newActivity is called with a null obj.

Change-Id: If4a131ef46f101b8b4a726886fe76412c45c30ec
Fixes: 73294588
Test: atest tests/app/src/android/app/cts/TabActivityTest.java
2018-04-11 15:49:55 -07:00
Jeff Sharkey
3990ee1c9f Clean up APIs before declaring API 28.
As part of finalizing an SDK, we need to ensure that no new APIs are
marked @Deprecated, since they're typically cleanup that someone
forgot to finish.

Someone forgot to replace Slice.getTimestamp() with Slice.getLong().

Bug: 77588754
Test: builds, boots
Exempt-From-Owner-Approval: SDK finalization
Change-Id: Ic0ec91a43d161a69c1e840c42046ad500b7aeca0
2018-04-11 13:49:21 -06:00
TreeHugger Robot
c2375d9b3d Merge "Fix docs and bug in SliceManager#bindSlice" into pi-dev 2018-04-11 17:52:22 +00:00
Colin Cross
fcbbb72603 Merge "Revert "Update docs to match encryption requirements"" into pi-dev 2018-04-11 17:28:39 +00:00
Colin Cross
4da1774894 Revert "Update docs to match encryption requirements"
This reverts commit cebb55ea9d.

Reason for revert: broke docs builds

Change-Id: I3a4b8d274141efec90fae2ed0b9324194288c635
2018-04-11 17:27:24 +00:00
TreeHugger Robot
6b317915e8 Merge "StatsManager throws exceptions" into pi-dev 2018-04-11 17:02:06 +00:00
Jason Monk
5ffacd06ac Fix docs and bug in SliceManager#bindSlice
Test: cts
Change-Id: I812af1eda072c2af0b29454a05ea777d8f4c3c62
Fixes: 73123733
2018-04-11 10:05:57 -04:00
Florian Mayer
f1657a827f Merge "Address API comments on NetworkStats#getDefaultNetwork." into pi-dev 2018-04-11 13:55:51 +00:00
Robert Berry
bfa13fe76f Merge "Update docs to match encryption requirements" into pi-dev 2018-04-11 13:49:45 +00:00
Lenka Trochtova
27fd8217c1 Hide mandatory backup's API.
Bug: 77801801
Bug: 73750212
Bug: 64012357

Test: make RunFrameworksServicesRoboTests
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test
com.android.cts.devicepolicy.DeviceOwnerTes
cts-tradefed run cts -m CtsBackupHostTestCase

Change-Id: I7699755309b3fbff7c3fec2a06a0f409fd4087de
2018-04-11 12:33:28 +02:00
Lorenzo Colitti
6dba3936a2 Address API comments on NetworkStats#getDefaultNetwork.
Bug: 76449091
Test: android.app.usage.cts.NetworkUsageStatsTest passes
Change-Id: I7f21e0bd7bc4b726058fc2e25542ff2c3173fabe
2018-04-11 10:11:12 +00:00
TreeHugger Robot
2188383b8a Merge "Review of suspend/unsuspend APIs" into pi-dev 2018-04-11 07:36:38 +00:00
Remi NGUYEN VAN
788f87dab6 Merge "Do not register callback for < MIN_THRESHOLD_BYTES" into pi-dev 2018-04-11 03:18:57 +00:00
TreeHugger Robot
555767b616 Merge "API Review: Rename getStandbyBucket to getAppStandbyBucket" into pi-dev 2018-04-11 02:38:26 +00:00
TreeHugger Robot
46d03c2914 Merge "Ensure colors for active permission icons" into pi-dev 2018-04-11 02:22:01 +00:00
Bookatz
4f71629002 StatsManager throws exceptions
When StatsManager fails to connect to statsd, it now throws an exception
for the caller to catch. It also throws an exception of the config being
added is of an unreadable format.

Due to backwards compatibility issues, the old APIs could not be
changed, so new ones were made to replace the old ones. The old ones are
now temporary and will be removed when the compatibility issue is
resolved.

Bug: 77648233
Test: gts-tradefed run gts-dev --module GtsStatsdHostTestCases
Change-Id: Ibea05883a29b9b3ef9927d2f8fe295eb99832ab7
2018-04-10 19:07:32 -07:00