Commit Graph

4817 Commits

Author SHA1 Message Date
yro
947fbce521 Captures metrics on disk when devices reboot and shutdown. Specifically,
1. Create intent receiver in StatsCompanionService to listen to shutdown
events.
2. Create StatsWriter class to handle disk writes and deleting files.
3. Update StatsLogProcessor, ConfigManager, and StatsService to handle
files on disk using StatsWriter.
4. Add a wrapper for ConfigMetricsReport.

Still TODO is to be able to add a guardrail to prevent accumulating
excessive amount files on disk, which will be followed up by another
change.

Test: statsd, statsd_test
Change-Id: Ia0b3af315af545daa8b0078b3700c600aa7c285f
2017-11-22 18:39:23 -08:00
Yifan Hong
6f813c6a98 Merge "android.os.HidlSupport: add getPidIfSharable() for HALs" am: e72b6f0d31 am: 8cf7761747
am: 523665a293

Change-Id: I901c938c2c56ab1c1649c218b37d4ab131cd3c7b
2017-11-22 23:28:56 +00:00
Yifan Hong
8cf7761747 Merge "android.os.HidlSupport: add getPidIfSharable() for HALs"
am: e72b6f0d31

Change-Id: I7ea5895cdfd09786732b597be600329a334c1cb4
2017-11-22 23:06:33 +00:00
Yifan Hong
e72b6f0d31 Merge "android.os.HidlSupport: add getPidIfSharable() for HALs" 2017-11-22 22:51:19 +00:00
Dianne Hackborn
1edf09c99b Merge "Fix issue #67019445: Detect BATTERY_LOW/OKAY" 2017-11-22 18:27:59 +00:00
TreeHugger Robot
f8d6392430 Merge "Output doze mode power in BatteryStats" 2017-11-22 02:55:50 +00:00
Dianne Hackborn
74ed6ecdc4 Fix issue #67019445: Detect BATTERY_LOW/OKAY
Add a new extra that indicates the battery is low.

Test: BatteryConstraintTest updated
Change-Id: I9ff92e15974ea092283a840cd01c860d6586c9b5
2017-11-21 16:33:44 -08:00
TreeHugger Robot
9253eeadbd Merge "The pm command is no more." 2017-11-21 20:31:47 +00:00
Fyodor Kupolov
a8f07c0b1e Merge "Use newline to separate stack trace lines" 2017-11-21 20:26:00 +00:00
TreeHugger Robot
fe731413da Merge "Global a11y action to lock screen" 2017-11-21 20:08:11 +00:00
Fyodor Kupolov
679d998796 Use newline to separate stack trace lines
It was unintentionally removed in patchset 3 of ag/3221176

Test: manual
Change-Id: Iede0bfe1b5d622fda794ddf4a0bcdbdaeeb4939d
2017-11-21 10:42:23 -08:00
Dianne Hackborn
1704e3cf0c The pm command is no more.
It is now just a shell of itself. :)

Also brings in a few fixes to never try to open files from the system
process.

Test: manual
Change-Id: Ia8187196af597046fd2e7092dbf19ce1dc1ea457
2017-11-21 10:17:14 -08:00
Yifan Hong
bb0bd00b00 android.os.HidlSupport: add getPidIfSharable() for HALs
... that returns PID of the process for debuggable builds.
This calls into the C++ equivalent of the function.

Test: lshal
Bug: 68992575

Change-Id: Ia177c709c6930510035cff33dc2389441a76351d
2017-11-20 11:51:07 -08:00
yro
29f69e8f04 Remove IStatsCallback aidl from master
Test: statsd, statsd_test

Change-Id: Idd0fb945b62f3a139a0db07f1014a3c4a4e2f5f8
2017-11-20 11:13:19 -08:00
Cody Northrop
1fe5547eda Merge "Rootless GPU Debug" 2017-11-17 20:33:33 +00:00
Mike Ma
15313c9287 Output doze mode power in BatteryStats
Bug: 69112503
Change-Id: I8d322e5c54fd9042dc26e057528fb479a46be402
Test: local & manual
2017-11-17 10:36:55 -08:00
Cody Northrop
86cedcb583 Rootless GPU Debug
Add the ability to load GPU debug layers from the base
directory of debuggable applications.

This commit:
* Adds a new Setting to Developer options: "Enable GPU debug layers"
* Adds a new way to discover and specify GPU debug layers per app
* Moves much of the layer enabling logic into GraphicsEnvironment
* Removes the JNI component of ApplicationLoaders

Bug: 63708377
Test: Manual, CTS tests to follow
Change-Id: I7d33e9f835f49aa8d86e63bdb32037728bc8b6a4
2017-11-16 22:58:45 -07:00
Calin Juravle
af657ae978 Merge "Workaround to get passed the broken install flow"
am: b0e6508a5b

Change-Id: Icbad0d985b4d8d3e206ee5e426cdd1f58955aec1
2017-11-17 02:46:57 +00:00
Eugene Susla
f9a651d64c Global a11y action to lock screen
Fixes: 25567237
Test: ensure API works using TestBack
Change-Id: I335fd6b44d2c67b53a2c1f6224d16bd798276c8b
2017-11-16 18:41:14 -08:00
Calin Juravle
b0e6508a5b Merge "Workaround to get passed the broken install flow" 2017-11-17 02:36:29 +00:00
Jakub Pawlowski
db968d2085 Merge "Add getProfileParentId (1/2)" am: 7a2c66359a am: b6946d8563
am: 447e453e58

Change-Id: Idd087f45d5fba325f347a8bb0391745ccd0593a0
2017-11-17 01:58:04 +00:00
Jakub Pawlowski
b6946d8563 Merge "Add getProfileParentId (1/2)"
am: 7a2c66359a

Change-Id: Iea965e42bb79f939381971e8dd9466b824606ee0
2017-11-17 01:40:05 +00:00
Fyodor Kupolov
c1b14f8a61 Merge "Provide remote stack trace information" 2017-11-17 00:51:39 +00:00
Jeff Sharkey
5f44aa798b Workaround to get passed the broken install flow
For fresh installs the PM does not set the app uid before invoking
dexopt; so we would always get a bogus GID.

This is a temporary workaround which fixes the GID of newly
installed apps to an arbitrary UNKNOWN gid.

Test: adb install
Bug: 64548938
Bug: 69331247

(cherry picked from commit a73e165c2e)

Change-Id: I6438ec8cfca88df813e166f9ef5821e62faf524a
2017-11-17 00:17:21 +00:00
Makoto Onuki
fb9ec66ef0 Merge "Implement force-all-apps-standly in job scheduler." 2017-11-16 20:48:33 +00:00
TreeHugger Robot
c87846cff5 Merge "Update Build#SERIAL docs about deprecation policy" 2017-11-16 19:48:21 +00:00
Svet Ganov
3bb5ea28c9 Update Build#SERIAL docs about deprecation policy
Test: docs only change

Change-Id: Ic9738764b0d18056401fcd103bfaf95a1701981d
2017-11-16 17:19:51 +00:00
Jeff Sharkey
a73e165c2e Hack.
Test: none
Bug: 69331247
Change-Id: I65807b7e8994746a80e06a8530d9aeb967ea04ca
2017-11-16 16:04:38 +00:00
Makoto Onuki
9be0140c14 Implement force-all-apps-standly in job scheduler.
Bug: 68769804
Test: Manual test

Change-Id: I70c28b7841165414cc8d27bf3466401c541d0569
2017-11-15 17:09:49 -08:00
Jakub Pawlowski
0f1f5b7953 Add getProfileParentId (1/2)
Bluetooth service needs to natively access id of parent profile. Add
method exposing it.

Test: cts-tradefed run cts-dev -m DevicePolicyManager --test
com.android.cts.devicepolicy.ManagedProfileTest#testBluetooth
Bug: 69284968
Change-Id: I697906f2959b0736c1d3cc6af7560c27d77ce11b
2017-11-15 15:37:53 -08:00
TreeHugger Robot
c0c6ee6b6f Merge changes from topic "f2fs_gc"
* changes:
  Run gc + fstrim for idle maintenance
  Add 'idle-maint' command for use from shell
  Add entry points to invoke idle maintenance from vold
2017-11-15 18:47:27 +00:00
Koji Fukui
a834309bd5 Merge "Remove AutofillManagerClient after AutofillManager is finalized" am: dd5384a4fe am: 8d36beec24
am: bb4a13b097

Change-Id: I5f3eea81f662d0396b7fd384b2e91c2087f41c0f
2017-11-15 02:56:16 +00:00
Koji Fukui
8d36beec24 Merge "Remove AutofillManagerClient after AutofillManager is finalized"
am: dd5384a4fe

Change-Id: If0b092c5e18005fb4b8c1fd8405f4d666c98de5a
2017-11-15 02:35:18 +00:00
Treehugger Robot
dd5384a4fe Merge "Remove AutofillManagerClient after AutofillManager is finalized" 2017-11-15 02:23:27 +00:00
Jin Qian
a85b9919f5 Add entry points to invoke idle maintenance from vold
Test: adb shell sm idle-maint [run|abort]
Bug: 67776637
Change-Id: Ibc686a318f6f79a4f8303f56451bc1d573d829e8
2017-11-14 15:02:34 -08:00
Fyodor Kupolov
a81b8c0932 Provide remote stack trace information
The stack is truncated up to 5 lines at parcel time. When unparceling,
a separate RemoteException will be created and set as a cause of the
exception being thrown.

Performance results(in nanoseconds):
timeWriteExceptionWithStackTraceParceling  4168
timeWriteException                         2201
timeReadException                         15878
timeReadExceptionWithStackTraceParceling  23805

Test: manual + ParcelPerfTest
Bug: 36561158
Change-Id: I18b64a6c39c24ab067115874ddb5bd71f556a601
2017-11-14 14:31:32 -08:00
Xin Li
220871a697 Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
TreeHugger Robot
341775bfef Merge "Adds client API for interacting with statsd." 2017-11-14 20:25:09 +00:00
Jeff Sharkey
59eee8d98a Merge "Better, consistent definition of AID_SHARED_GID." am: 7e875df695 am: 42064a3aa2
am: 7018dbc8ab

Change-Id: I02f17bc42dced22c332bb3eb9e195a64ee0b5776
2017-11-14 17:32:59 +00:00
Jeff Sharkey
7018dbc8ab Merge "Better, consistent definition of AID_SHARED_GID." am: 7e875df695
am: 42064a3aa2

Change-Id: I85979f6f70bbef34d6041495310b442cb0405d2d
2017-11-14 17:19:57 +00:00
Jeff Sharkey
7e875df695 Merge "Better, consistent definition of AID_SHARED_GID." 2017-11-14 16:49:30 +00:00
David Chen
adaf8b344e Adds client API for interacting with statsd.
This API will primarily be used by GmsCore to send updated configs.
Also, sending a config will implicitly notify the StatsD that this
client wants to know when it should request data for this config.

We send a broadcast so that all interested subscribers can know if
data needs to be pulled.

Test: Manually tested that sending broadcast works via new adb
command added in StatsService.

Change-Id: I23cdd1df706036e14b32c3d01af30c3d4af819fa
2017-11-13 19:37:12 -08:00
Fyodor Kupolov
2a64dbce69 Merge "Additional System APIs for restricted profiles" 2017-11-14 01:34:17 +00:00
Jeff Sharkey
cbc5867ede Merge "Allow blocking calls when protected against ANRs." 2017-11-10 06:01:40 +00:00
Kurt Nelson
7cd3fa6fa2 Merge "Show Extensible StrictMode APIs" 2017-11-10 03:48:08 +00:00
Kurt Nelson
0e612808fc Show Extensible StrictMode APIs
Bug: 63535923
Test: none
Change-Id: I07382eae70292c6a78fff9eced26dd1916bc783c
2017-11-09 18:18:11 -08:00
Fyodor Kupolov
ca1775623e Additional System APIs for restricted profiles
- isRestrictedProfile - whether the caller is running
  as restricted profile.
- hasRestrictedProfiles - whether the calling user has at least one
  restricted profile associated with it.

Bug: 64122169
Test: UserManagerTest
Change-Id: I178b02a48abc32e126613e0320c4950f455364df
2017-11-09 17:43:01 -08:00
Jeff Sharkey
5918948db7 Allow blocking calls when protected against ANRs.
ContentProviderClient has a nice setDetectNotResponding() method
that detects hanging calls to remote providers, and it can trigger
an ANR to kill the app and release the blocked thread.

We typically don't want to perform blocking calls from the system
server, but we're okay allowing them on CPCs that are using
setDetectNotResponding() to watch for hung clients.

Test: builds, boots
Bug: 69128093
Change-Id: I223aaf1d0cef0f8dee28f800d9e3c101d7449952
2017-11-09 18:32:37 -07:00
Jeff Sharkey
77a34500fe Better, consistent definition of AID_SHARED_GID.
AID_SHARED_GID is a GID shared by a specific app across all users on
the same device.  Bring the UserHandle and multiuser.c implementations
into agreement, and copy/paste the unit tests that verify that both
behave identically.

Since we might now return "-1" when a GID is invalid, have
ActivityManager handle these cases by quickly swapping in the
always-valid getUserGid().

Test: bit FrameworksCoreTests:android.os.UserHandleTest
Bug: 34151068, 64548938
Change-Id: I0463aba923ae5ce1942666359a394ae6cdb7c1f8
2017-11-09 17:42:29 -07:00
Jeff Sharkey
29862ccde0 Merge "Extend JobInfo to support NetworkRequest." 2017-11-10 00:11:58 +00:00