Commit Graph

5239 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
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
Mathew Inwood
9075eac89f Merge "Merge "Configurable hidden API exemptions." am: 4b8285b907 am: 625aa8d33a" into pi-dev-plus-aosp
am: d1cbe1af4f

Change-Id: I2d2a2fc37ff32523f5bd0c92b1d8273b9b8e7c91
2018-03-27 23:28:03 +00:00
Mike Ma
6a48d99363 Merge "Track USB data link in batterystats" into pi-dev am: 3787f73198
am: 6a929dd0cf

Change-Id: I10472eeacc805aa09b4de8588a6779796f3c0926
2018-03-27 22:57:30 +00:00
Jeff Sharkey
ea5682f52d Merge changes Iba4e52c2,I81160755 into pi-dev am: 5681efd1af
am: bbe24ee1bb

Change-Id: I6d7262aedfea7e1635db43a82e8200210a97639e
2018-03-27 22:50:33 +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
Mathew Inwood
c6224bfabb Merge "Configurable hidden API exemptions." am: 4b8285b907
am: 625aa8d33a

Change-Id: I3ead821be36e65c5d6abf7b40ecb3171949656f9
2018-03-27 22:19:51 +00:00
Mike Ma
6a929dd0cf Merge "Track USB data link in batterystats" into pi-dev
am: 3787f73198

Change-Id: Id0d95a1516a21d9c7e9739a1237558f47f3d2e9c
2018-03-27 21:43:23 +00:00
Jeff Sharkey
bbe24ee1bb Merge changes Iba4e52c2,I81160755 into pi-dev
am: 5681efd1af

Change-Id: I2352404cdc27e75a510eb8f999679cfe67aa7ec6
2018-03-27 21:31:19 +00:00
TreeHugger Robot
3787f73198 Merge "Track USB data link in batterystats" into pi-dev 2018-03-27 20:52:57 +00:00
Treehugger Robot
4b8285b907 Merge "Configurable hidden API exemptions." 2018-03-27 20:49:45 +00:00
TreeHugger Robot
5681efd1af Merge changes Iba4e52c2,I81160755 into pi-dev
* changes:
  Public volumes only browsable by mounting user.
  Public volumes are only visible to mounted user.
2018-03-27 20:28: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
Mike Ma
926a97cd3f Track USB data link in batterystats
Record USB data link state in addition to plug & charging state, since
modern USB controller can keep USB data link connected with minimum
current. Device is not acutally charging at those times.
Test: manual
Fixes: 76209292

Change-Id: I0710d547399a631d594488a524682ccc32a25ce6
2018-03-27 12:05:48 -07:00
Jeff Sharkey
0000d8aef8 Public volumes only browsable by mounting user.
We can't browse public volumes mounted for a different user, so don't
return an Intent claiming that we can, since it'll just fail.

Test: manual
Bug: 74056525
Change-Id: Iba4e52c2672258b981d2912875e55949bb35e310
2018-03-27 11:35:35 -06:00
Jeff Sharkey
d1257462c2 Public volumes are only visible to mounted user.
New lower-level security fixes are blocking access, so make these
upper-level APIs reflect those properties.

Test: manual
Bug: 68857050
Change-Id: I81160755180f4f419d8577ea1f18a6ece10c560c
2018-03-27 11:30:55 -06:00
Mathew Inwood
2c6f97d4c9 Configurable hidden API exemptions.
Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.

Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.

Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test:    Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509
Change-Id: Ib1245b69da4dac50c6968f1be62f1a74591dc433
2018-03-27 10:51:10 +01:00
Jeff Sharkey
6b2753c027 Merge "Report final progress when finished copying." into pi-dev am: 01f2ff1aa4
am: 190d3520af

Change-Id: I8cbdc28d8a72d4d3a9ef7a92e2ba6ea95c3618dc
2018-03-27 04:28:07 +00:00
Jeff Sharkey
190d3520af Merge "Report final progress when finished copying." into pi-dev
am: 01f2ff1aa4

Change-Id: I1421da9d91c172fb9afff1e5960a9c86ff2d794d
2018-03-27 03:45:07 +00:00
Jeff Sharkey
549baaa41f Merge "API council requested tweaks to SystemClock." into pi-dev am: 0bff5a6dfa
am: de5b4f3c99

Change-Id: Ic19a334c177c4eaeb3882479f6e5fcfb8644a0fb
2018-03-27 03:29:15 +00:00
Jeff Sharkey
de5b4f3c99 Merge "API council requested tweaks to SystemClock." into pi-dev
am: 0bff5a6dfa

Change-Id: I5b7d6247342eaddb8024842cecfc516ae2aa5fcc
2018-03-27 03:04:34 +00:00
TreeHugger Robot
01f2ff1aa4 Merge "Report final progress when finished copying." into pi-dev 2018-03-27 02:52:26 +00:00
TreeHugger Robot
0bff5a6dfa Merge "API council requested tweaks to SystemClock." into pi-dev 2018-03-27 02:40:24 +00:00
Jeff Sharkey
78232ee54b Merge "Move FIRST_SDK_INT to @TestApi." into pi-dev am: fee443bfab
am: 9d81c54bc8

Change-Id: Iff5a6cb3e48402cf56e1641db4e8fd15d6de7ffb
2018-03-27 02:37:11 +00:00
Jeff Sharkey
9d81c54bc8 Merge "Move FIRST_SDK_INT to @TestApi." into pi-dev
am: fee443bfab

Change-Id: Ie2a6b0bb46ea6275cb2af0ef006472daf5e80b14
2018-03-27 01:53:01 +00:00
Jeff Sharkey
acbde7d5d3 Report final progress when finished copying.
Test: none
Bug: 74120182
Change-Id: I984d38505545b5f18dd3dd9a3c6f714a9ea86edd
2018-03-26 16:54:38 -06:00
Jeff Sharkey
ae1324a32e API council requested tweaks to SystemClock.
Test: none
Bug: 73952114
Change-Id: Idd7aae5161a2326920860a6a9c7137369a4d8b3d
2018-03-26 15:34:24 -06:00
Jeff Sharkey
1da8bb1d8e Move FIRST_SDK_INT to @TestApi.
Test: atest android.os.cts.BuildTest
Bug: 71555186
Change-Id: I92732b930834d9c1e4150417bb3ee8b6839e2b3e
2018-03-26 12:51:03 -06:00
TreeHugger Robot
3691f1c088 Merge "Add tests for VibrationEffect" 2018-03-26 13:56:57 +00:00
Martijn Coenen
cd5c65a8b1 Add new trace tag for AIDL.
So we can auto-generate tracing code for AIDL interfaces.

Bug: 74416314
Test: inspect atrace output
Change-Id: I42eee24358763305d6b4e954087f3331ad20f9b7
Merged-In: I42eee24358763305d6b4e954087f3331ad20f9b7
2018-03-26 09:59:32 +02:00
TreeHugger Robot
ca697c621e Merge "Pass all relevant resolver info to netd" into pi-dev 2018-03-24 15:58:42 +00:00
Martijn Coenen
7b436db89c Merge "Add new trace tag for AIDL." into pi-dev
am: 96b341e43a

Change-Id: I925f2dd25d8fab1ddbef77e69778b7b07c4c1120
2018-03-24 06:17:31 +00:00
Martijn Coenen
96b341e43a Merge "Add new trace tag for AIDL." into pi-dev 2018-03-24 05:58:25 +00:00
Erik Kline
117e7f3c76 Pass all relevant resolver info to netd
Test: runtest frameworks-net passes
Test: manual testing of opportunistic and strict mode works
Bug: 34953048
Bug: 64133961
Bug: 72345192
Merged-In: I96f7747b8f0bb38d95579b688b4c2d068f1229cf
Merged-In: Ia4d896c4cc33c02f0c46d5d4c760cc33b13dff0b
Change-Id: Ia4f1905e1fa60e7a468c2246fb809191d2ba796b
(cherry picked from commit e5dac904d3)
2018-03-23 21:59:24 -07:00
Erik Kline
2b708b55a9 Merge "Pass all relevant resolver info to netd" am: 76f64641bb
am: 3ce3bc4582

Change-Id: I96f7747b8f0bb38d95579b688b4c2d068f1229cf
2018-03-24 01:16:37 +00:00
Treehugger Robot
76f64641bb Merge "Pass all relevant resolver info to netd" 2018-03-23 23:41:11 +00:00
Erik Kline
e5dac904d3 Pass all relevant resolver info to netd
Test: runtest frameworks-net passes
Test: manual testing of opportunistic and strict mode works
Bug: 34953048
Bug: 64133961
Bug: 72345192
Change-Id: Ia4f1905e1fa60e7a468c2246fb809191d2ba796b
2018-03-22 23:50:13 -07:00
Remi NGUYEN VAN
5eaa226243 Merge "Add method to NetworkStatsService for UID stats." am: db89ca3c12
am: af2fafe743

Change-Id: I2527d95000c7500c824ede70f87ecb38e21ed323
2018-03-23 04:01:09 +00:00
Kweku Adams
f2e9567dbf Merge "Only print out services if they did something." into pi-dev
am: 3c0f0b3e8b

Change-Id: Ie216a8b8e75a4e8e384e1390fe8cda97a64171af
2018-03-23 01:50:24 +00:00
Suprabh Shukla
31b5990893 Merge "APIs to suspend packages with SUSPEND_APPS permission" into pi-dev
am: 6affc07065

Change-Id: Icd9ccea90cac3b367b74915f76d39d7f5f740687
2018-03-23 00:09:48 +00:00
TreeHugger Robot
3c0f0b3e8b Merge "Only print out services if they did something." into pi-dev 2018-03-22 23:01:31 +00:00
TreeHugger Robot
6affc07065 Merge "APIs to suspend packages with SUSPEND_APPS permission" into pi-dev 2018-03-22 22:15:31 +00:00
Kweku Adams
14f3d22336 Only print out services if they did something.
This also fixes a failing CTS test.

Bug: 74975371
Bug: 73490092
Test: flash device and check incident.proto output
Change-Id: I4d0f7d1b45b1b620d903f4b46cbdc04dfe314958
2018-03-22 14:12:55 -07:00
Suprabh Shukla
021b57ab8d APIs to suspend packages with SUSPEND_APPS permission
Changed the existing hidden api setPackagesSuspendedAsUser to a system
api setPackagesSuspended that can be called by apps with either
MANAGE_USERS or SUSPEND_APPS permission. Additionally, the suspending
app can now specify optional extra information meant to be used by the
suspended apps and the launcher to deal with this state.

The following other APIs are added:
 - isPackageSuspended(): Apps can query whether they are in a suspended
 state
 - @SystemApi getPackageSuspendedAppExtras(String): Apps with permission
 SUSPEND_APPS can get the appExtras passed to PM when suspending the
 app.
 - @SystemApi setPackageSuspendedAppExtras(String, PersistableBundle):
 Apps with permission SUSPEND_APPS can update app extras for a
 suspended package.
 - getPackageSuspendedAppExtras(): Apps can call to get the appExtras
 passed in to PM when they were suspended.

Test: Can be run via:
atest com.android.server.pm.PackageManagerSettingsTests
atest com.android.server.pm.PackageUserStateTest
atest com.android.server.pm.SuspendPackagesTest

Bug: 74336673
Change-Id: I3b9ed2c8478b34ee2e8986f5f5fddb2839d102e3
2018-03-22 12:59:57 -07:00
Remi NGUYEN VAN
088ff6824f Add method to NetworkStatsService for UID stats.
Useful for clients such as BatteryStats which currently rely
on NetworkStatsFactory. Data at that stage is incomplete as
it does not account for tethering, VT data and corresponding
464xlat corrections.

Test: runtest frameworks-net, CTS tests pass.
Change-Id: I763b77f601c827fd2963204694fb5b45425cc791
2018-03-22 15:31:28 +09:00
Fyodor Kupolov
c434073d49 Merge "Added BinderCallsStatsService" into pi-dev
am: 163a57d71e

Change-Id: I8e4d9269f4cdad6d809f13ffa9e1f1f2447965a3
2018-03-21 23:26:59 +00:00
Fyodor Kupolov
163a57d71e Merge "Added BinderCallsStatsService" into pi-dev 2018-03-21 23:02:58 +00:00
Alexey Kuzmin
febc5d5d7e Add tests for VibrationEffect
Unit-tests for VibtationEffect scaling added
Test: run "atest android.os.VibrationEffectTest"
Bug: 73124917

Change-Id: Ia952f5b7c0f5d4570a02e62f7af93d6a694e13fe
2018-03-21 16:04:59 +00:00
Martijn Coenen
afbfb17df0 Add new trace tag for AIDL.
So we can auto-generate tracing code for AIDL interfaces.

Bug: 74416314
Test: inspect atrace output
Change-Id: I42eee24358763305d6b4e954087f3331ad20f9b7
2018-03-21 13:59:26 +01:00
Lucas Dupin
7970e4fef6 Merge "Screen off animation" into pi-dev
am: 6e7e028b62

Change-Id: Ic45e6ef4e512221509bb7e49cb652576d6588e43
2018-03-21 05:23:54 +00:00