Commit Graph

5203 Commits

Author SHA1 Message Date
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
Lucas Dupin
7970e4fef6 Merge "Screen off animation" into pi-dev
am: 6e7e028b62

Change-Id: Ic45e6ef4e512221509bb7e49cb652576d6588e43
2018-03-21 05:23:54 +00:00
Lucas Dupin
16cfe45dec Screen off animation
SysUI can now control the screen off animation as long as
config_dozeAfterScreenOff is set to false.

The current implementation collapses the notification shade and moves
the clock whenever the use is on the lock screen, or will fade the
scrims and show the clock when the keyguard is occluded.

Display state change (on, doze, doze_suspended) is delayed to let the
animations occur at 60Hz.

Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeUiTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Test: atest tests/src/com/android/systemui/statusbar/phone/DozeScrimControllerTest.java
Test: atest tests/src/com/android/systemui/statusbar/phone/DozeParametersTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/keyguard/WakefulnessLifecycleTest.java
Fixes: 73178121
Change-Id: Id5d964452f342d4e97bedf1084efa808604e602c
2018-03-20 15:59:51 -07:00
Andreas Gampe
bd12b4476b Frameworks: Fix Binder.joinThreadPool
Fix the lack of a native implementation.

(cherry picked from commit acd1987950)

Bug: 75254055
Bug: 75291614
Test: atest BinderTest
Merged-In: Id5b15442a59851e566a24d406a7487f9de66d42f
Change-Id: Id5b15442a59851e566a24d406a7487f9de66d42f
2018-03-19 20:38:52 -07:00
Andreas Gampe
92fc065cf6 Frameworks: Handle exceptions in SystemProperties callbacks
When notifying callbacks, catch thrown exceptions.

(cherry picked from commit 7074e6fd4c)

Bug: 73058952
Test: m
Test: atest SystemPropertiesTest
Merged-In: I1c61e11b833e8ddd30d80b9859b20a9fb3185a33
Change-Id: I1c61e11b833e8ddd30d80b9859b20a9fb3185a33
2018-03-19 20:33:49 -07:00
Kweku Adams
148d986e62 Merge "Removing the settings-based IncidentReportArgs method." into pi-dev
am: 46c0e91b74

Change-Id: I19be9d6a6c3b1674dada4eaaf36faf2e555a8b79
2018-03-20 02:20:03 +00:00
Andreas Gampe
1833e68f13 Merge "Frameworks: Fix Binder.joinThreadPool" into pi-dev
am: 0f8f3f25cf

Change-Id: Ib537886c003f4f4877a1fb4a89ad9ca25f603aea
2018-03-20 00:27:23 +00:00
Adam Powell
d40f30610e Merge "Add factory methods for async Handlers" into pi-dev
am: fa38f238b1

Change-Id: I0dee61e5dbd2a21bbd03c06cde72a66a708bc55f
2018-03-19 23:21:29 +00:00
Tej Singh
3e39b508f1 Merge "Atoms: Mobile Connection" into pi-dev
am: dba47fcd09

Change-Id: I3008bae7f5ecebbbb79fbe141479d25c6c5f5867
2018-03-19 22:54:01 +00:00
TreeHugger Robot
46c0e91b74 Merge "Removing the settings-based IncidentReportArgs method." into pi-dev 2018-03-19 22:15:11 +00:00
TreeHugger Robot
0f8f3f25cf Merge "Frameworks: Fix Binder.joinThreadPool" into pi-dev 2018-03-19 21:40:37 +00:00
Andreas Gampe
a3c96c1524 Merge "Frameworks: Handle exceptions in SystemProperties callbacks" am: af3dc4fc70
am: bccdf32c8a

Change-Id: Ie640cf1734ff80a19d8c0ba65734f5e76d26fa76
2018-03-19 21:38:59 +00:00
Adam Powell
fa38f238b1 Merge "Add factory methods for async Handlers" into pi-dev 2018-03-19 21:09:01 +00:00
Tej Singh
eee317b7b6 Atoms: Mobile Connection
Atom definitions for MobileConnectionStateChanged and
MobileRadioTechnologyChanged

Also cleans up batterystats.

Bug: b/72320589
Test: verified logs appear in adb logcat -b stats
Change-Id: I9feb258cf6dd4a8c8bf1cffc9566b5d0a851a9fa
2018-03-19 09:48:22 -07:00
Adam Powell
8709ba863e Add factory methods for async Handlers
Message.setAsynchronous is already public and this makes working
with posted messages that do not interact with UIs quite a bit nicer.

Added as factory methods for better integration with support shims
as well as generally encouraging the use of the handler callback
instead of subclassing for working with custom messages.

Bug: 73124158

Change-Id: I1210e7dc524fdf771e7af19297d5a822fdbd502c
2018-03-19 15:54:13 +00:00
Andreas Gampe
7074e6fd4c Frameworks: Handle exceptions in SystemProperties callbacks
When notifying callbacks, catch thrown exceptions.

Bug: 73058952
Test: m
Test: atest SystemPropertiesTest
Change-Id: I1c61e11b833e8ddd30d80b9859b20a9fb3185a33
2018-03-19 08:36:11 -07:00
Kweku Adams
015288241e Removing the settings-based IncidentReportArgs method.
Bug: 72378645
Test: Flashed device
Change-Id: Ia12afffed169e1d0201e99887e74398de40c6cf6
2018-03-16 18:15:46 -07:00
Andreas Gampe
acd1987950 Frameworks: Fix Binder.joinThreadPool
Fix the lack of a native implementation.

Bug: 75254055
Bug: 75291614
Test: atest BinderTest
Change-Id: Id5b15442a59851e566a24d406a7487f9de66d42f
2018-03-16 17:03:22 -07:00
Fyodor Kupolov
ca34851ead Added BinderCallsStatsService
It tracks binder calls into the system server and reports
statistics about CPU time spent per call on multiple dimensions,
e.g. uid or call description.

Usage: dumpsys binder_calls_stats
Overhead: ~0.5% per binder call (if enabled)

Test: manual
Bug: 75318418
Change-Id: I13b854f67f8fd1c9f985b8e45f74dcba2e73b9cb
2018-03-16 23:17:03 +00:00
Yi Jin
69219b1728 Merge "Fix privacy tags based on PWG review meeting." into pi-dev
am: 7d17dd7184

Change-Id: Iedbd95f7a0c4cc0a42e5ebc38e79d684657c708d
2018-03-16 18:49:15 +00:00
Yi Jin
163967fe8e Fix privacy tags based on PWG review meeting.
1. Remove unnecessary hex_hashs.
2. Make intent extras LOCAL
3. Make mnc EXPLICIT
4. Make diskstats error AUTO since it is only IOException.

It is safe to modify proto numbers since they are not used yet.

Bug: 74837756
Test: flash the changes and call incident -d, also updated go/irpf
Change-Id: Idee0e927515e737c9a42a1dc29cb3c05e6d91ca9
2018-03-15 18:31:36 -07:00
Bookatz
fda0144579 Merge "Statsd BroadcastSubscribers can receive 'cookies'" into pi-dev
am: 81cacb274c

Change-Id: I4a74e97d84db573c98d4fbb3645ad0662c153aea
2018-03-12 19:49:31 +00:00
Ivan Podogov
4e7ca04bd6 Merge "Avoid changing display power state on draw wake lock" into pi-dev
am: a71712dfa8

Change-Id: Idabd29b48e2450974f44a982fe2fd95086af8005
2018-03-12 18:37:31 +00:00
TreeHugger Robot
81cacb274c Merge "Statsd BroadcastSubscribers can receive 'cookies'" into pi-dev 2018-03-12 18:27:02 +00:00
TreeHugger Robot
a71712dfa8 Merge "Avoid changing display power state on draw wake lock" into pi-dev 2018-03-12 17:58:55 +00:00
Fyodor Kupolov
8ac8356b51 Merge "Added ACTION_BATTERY_LEVEL_CHANGED" into pi-dev
am: 04782e277c

Change-Id: I1047e0c9063688c66f51974d79f4b9abd4a2a51d
2018-03-10 03:23:13 +00:00
Bookatz
058d869826 Statsd BroadcastSubscribers can receive 'cookies'
Subscribers can now provide additional Strings that will be passed back to
it when an anomaly is detected. This way, the Subscriber can be informed
about anomaly-specific information has meaning to it.
Statsd itself does not use these strings and doesn't care what they are
- it simply passes them back to the subscriber.

Change-Id: If269872397c4ed2c67e41d54d850cdc664d4f73e
Fixes: 74012329
Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.BroadcastSubscriberTests
2018-03-09 10:44:48 -08:00
Fyodor Kupolov
70e7543066 Added ACTION_BATTERY_LEVEL_CHANGED
Sent when the current battery level changes.

It has EXTRA_EVENTS that carries a list of Bundle instances representing
individual battery level changes with associated extras from
ACTION_BATTERY_CHANGED

Each event has EXTRA_EVENT_TIMESTAMP representing time when it occured.

Test: manual
Bug: 74020080
Change-Id: I993005950299c5298c9111ca51cc7717e1f029de
2018-03-08 10:09:01 -08:00
Pete Gillin
22316b42a9 Add new 'explicit GC' policy to StrictMode.
This change adds the policy but offers no public way to enable it. A
follow-up change will expose the detect/permit methods in the API and
change detectAll to enable it.

This new policy can only be triggered through the libcore BlockGuard API.

Bug: 3400644
Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases
Test: cts-tradefed run cts-dev -m CtsOsTestCases
(cherry picked from commit c92f9edf53d09952fe9ab3d8066aed7fa7ecc852)

Change-Id: Ieebe4db747902246968d6382bbc9cee0e539af85
Merged-In: Ieebe4db747902246968d6382bbc9cee0e539af85
(cherry picked from commit b3b0731241)
2018-03-08 14:38:46 +00:00
Pete Gillin
121eb58ab4 Merge "Add new 'explicit GC' policy to StrictMode." 2018-03-08 10:55:00 +00:00
Ivan Podogov
56bc6d0a47 Avoid changing display power state on draw wake lock
When Sidekick is controlling the display, any draw wake lock can cause a
sequence of endDisplayControl/setDisplayPowerState/beginDisplayControl
twice, because of DOZE_SUSPEND -> DOZE -> DOZE_SUSPEND transitions.
We can avoid that by telling power manager that display is controlled by
Sidekick, and draw wake locks shouldn't change the display power state.

Bug: 70574675
Test: build, flash Sardine, run Stopwatch, observe logcat
Change-Id: Ie4dac76606e45f0d3b62bc5890841f4f24d454d7
2018-03-07 18:02:55 +00:00
Yueming Wang
19d708a0e6 Merge "Block adb from changing certain settings value when corresponding user restriction is on." into pi-dev
am: aecd9616ec

Change-Id: I1adecc989ee77fe578e08b484edc57669937df99
2018-03-07 13:54:19 +00:00
yuemingw
1d13eaea83 Block adb from changing certain settings value when corresponding user
restriction is on.

Check calling uid in isSettingRestrictedForUser(which is called by settingsprovider),
 and only allow system_uid when certain user restriction is on, so that user won't be
able to change these settings with adb:
Settings.Secure.LOCATION_MODE,
Settings.Secure.PROVIDERS_ALLOWED,
Settings.System.SCREEN_BRIGHTNESS,
Settings.System.SCREEN_BRIGHTNESS_MODE,
Settings.System.SCREEN_OFF_TIMEOUT,
Settings.Global.AUTO_TIME,
Settings.Global.AUTO_TIME_ZONE.
This check also prevents 3rd party apps from modifying system settings value
when corresponding user restriction is on.
In addition, any attempt to change AUTO_TIME will also go through the check
for dpm.getAutoTimeRequired().

Test: manually by running the adb command with restriction set and not set
Bug: 72549013
Bug: 72548203
Bug: 72548533
Bug: 72686466
Bug: 72687105
Bug: 72940551
Bug: 72940562
Change-Id: I1d1fd20d9fa0f76f27905d62873f6a6e9af0224e
2018-03-07 11:04:34 +00:00
Dianne Hackborn
e1d41bd8fa Merge "Fix issue #72116995: Add permission guarding Service#startForeground" into pi-dev
am: 16268a69d6

Change-Id: I6ef5335e391eb9259ae0dfbf4f88032ad1d2bad4
2018-03-07 00:14:27 +00:00
Rubin Xu
74ff1dad95 Merge "Stop invoking secdiscard when deleting password data" into pi-dev
am: 8fa420c261

Change-Id: I73db72842b5b561980aa7ba7c56253c17bec00c5
2018-03-06 23:27:18 +00:00
Sunny Goyal
b524685bbc Merge "Using UserManagerInternal for access control instead of UserManager" into pi-dev
am: 9015d24332

Change-Id: I3e05cf00e1376c5790ac7acdf991e0668027c076
2018-03-06 23:21:18 +00:00
Dianne Hackborn
16268a69d6 Merge "Fix issue #72116995: Add permission guarding Service#startForeground" into pi-dev 2018-03-06 23:04:16 +00:00
TreeHugger Robot
8fa420c261 Merge "Stop invoking secdiscard when deleting password data" into pi-dev 2018-03-06 22:37:43 +00:00