Commit Graph

9481 Commits

Author SHA1 Message Date
goneil
8e21069a44 Merge "Migrate from config.xml to SystemConfig for disabled carrier apps" into pi-dev
am: 781e50a49b

Change-Id: I339112b7264524e9bd375c9e3f20914964a2f8c5
2018-03-27 22:48:15 +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
781e50a49b Merge "Migrate from config.xml to SystemConfig for disabled carrier apps" into pi-dev 2018-03-27 21:48:06 +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
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
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
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
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
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
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
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
TreeHugger Robot
827a06d4b4 Merge "Record Bluetooth Cumulative Stats Properly" into pi-dev 2018-03-22 21:39:03 +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
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
TreeHugger Robot
245f8e5ab5 Merge "Make sure at least one non-aux IME is enabled" into pi-dev 2018-03-22 03:08:38 +00:00
TreeHugger Robot
dcccfd9742 Merge "ScheduledJobStateChanged: add stop reason" into pi-dev 2018-03-22 01:30:52 +00:00
Selim Cinek
c7f5a827d6 Updated the styling for notifications
The new notifications now have different font weights
and colors to make the shade more readable.

Fixes: 69168591
Test: runtest systemui
Change-Id: I0b635724fa122d292841e56efa84aa57fa364300
2018-03-21 17:03:38 -07:00
Fyodor Kupolov
163a57d71e Merge "Added BinderCallsStatsService" into pi-dev 2018-03-21 23:02:58 +00:00
Mike Ma
561a8d9d60 Record Bluetooth Cumulative Stats Properly
updateBluetoothStateLocked does not check for null values, causing
NPE. This patch reverts part of the change in 3445570. Instead, an
update method is added to LongSamplingCounter, which accepts
cumulative values.
Fixes: 75963520
Test: LongSamplingCounterTest

Change-Id: I89eba8e20f8f055c60f4ff250653345a22536189
2018-03-21 13:09:28 -07:00
TreeHugger Robot
b24d84b222 Merge "Category message is sufficient for message notif" into pi-dev 2018-03-21 17:43:40 +00:00
TreeHugger Robot
655877cd84 Merge "Restore state if password change fails" into pi-dev 2018-03-21 15:41:34 +00:00
Beverly
eb455965ef Category message is sufficient for message notif
If a notification is marked with category message, then
it is sufficient enough to be deemed a "message" notification.
However, to be considered an important message, we still
check if the message is from the default messaging app and has
category = message.

Change-Id: I4f2b502634b805919bdf8b82e3bdf475c0992bdd
Fixes:76019310
Test: AttentionManagementVerifierActivity
Test: atest services/tests/uiservicestests/src/com/android/server/notification/NotificationComparatorTest.java
2018-03-21 10:46:33 -04:00
Robert Berry
889e78cb28 Merge "Add RecoverySession importKeyChainSnapshot method" into pi-dev 2018-03-21 12:25:37 +00:00
Rubin Xu
682d167580 Restore state if password change fails
Bug: 73299306
Fixes: 73299306
Test: Call LockPatternUtils.clearLock() with wrong password,
      make sure device still unlocks after reboot
Change-Id: I640fc62cbe0c0c57e980455d4f499df02dee0832
2018-03-21 12:05:04 +00:00
Robert Berry
4a5c87def0 Add RecoverySession importKeyChainSnapshot method
This imports the keys directly into the keystore of LockSettingsService,
allowing them to be accessed via the RecoveryController getKey method.
This is better as it does not expose raw key material to any app.

Bug: 74345822
Test: runtest frameworks-services -p \
      com.android.server.locksettings.recoverablekeystore

Change-Id: I4991b0cff1d2fa2e5bd0b53a71c096499e93e98b
2018-03-21 10:24:41 +00:00