Commit Graph

9541 Commits

Author SHA1 Message Date
Bookatz
dfa52e7c90 Merge "Fix statsd logging in BatteryStats (nesting prob.)" into pi-dev am: dda147e179
am: ed3e8f2e0d

Change-Id: I5853a3382a24c9cd4fe6e62bb2e323feafe31380
2018-03-28 00:21:51 +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
Bookatz
ed3e8f2e0d Merge "Fix statsd logging in BatteryStats (nesting prob.)" into pi-dev
am: dda147e179

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

Change-Id: Ia61896bdedff170d75715094ce87b97dc96994ed
2018-03-27 22:05:14 +00:00
TreeHugger Robot
dda147e179 Merge "Fix statsd logging in BatteryStats (nesting prob.)" into pi-dev 2018-03-27 21:45:46 +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
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
Bookatz
235343daec Fix statsd logging in BatteryStats (nesting prob.)
Several statsd atoms are not logged correctly from batterystats, due to
possible nesting issues (batterystats only reports a single stop at the
end, whereas statsd expects each stop, resulting in statsd thinking that
the event is still continuing). This cl fixes those.

Bug: 69478888
Test: current ones still pass
Change-Id: I3ae8d7cc3d2eec7d4ab2721c83d208384adbf690
2018-03-27 09:32:18 -07:00
TreeHugger Robot
c6d9f7ce1d Merge "More flexible API enforcement policy." into pi-dev 2018-03-27 10:34:38 +00: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
Mathew Inwood
e3299533b5 More flexible API enforcement policy.
This CL adds the basics to set black, dark gray or light gray list
enforcement, rather than just black as before. It's not possible to
actually set the policy per-package yet.

PackageDexOptimizer still uses a single bit, for API checks on/off, rather
than the new enum. It assumes blacklist enforcement internally. This can
be improved in a follow up CL.

(cherry-picked from commit e52130ae4c)

Test: m
Test: Boot device

BUG: 73337509
Change-Id: Ieb4bd9cc439c6a5b8fb9424d8902d8b46aec309f
Merged-In: Idd73c9938592c5c4d67cfb9efefdffed0dd5f262
2018-03-27 09:28:33 +01:00
Jeff Sharkey
b5bbf4b2c3 Merge "API council requested tweaks to TrafficStats." into pi-dev am: 9a6bc76ee8
am: efae42a25d

Change-Id: I65c961a839a3b7404f753d3278c70bc50f918b7f
2018-03-27 04:41:54 +00:00
Jeff Sharkey
efae42a25d Merge "API council requested tweaks to TrafficStats." into pi-dev
am: 9a6bc76ee8

Change-Id: I6b969377a6e268c1377fcc17f2443cb73072fda2
2018-03-27 03:57:46 +00:00
Jerry Zhang
e52c2b98e9 Merge "Write descriptors for Mtp in UsbService" into pi-dev am: df101a4596
am: 03f2788598

Change-Id: If6a24ce29d891159a60e4690eb82ef83b2f82885
2018-03-27 03:57:23 +00:00
Jerry Zhang
03f2788598 Merge "Write descriptors for Mtp in UsbService" into pi-dev
am: df101a4596

Change-Id: If12b1138a9be2f2e653c070c44d54ebfe008b7ff
2018-03-27 03:20:27 +00:00
TreeHugger Robot
9a6bc76ee8 Merge "API council requested tweaks to TrafficStats." into pi-dev 2018-03-27 02:56:24 +00:00
Jerry Zhang
df101a4596 Merge "Write descriptors for Mtp in UsbService" into pi-dev 2018-03-27 02:49:02 +00:00
Jeff Sharkey
121d565b65 API council requested tweaks to TrafficStats.
Test: atest android.appsecurity.cts.AppSecurityTests#testAppFailAccessPrivateData
Bug: 71584606
Change-Id: I4be8a47d54a04f17cbaac735d543ff7d6370376d
2018-03-26 13:12:39 -06:00
Dmitry Dementyev
4a0f627f65 Merge "Remove unimplemented RecoverableKeystoreManager APIs." into pi-dev am: a5b29ffffe
am: 55d2139ec6

Change-Id: I7d5c117889f653ca86c2c9620e68aa741a021252
2018-03-26 02:57:38 +00:00
Dmitry Dementyev
55d2139ec6 Merge "Remove unimplemented RecoverableKeystoreManager APIs." into pi-dev
am: a5b29ffffe

Change-Id: Ida09ae3747db332fcaa4ccb8a2bb774c96ce0caf
2018-03-26 02:43:28 +00:00
Dmitry Dementyev
4da14e00fc Remove unimplemented RecoverableKeystoreManager APIs.
Add some Nullable annotations.

Bug: 75952916,74859770
Test: apct
Change-Id: I25710263a1ba806d49ec11638dab00f3513631a8
2018-03-23 16:30:51 -07:00
Mathew Inwood
6914312812 resolve merge conflicts of daef557352 to pi-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Merged-In: Idd73c9938592c5c4d67cfb9efefdffed0dd5f262
Change-Id: I3d1aeb30b755ca05f32dcd3c46335d1611e0bb50
2018-03-23 16:35:44 +00:00
Mathew Inwood
daef557352 Merge "More flexible API enforcement policy."
am: 69e1cbc3fe

Change-Id: I8b54dcbca3991b2b076e0648e3948c80d74351d3
2018-03-23 15:02:12 +00:00
Mathew Inwood
69e1cbc3fe Merge "More flexible API enforcement policy." 2018-03-23 13:29:03 +00:00
David Srbecky
6ae5d863de Merge "Fix mini-debug-info generation for apps with wrap.sh script." into pi-dev 2018-03-23 13:27:21 +00:00
David Srbecky
bad2250a3b Merge "Fix mini-debug-info generation for apps with wrap.sh script." am: 5c3521d54f am: 5a0a33a8fb
am: fe6b24fec6

Change-Id: I9a97cdf7748d964f0f87b95495f7d456af13b839
2018-03-23 12:25:06 +00:00
David Srbecky
fe6b24fec6 Merge "Fix mini-debug-info generation for apps with wrap.sh script." am: 5c3521d54f
am: 5a0a33a8fb

Change-Id: I39f465a4f6b7cef73217d353a0d6d301298e29d4
2018-03-23 12:17:32 +00:00
David Srbecky
5a0a33a8fb Merge "Fix mini-debug-info generation for apps with wrap.sh script."
am: 5c3521d54f

Change-Id: I22f7893925d2d774cc3e3f10287fb54ae1acf0e1
2018-03-23 12:10:41 +00:00
Mathew Inwood
16073b8a7c More flexible API enforcement policy.
This CL adds the basics to set black, dark gray or light gray list
enforcement, rather than just black as before. It's not possible to
actually set the policy per-package yet.

PackageDexOptimizer still uses a single bit, for API checks on/off, rather
than the new enum. It assumes blacklist enforcement internally. This can
be improved in a follow up CL.

(cherry-picked from commit e52130ae4c)

Test: m
Test: Boot device

BUG: 73337509
Change-Id: Ic0d5b8fa631c2bd583b6fc52b2ee3708c8113f59
Merged-In: Idd73c9938592c5c4d67cfb9efefdffed0dd5f262
2018-03-23 11:44:42 +00:00
Aseem Kumar
e7834b5677 Merge "Delete unimplemented APIs from RecoveryController." into pi-dev am: 0ed26bc8b1
am: b0add1f630

Change-Id: I6a03ba603aa44d0ecc0b3b10dd27b896a4d0879f
2018-03-23 11:44:23 +00:00
Aseem Kumar
b0add1f630 Merge "Delete unimplemented APIs from RecoveryController." into pi-dev
am: 0ed26bc8b1

Change-Id: I7f5abe06978db5f421bfd831ead6e2bc0ebe4cee
2018-03-23 11:31:14 +00:00
David Srbecky
b7df58c81f Fix mini-debug-info generation for apps with wrap.sh script.
Debuggable apps enable mini-debug-info after fork, however, this does not
work with apps with wrap.sh script since they follow different code path.

Enable mini-debug-info generation for those as well.

Bug: 74070426
Test: check that app with wrap.sh generates debug info for JIT now

(cherry picked from commit 28a89370f0)

Merged-In: I489ac3c82bcced8fc0448ed5666f67009cbb043d
Change-Id: I22db2e889e918eb4b64c722289f7c046bb499d1d
2018-03-23 10:53:24 +00:00
David Srbecky
5c3521d54f Merge "Fix mini-debug-info generation for apps with wrap.sh script." 2018-03-23 10:50:32 +00:00
TreeHugger Robot
ec795a609d Merge "Revert "Revert "More flexible API enforcement policy.""" 2018-03-23 08:58:53 +00:00
Remi NGUYEN VAN
e0b85d3ea4 Merge "Add method to NetworkStatsService for UID stats." am: db89ca3c12 am: af2fafe743
am: 5eaa226243

Change-Id: I31c5b9b4a7c6e72910152415894a137f000a5858
2018-03-23 05:50:25 +00:00
Aseem Kumar
933dfc1cd6 Delete unimplemented APIs from RecoveryController.
Bug: 74859770
Test: make update-api builds
Change-Id: Ic547e0ee2ef13995389a71369ffa736a7d83b78a
2018-03-23 05:16:42 +00:00
Selim Cinek
3c8d7ba7ed Merge "Updated the styling for notifications" into pi-dev am: 51856fde2b
am: eabdcf3bef

Change-Id: Ic2a3454078e81ebd564549c1c3984fee6aef7c9d
2018-03-23 04:30:32 +00: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
Remi NGUYEN VAN
af2fafe743 Merge "Add method to NetworkStatsService for UID stats."
am: db89ca3c12

Change-Id: I2c6cba3ebbc8c23ade754cfd411ac54a561b020a
2018-03-23 03:54:13 +00:00
TreeHugger Robot
51856fde2b Merge "Updated the styling for notifications" into pi-dev 2018-03-23 00:02:35 +00:00
Mike Ma
48906e12f3 Merge "Record Bluetooth Cumulative Stats Properly" into pi-dev am: 827a06d4b4
am: 0f8667423f

Change-Id: I5e02a0d410ec64d37a6917471e2cb776c373cc12
2018-03-22 23:53:08 +00:00
TreeHugger Robot
827a06d4b4 Merge "Record Bluetooth Cumulative Stats Properly" into pi-dev 2018-03-22 21:39:03 +00:00
Makoto Onuki
799a29b5c1 Merge "Move provider access stats to frameworks/base" into pi-dev am: c7f6eadffc
am: 3a6af5133e

Change-Id: Ia7ec47f226e74bc65856a80c2f30ba604930962b
2018-03-22 19:15:02 +00:00
Jerry Zhang
6d319b8aaa Write descriptors for Mtp in UsbService
The current model for setting up a functionfs
function is:

UsbDeviceManager#setCurrentFunctions() ->
intent is sent to MtpReceiver to write the descriptors ->
init/hal waits for descriptors to write, then pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer

The main downside of this is a lack of reliability because
the Mtp process could be killed at any point. Normally, a
gadget is unbound if its control endpoint is closed. no_disconnect
works around this, but is still a little janky. In addition, the
extra intent delays the startup of the gadget.

With the new model, UsbDeviceManager writes the descriptors
on initialization. Since it is a system service, it won't be killed.

UsbDeviceManager#setCurrentFunctions() ->
init/hal pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer
MtpServer calls UsbManager#getControlFd to get a dup of the control
endpoint.

Also modify permissions so system server can access mtp files.

Bug: 72877174
Test: Change usb configurations to ptp/mtp
Change-Id: Id17d2b5930f4e1f37ec1b4f00add9d594174ad49
2018-03-22 11:35:19 -07:00
Makoto Onuki
c7f6eadffc Merge "Move provider access stats to frameworks/base" into pi-dev 2018-03-22 17:42:13 +00:00
Makoto Onuki
d0b64e6902 Move provider access stats to frameworks/base
Bug: 76037330
Test: boot and dumpsys activity provider ContactsProvider2
Change-Id: I69cfe0edc98da00d1212f57871646488f87eb8dd
2018-03-22 07:53:57 -07:00
David Srbecky
28a89370f0 Fix mini-debug-info generation for apps with wrap.sh script.
Debuggable apps enable mini-debug-info after fork, however, this does not
work with apps with wrap.sh script since they follow different code path.

Enable mini-debug-info generation for those as well.

Bug: 74070426
Test: check that app with wrap.sh generates debug info for JIT now
Change-Id: I489ac3c82bcced8fc0448ed5666f67009cbb043d
2018-03-22 13:58:19 +00:00
Mathew Inwood
e52130ae4c Revert "Revert "More flexible API enforcement policy.""
This reverts commit 1bc41d4c7d.

Reason for revert: Re-submitting after fixing tests.

Test: See original change
Change-Id: Idd73c9938592c5c4d67cfb9efefdffed0dd5f262
2018-03-22 11:46:57 +00:00