Commit Graph

13228 Commits

Author SHA1 Message Date
Dianne Hackborn
40eca65f1a Merge "Work on issue #74404949: Screen state usage API" into pi-dev am: 00f3c4333e
am: 30181d3bc1

Change-Id: I4a3ee230b1ce30022f85e271d0f0708f73af4026
2018-03-28 01:04:17 +00:00
Christopher Tate
09f1c5923e Merge "Regularize some wallpaper APIs" into pi-dev am: 17b6490ce1
am: f88a8023d6

Change-Id: Ib3e0936289cee178d3c95adf0cd40833fc8ca0d4
2018-03-28 00:46:06 +00:00
Dianne Hackborn
30181d3bc1 Merge "Work on issue #74404949: Screen state usage API" into pi-dev
am: 00f3c4333e

Change-Id: I3bff628d13f1089213edf84aa1feffd683b99cd7
2018-03-27 23:37:02 +00:00
Christopher Tate
f88a8023d6 Merge "Regularize some wallpaper APIs" into pi-dev
am: 17b6490ce1

Change-Id: I3ce564689cea8a2172dc682813c7bd0dcec3b199
2018-03-27 23:02:45 +00:00
Dianne Hackborn
00f3c4333e Merge "Work on issue #74404949: Screen state usage API" into pi-dev 2018-03-27 22:40:51 +00:00
TreeHugger Robot
17b6490ce1 Merge "Regularize some wallpaper APIs" into pi-dev 2018-03-27 21:50:31 +00:00
Dianne Hackborn
ced54398cc Work on issue #74404949: Screen state usage API
Add usage stats tracking of screen time.  There are two new
events, one for when the device is an interactive state, the
other for when it is non-interactive.  Also add a whole new
usage stats API for retrieving aggregated data that is associated
with general events, not particular packages.  In this case
it allows you to find the time the device spent interactive
and non-interactive and the count of the transitions in to
each of those states.

Bug: 74404949
Test: atest CtsUsageStatsTestCases:UsageStatsTest\#testInteractiveEvents

Change-Id: Ibe6d55e2aecb0c8519b1358644378ec5c7a4250d
2018-03-27 13:27:20 -07:00
Andrii Kulian
17e5c4de18 Merge "Use transaction for local activity relaunch" into pi-dev am: dbac87dd40
am: cde24090c7

Change-Id: Id27647a68be252e83b854a4a414da0147d1108b1
2018-03-27 18:43:59 +00:00
Andrii Kulian
cde24090c7 Merge "Use transaction for local activity relaunch" into pi-dev
am: dbac87dd40

Change-Id: Iea33b11413999fe45f6d0e28d376b18e68fc5124
2018-03-27 18:24:50 +00:00
Andrii Kulian
dbac87dd40 Merge "Use transaction for local activity relaunch" into pi-dev 2018-03-27 17:24:42 +00:00
Jeff Sharkey
4b565cc5c7 Merge "API council requested tweaks to JobInfo." into pi-dev am: a9975804a2
am: 120b8aa395

Change-Id: Ibf29247be5317945b5326b6cfc58f07263f20eb9
2018-03-27 16:56:36 +00:00
Jeff Sharkey
120b8aa395 Merge "API council requested tweaks to JobInfo." into pi-dev
am: a9975804a2

Change-Id: I40217f8df995db19a59e0253b3d8d0440d57acb3
2018-03-27 16:43:25 +00:00
TreeHugger Robot
a9975804a2 Merge "API council requested tweaks to JobInfo." into pi-dev 2018-03-27 16:25:23 +00:00
Jeff Sharkey
8474ca0246 API council requested tweaks to JobInfo.
Split network estimates into separate download/upload values, and
add missing accessor methods.

Test: none
Bug: 74945408, 74032541, 74032817
Change-Id: I4c92b8a867690dc4f048701f13142655c3370958
2018-03-27 08:41:42 -06:00
Eric Sandness
209305e5a0 Merge "Permission Check For DPM.isDeviceProvisioned" into pi-dev am: 9f36c26f83
am: f21a3796cb

Change-Id: Ib1879c2e4da140611ee08cb32afef7cd2c2198dc
2018-03-27 12:42:53 +00:00
Eric Sandness
f21a3796cb Merge "Permission Check For DPM.isDeviceProvisioned" into pi-dev
am: 9f36c26f83

Change-Id: Ie798dde6593e6d0786f541a5c2512eb388ca5554
2018-03-27 12:36:01 +00:00
Eric Sandness
9f36c26f83 Merge "Permission Check For DPM.isDeviceProvisioned" into pi-dev 2018-03-27 12:25:53 +00:00
Yueming Wang
a91c4ac73c Merge "Add javadoc to explain ApnSetting conflict." into pi-dev am: 3cc7c4fc76
am: 5148a2e55f

Change-Id: I98a93f4f9dad2f50c18b5a14c3500d8598368a33
2018-03-27 10:45:58 +00:00
Yueming Wang
5148a2e55f Merge "Add javadoc to explain ApnSetting conflict." into pi-dev
am: 3cc7c4fc76

Change-Id: I2370b8cc9b5b730d2bf2c4f522d955e952f74bdb
2018-03-27 10:30:37 +00:00
Yueming Wang
3cc7c4fc76 Merge "Add javadoc to explain ApnSetting conflict." into pi-dev 2018-03-27 10:19:13 +00:00
Eric Sandness
d6382ed1a1 Merge "Permission Check For DPM.getUserProvisioningState" into pi-dev am: 1ad8367249
am: 135b4fa15c

Change-Id: I927b602ff188ec92c155503fe2629364ddd7d49f
2018-03-27 10:09:51 +00:00
Eric Sandness
135b4fa15c Merge "Permission Check For DPM.getUserProvisioningState" into pi-dev
am: 1ad8367249

Change-Id: I8b33dcb4338ffa47c11d06f30e4d7b36f275fcd9
2018-03-27 10:03:32 +00:00
Eric Sandness
1ad8367249 Merge "Permission Check For DPM.getUserProvisioningState" into pi-dev 2018-03-27 09:52:58 +00:00
Eric Sandness
df30c7d2e0 Permission Check For DPM.isDeviceProvisioned
Require the caller of DPM.isDeviceProvisioned() to hold the MANAGE_USERS
permission.  The only callers should be within the framework itself, or
apps involved in device provisioning which already hold this permission.

Bug: 62343414
Test: Set TestDPC as Device Owner and use it to reset password
Test: com.android.server.devicepolicy.DevicePolicyManagerTest
Test: com.android.server.locksettings.LockSettingsServiceTests
Test: com.google.android.gts.devicepolicy.DevicePolicyManagerTest
Change-Id: Ie53deb5ba8679a5b431f2a8da60ec9710c44d56f
2018-03-27 09:13:11 +00:00
yuemingw
6586f05457 Add javadoc to explain ApnSetting conflict.
As per discussion with Amit, it's better to define "conflict"
of ApnSetting in DevicePolicyManager API javadoc.

Bug: 72153573
Test: not required.
Change-Id: I765dace36a3c9c491c988dc0a87479cdec620e37
2018-03-27 08:29:05 +00:00
Andrii Kulian
914aa7da7f Use transaction for local activity relaunch
To know that onPostCreate callback should be executed we should use
TransactionExecutor for the entire transaction. It will fill
PendingActions object during the launch and the callback will be
triggered after onStart.
This CL changes local activity relaunch to use Lifecycler
infrastructure. We should immediately execute local recreate
requests, because if we wait until the scheduled message to be
handled, we may already be in a different state and final state
request in the scheduled relaunch transaction will already be
obsolete.

Bug: 72029061
Bug: 64610483
Bug: 76088057
Bug: 73747058
Test: ActivityLifecycleTests
Change-Id: Ia53ecd199c83d030932c4493064e58568805f2a5
2018-03-26 23:40:01 -07:00
Jason Monk
8cf36dca52 Merge "Security fixup for Slices" into pi-dev am: fc704e2fd7
am: fe54f0c260

Change-Id: I3630b6130f2e51fee1a76364c424a20728213251
2018-03-26 22:13:16 +00:00
Jason Monk
fe54f0c260 Merge "Security fixup for Slices" into pi-dev
am: fc704e2fd7

Change-Id: I7a3dfda74afdbaa1c77058b3a27c86899c1b05a3
2018-03-26 21:59:46 +00:00
Jason Monk
fc704e2fd7 Merge "Security fixup for Slices" into pi-dev 2018-03-26 21:44:38 +00:00
Christopher Tate
105540da41 Regularize some wallpaper APIs
Specifically:

  + support clearing wallpapers, with similar permissions to setting
  + support adjusting padding, with similar permissions as defining
    wallpaper dimension hints (which behave somewhat similarly)

Bug: 62343054
Test: atest CtsPermissionTestCases:NoWallpaperPermissionsTest
Change-Id: Ia25f2791a20564c58096a25e6e189aa3b06b411c
2018-03-26 11:26:50 -07:00
Benjamin Franz
cc8892f821 Merge "Expose hidden API to check whether a given package is state protected" into pi-dev am: 3ff20e2257
am: ea32bc4e38

Change-Id: I1b2cdac459c7c099783fa078eb2f009a645ba715
2018-03-26 09:42:05 +00:00
Benjamin Franz
ea32bc4e38 Merge "Expose hidden API to check whether a given package is state protected" into pi-dev
am: 3ff20e2257

Change-Id: I797fd24aff1afa3e37e6b5f4dbd93042b19ac369
2018-03-26 09:29:29 +00:00
Benjamin Franz
3ff20e2257 Merge "Expose hidden API to check whether a given package is state protected" into pi-dev 2018-03-26 09:15:41 +00:00
Suprabh Shukla
6c4decc9bb Merge "Guarding collisions in TimeSparseArray" into pi-dev am: 6da53af9c5
am: b334f1b2e9

Change-Id: I7e65cc4b1caa08b8303fd2c4db1fe7e0cf0b2481
2018-03-24 22:57:56 +00:00
Suprabh Shukla
b334f1b2e9 Merge "Guarding collisions in TimeSparseArray" into pi-dev
am: 6da53af9c5

Change-Id: Ic8ba83876a867fc57100b33b47cd8ef51be39dfe
2018-03-24 22:49:37 +00:00
TreeHugger Robot
6da53af9c5 Merge "Guarding collisions in TimeSparseArray" into pi-dev 2018-03-24 22:36:21 +00:00
Andrii Kulian
2b55287fe5 Merge "Revert "Use transaction for local activity relaunch"" into pi-dev am: 603b911e48
am: 7558a0b30c

Change-Id: Ic7c7b699f217e69ed6f6f852145fe276f4a8c49c
2018-03-24 05:25:18 +00:00
Wale Ogunwale
0cc85cd5f4 Merge "Merge "Don't show unsupported sdk warning in test harness." into pi-dev am: 444885b10d" into pi-dev-plus-aosp
am: cd6eae6cce

Change-Id: Id6e530efea409379ac882843824baaf3260cb264
2018-03-24 04:54:12 +00:00
Andrii Kulian
7558a0b30c Merge "Revert "Use transaction for local activity relaunch"" into pi-dev
am: 603b911e48

Change-Id: I9443d43e9758916eb2ec6721c1ca9992bd7b9d87
2018-03-24 01:44:46 +00:00
Wale Ogunwale
21315b15b7 Merge "Don't show unsupported sdk warning in test harness." into pi-dev
am: 444885b10d

Change-Id: I750ffef919badf38d759a32b1067702692d2a9c2
2018-03-24 01:21:39 +00:00
Suprabh Shukla
2811d92483 Guarding collisions in TimeSparseArray
TimeSparseArray - used to store UsageEvents - can keep at most one event
per millisecond, which can result in an event being replaced by another
event that occurred close enough that the system records it at the same
millisecond.

Test: atest android.app.usage.TimeSparseArrayTest

Fixes: 73832306
Change-Id: I860a101ab098f65d5c5832758832f43572865690
2018-03-23 17:51:20 -07:00
Andrii Kulian
603b911e48 Merge "Revert "Use transaction for local activity relaunch"" into pi-dev 2018-03-23 23:36:02 +00:00
Wale Ogunwale
444885b10d Merge "Don't show unsupported sdk warning in test harness." into pi-dev 2018-03-23 23:32:54 +00:00
Amith Yamasani
78f3b26d6c Merge "Merge "Provide app launch count in UsageStats" into pi-dev am: 8808edb063" into pi-dev-plus-aosp
am: b2312dc99b

Change-Id: Id475a570188d5109e3d77d77f47e77dc6376ff51
2018-03-23 21:32:26 +00:00
Amith Yamasani
980b453e17 Merge "Provide app launch count in UsageStats" into pi-dev
am: 8808edb063

Change-Id: I62a73e647fcbfffe5a56fe8229d8fb79738e2a80
2018-03-23 20:49:16 +00:00
Petr Cermak
048a8cd2d4 Merge "Annotate RemoteInput#SOURCE_* with @IntDef" into pi-dev am: 4341a66b03
am: fcca48b648

Change-Id: Id8880eb77a36a137756ed329469079d699aaf042
2018-03-23 19:17:06 +00:00
Amith Yamasani
8808edb063 Merge "Provide app launch count in UsageStats" into pi-dev 2018-03-23 19:13:22 +00:00
Jason Monk
ac11238291 Security fixup for Slices
- Allow slice providers to override grant flow
 - Remove overriding caller, that was a terrible idea
 - Move where the same app check happens to allow for CTS

Test: CTS
Bug: 69168488
Change-Id: I61c81c0665a08420b7bc83e3660657b62b2cd6a8
2018-03-23 15:08:11 -04:00
Eric Sandness
3780c09c76 Permission Check For DPM.getUserProvisioningState
Require the caller of DPM.getUserProvisioningState() to hold the
MANAGE_USERS permission.  All callers should be apps involved in device
provisioning, which already hold this permission.

Bug: 62343414
Test: Run Device Owner sync auth provisioning manually
Test: Set up work profile with managed account manually
Test: com.android.server.devicepolicy.DevicePolicyManagerTest
Test:
com.android.managedprovisioning.finalization.UserProvisioningStateHelperTest
Test: com.google.android.setupwizard.tests.activity.QrScanControllerTest
Change-Id: Ib85433586d4dfb89019ca223fb925aca3d4bbf67
2018-03-23 18:59:41 +00:00
Petr Cermak
fcca48b648 Merge "Annotate RemoteInput#SOURCE_* with @IntDef" into pi-dev
am: 4341a66b03

Change-Id: I0d1a41c52cfe2b24eaa23cbd8fc49a6ae6493c2f
2018-03-23 18:55:42 +00:00