Commit Graph

6159 Commits

Author SHA1 Message Date
Santos Cordon
c34d735f43 Merge "Add force suspend API to PowerManager." 2019-02-18 10:23:04 +00:00
Ben Murdoch
f706696969 Merge "Update AppCompacted WW atom to include device ZRAM usage." 2019-02-18 09:13:23 +00:00
Yiwei Zhang
31f5adb887 Game Driver: get driver build date info from Game Driver apk
Get the driver build date info from read-only system property
ro.gfx.driver.build_date for apps using system built-in driver, while
getting the Game Driver build date info from the apk's meta-data.

Bug: 123156461
Test: Build, flash and boot. Verify the GpuService receiver side.
Change-Id: Ie4acb658c9b1776179e2bb72d0b434dcf0a9a856
2019-02-15 16:27:22 -08:00
Santos Cordon
12f92eb6cf Add force suspend API to PowerManager.
Add a hidden system API (protected by DEVICE_POWER) that forces suspend,
ignoring any existing wakelock.  Add a shell cmd to trigger the API
to run.

Bug: 111991113
Test: 'adb shell svc power forcesuspend'
Change-Id: I5a258e1b7c8b1391fe1baf3930dd9d9af47235c9
2019-02-15 17:23:18 +00:00
Maurice Lam
b8e161804d Merge "Add system APIs to implement locale picker" 2019-02-14 20:03:04 +00:00
Blake Kragten
0b2efd9f09 Merge "Power Monitor Addition framworks base:" 2019-02-14 19:33:34 +00:00
TreeHugger Robot
dbc9708897 Merge "Add NonNull annotation into unregisterThermalStatusCallback" 2019-02-14 18:53:29 +00:00
Peiyong Lin
b76bfe95e9 [Game Driver] Add global whitelist option.
Allow a '*' at the beginning of the whitelist file to mean whitelist
everything.

BUG: 120869311
Test: Build, flash and boot. Verify with apk
Change-Id: Ia1b772f545a04acb7f5b4ccbe5489e43ecddb9d2
2019-02-13 18:52:35 -08:00
Wei Wang
3dcd3f6c8d Add NonNull annotation into unregisterThermalStatusCallback
Bug: 119613338
Test: Build
Change-Id: I4fde9ba69b549fa61197c53d99a0c394dd3dcc82
2019-02-13 18:19:52 -08:00
Peiyong Lin
7d4ac2977a Merge "Revert "Revert "[GPU Service] Move blacklists process to GPU service.""" 2019-02-14 00:20:59 +00:00
Chenjie Yu
afe83a6720 Merge "add api to log BinaryPushStateChanged atom" 2019-02-14 00:14:07 +00:00
Peiyong Lin
248542053b Revert "Revert "[GPU Service] Move blacklists process to GPU service.""
This reverts commit 67773e8b87. Below is the
original commit message:

Instead of re-processing blacklists proto everytime, we move the processing to
GPU Service, and add SettingsObserver to observe the change of
Settings.Global.GAME_DRIVER_BLACKLISTS such that we only re-process the
blacklists when needed.

As a result, we will have GAME_DRIVER_BLACKLISTS which is used to accept a list
of blacklist from the server, one for each game driver version that needs to
have blacklist, and GAME_DRIVER_BLACKLIST will only contain a list of
blacklisted application package names for the current version of game driver on
the device, separated by comma.

BUG: 120869311
Test: Build, flash and boot. Use adb shell settings put command to verify.
Change-Id: I3a82d1cc020640f7b595def67b280dbc2d3a3155
2019-02-13 13:46:35 -08:00
Blake Kragten
cb308d9c61 Power Monitor Addition framworks base:
Frameworks Base section of power monitor addition. Since IPowerStats
does not have a java interface, we needed to make a native interface
into the code. I followed how the LowPowerStats collection is being
done.

Native code is located in
com_android_server_am_BatteryStatsService.cpp. We are calling the
getEnergyData to get all rails energy data that has been collecting from
boot. This energy data is collected in uWs (microWatt seconds). After
the rail data is collected at each update in the RailStats class, the
wifi and cellular total energy values will contain the energy that all
rails associated with the specific subsystem will have.

We update and collect the energy data using battery stats and propagate
it to telephony metrics. When we collect the total energy for an update
we need to zero out the energy data so it can be accumulated correctly.

1/31: Added modemRailEnergy and wifiRailEnergy to Volta historian.

Bug: 115929961
Test: adb shell dumpsys activity service TelephonyDebugService --metrics
Results Examples:
	Energy consumed by modem (mAh): 2.41
	Energy Rails consumed by modem (mAh): 2.76
Dumpsys historian results:
	  +4m23s712ms (2) 100 cc511a18 modemRailChargemAh=0.34 wifiRailChargemAh=1.17 +wifi_scan stats=0:"dump"
         +10m24s089ms (2) 100 c4511a18 modemRailChargemAh=0.71 wifiRailChargemAh=1.77 stats=0:"write"
         +11m24s228ms (3) 100 c4511a19 volt=4315 charge=3988 modemRailChargemAh=0.77 wifiRailChargemAh=1.94 wifi_signal_strength=2 stats=0:"battery-state"

Change-Id: I97521a03204968079e61f3de86640d4f1a580255
2019-02-13 13:23:37 -08:00
Tianjie Xu
a1261476fc Merge "Improved wipe reason information for RecoverySystem" am: c8f5981028 am: 361d379280
am: 3c4afc34ee

Change-Id: I643c75d5dd066ec4e82e53b5601ecb951e5a6a34
2019-02-13 12:15:42 -08:00
Peiyong Lin
2f9ebd5982 Merge "Revert "[GPU Service] Move blacklists process to GPU service."" 2019-02-13 19:59:53 +00:00
Peiyong Lin
67773e8b87 Revert "[GPU Service] Move blacklists process to GPU service."
This reverts commit 50350c15b8.

Reason for revert: Break build.
BUG: 120869311
Test: N/A
Change-Id: Ida39fa1e0a3e75001af19adb5cf330d1be26af64
2019-02-13 19:59:18 +00:00
Tianjie Xu
3c4afc34ee Merge "Improved wipe reason information for RecoverySystem" am: c8f5981028
am: 361d379280

Change-Id: I224a98abd065bf5437d4a2ea242f146e91740ef1
2019-02-13 11:55:34 -08:00
Tianjie Xu
c8f5981028 Merge "Improved wipe reason information for RecoverySystem" 2019-02-13 19:18:01 +00:00
Peiyong Lin
8f6c9f36ab Merge "[GPU Service] Move blacklists process to GPU service." 2019-02-13 19:01:33 +00:00
Chenjie Yu
6b1667c8b1 add api to log BinaryPushStateChanged atom
This api is to log BinaryPushStateChanged.
Experiment id is added as a binary blob that is not expected to be
accessed on device side.
This cl is mainly for API.
Will add follow up cls for persisting train info on disk and make puller
for it.
Will address sepolicy in follow up cls.

Bug: 119633962
Bug: 119685453
Test: will add gts
Change-Id: I68b4246cf7e8079155e16121ca37a312b35a5328
2019-02-13 10:47:27 -08:00
Blake Kragten
d120e75490 Merge "Modem power monitor" am: 366318b9c3 am: e66ad835f2
am: 47552367f4

Change-Id: I089325b15a8c7c47823d95a1b74c735cb99ba55f
2019-02-13 10:09:37 -08:00
Blake Kragten
47552367f4 Merge "Modem power monitor" am: 366318b9c3
am: e66ad835f2

Change-Id: I8753ea8b944c7dfea1fa049f67350a1ce85fd9f7
2019-02-13 09:42:43 -08:00
Blake Kragten
4d3a9f2b3c Modem power monitor
This is an AOSP carry over for the frameworks base CL. This change is needed here to allow telephony changes to be added to AOSP with no issues.

Adding monitored power rail as a new cellular battery stats component. This will be used to better determine actual power usage of the modem rather than relying on battery reduction rates.

If the device does not support rail power monitoring then this value
will always remain at 0.

Test: adb shell dumpsys activity service TelephonyDebugService --metrics
Results Examples:
	Energy consumed by modem (mAh): 2.41

Change-Id: If85af2f2e1b255661e189c5375ecc5825be84c58
2019-02-13 16:02:03 +00:00
TreeHugger Robot
5dbf94cbc0 Merge "Statsd sends active config broadcasts" 2019-02-13 06:17:50 +00:00
Hans Boehm
e9cbc81cbd Merge "Adjust AsyncTask.THREAD_POOL_EXECUTOR config" am: 2b56c4cf48 am: e0203aa6ec
am: 4e85978e38

Change-Id: I357362798b25eb2e98a806dc309b742c954244fa
2019-02-12 21:53:05 -08:00
Hans Boehm
4e85978e38 Merge "Adjust AsyncTask.THREAD_POOL_EXECUTOR config" am: 2b56c4cf48
am: e0203aa6ec

Change-Id: I1b96696556a49faab4d003c71e78efda823da193
2019-02-12 21:41:56 -08:00
Hans Boehm
2b56c4cf48 Merge "Adjust AsyncTask.THREAD_POOL_EXECUTOR config" 2019-02-13 05:14:43 +00:00
Tej Singh
6ede28bcb9 Statsd sends active config broadcasts
Statsd now sends active configs changed broadcasts when needed per uid.
Also made an adb command to help debug.

More gts tests and unit tests required, will follow.
Test: GTS in topic
Bug: 123372077
Change-Id: Ib079018ded85d002581ffc2ba1240138ce7a54e7
2019-02-12 19:28:26 -08:00
Yutaro Maruyama
3835f6a4f9 Improved wipe reason information for RecoverySystem
More information will be useful to investigate unintentional wipe
for users. Added timestamp information into reason text.

Bug: 120586954
Change-Id: I26dd4eff815d736bf34e944be6843cbb80515ca9
2019-02-13 10:53:16 +09:00
Tim Van Patten
760fca89da Merge "ANGLE In Use Dialog Box" 2019-02-12 23:48:00 +00:00
Jeff Sharkey
b6562712dd Merge "Enable isolated storage by default." 2019-02-12 23:43:57 +00:00
Hans Boehm
573bb79cfb Adjust AsyncTask.THREAD_POOL_EXECUTOR config
Remove the queue, reduce core pool size but no longer let it time out.

Reduce the timeout for additional threads.

If necessary, use a special executor, with an unbounded queue, to run
overflow tasks.

Bug: 123762797
Test: AOSP boots, also with MAXIMUM_POOL_SIZE = 1.
Change-Id: I4bc9593a044d1773ff1878684e2397a7c2a9a87a
2019-02-12 15:43:26 -08:00
Peiyong Lin
50350c15b8 [GPU Service] Move blacklists process to GPU service.
Instead of re-process blacklists proto everytime, we move the processing to GPU
Service, and add SettingsObserver to observe the change of
Settings.Global.GAME_DRIVER_BLACKLISTS such that we only re-process the
blacklists when needed.

As a result, we will have GAME_DRIVER_BLACKLISTS which is used to accept a list
of blacklist from the server, one for each game driver version that needs to
have blacklist, and GAME_DRIVER_BLACKLIST will only contain a list of
blacklisted application package names for the current version of game driver on
the device, separated by comma.

BUG: 120869311
Test: Build, flash and boot. Use adb shell settings put command to verify.
Change-Id: Ic49800cd0b5b82ddbbdf9907d603243415d5bd3b
2019-02-12 12:58:44 -08:00
Tim Van Patten
ddc4391170 ANGLE In Use Dialog Box
When ANGLE is enabled for an app, show a dialog box to the user to
indicate that ANGLE is in use.   This is useful because there are
not (or at least shouldn't be) any visual indication that a different
OpenGL driver is in use.

Bug: 120489005
Test: atest CtsAngleIntegrationHostTestCases
Test: Load an app with ANGLE enabled and verify dialog box is shown.
Test: Load an app without ANGLE and verify dialog box is not shown.
Change-Id: I5e87ec96582d43666cfcca2266b46ce98b859a32
2019-02-12 13:53:36 -07:00
Steven Moreland
2d5186b3f8 Merge "Remove ParcelFileDescriptor.aidl" am: c7c7fe6325 am: 21f4e04f3d
am: a1f96c0af8

Change-Id: I8ee7c8ae5e66ceb7a9f12e8def48ebdd1dedaa18
2019-02-12 10:28:18 -08:00
Steven Moreland
a1f96c0af8 Merge "Remove ParcelFileDescriptor.aidl" am: c7c7fe6325
am: 21f4e04f3d

Change-Id: Ibd87a9a61ae70779baa90ced2eaab5526d4d815d
2019-02-12 10:11:54 -08:00
Steven Moreland
a4912bd4a4 Remove ParcelFileDescriptor.aidl
This is now a built-in type in AIDL.

Bug: N/A
Test: N/A
Change-Id: Ibbc1251ce3378fed39b7edeb611185358a1c0dc0
2019-02-11 18:54:32 -08:00
Tej Singh
a0c89dd5b6 Statsd Puller Callback Registration
Creates a hidden api to register puller callbacks for vendor atoms.

Test: manual local test
Test: statsd unit tests
Bug: 119898637
Change-Id: Id28817b8fc718e128adc4e1c6b2e997db84517f9
2019-02-11 14:24:03 -08:00
Jeff Sharkey
0637680c55 Enable isolated storage by default.
We've been dogfooding the isolated storage feature for many months
on various internal groups, and we're ready to enable it globally.

Bug: 112545973
Test: executed entire CTS suite using forrest
Change-Id: Id1b0d40e628d9d790143d50e7c6f5fa06ebd8b38
2019-02-11 13:15:02 -07:00
Ben Murdoch
fdc55931c8 Update AppCompacted WW atom to include device ZRAM usage.
We log free ZRAM in kilobytes before and after the compaction event.

Test: manually verified am_compact and statsd logging looks correct.
Bug: 123623746

Change-Id: I20d5991fb1d060584d415b76c30769fe9f049ffd
2019-02-11 19:18:44 +00:00
Jeff Sharkey
8805033e7a Allow update() to move files on disk.
There are a set of columns available through insert() and query()
which influence placement of files on disk, so it makes sense to
expand update() to allow movement of underlying files, as long as
the changes respect any rules that would have been applied to a
brand new insert().

When a caller updates any placement columns, blend them together
with any current values, and generate the path that would have
been used for an insert.

Bug: 123967243
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I440a3edc5faaebac30e5bfa4c992157be39c8ee1
2019-02-11 11:39:14 -07:00
Sudheer Shanka
82c999d7f9 Merge "Remove sandbox specific bind mounts from root namespace." 2019-02-08 00:36:00 +00:00
Yiwei Zhang
b9218244e6 Merge "Game Driver: plumb package name and version for GpuStats" 2019-02-07 20:46:56 +00:00
Sudheer Shanka
03fd40b36e Remove sandbox specific bind mounts from root namespace.
Update vold to only create package sandboxes and not do any bind mounts.
After zygote forks, all the necessary bind mounts will be setup for
the process.

Bug: 124009234
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*

Change-Id: Ibd4af79b385e20228a0e9ce4446f14ead87e228e
2019-02-06 16:41:05 -08:00
TreeHugger Robot
598a0ebac1 Merge "Bubbling up setNightMode and setLocationMode." 2019-02-07 00:23:45 +00:00
Michael Wright
ebc78db8e1 Merge "Instrument wake up reasons." 2019-02-06 23:37:05 +00:00
Yiwei Zhang
33097bf1d9 Game Driver: plumb package name and version for GpuStats
This change also optimized the usage of PackageManager.

Bug: 123529932
Test: Build, flash and boot.
Change-Id: I665d6f1e1da374e790c98a5cb589a860ccc8937e
2019-02-06 15:35:48 -08:00
Kweku Adams
4132384b1a Bubbling up setNightMode and setLocationMode.
"LocationMode" is a better name for the setting than gpsMode and it's
been renamed internally in a separate CL.

NightMode has been transferred over to a BatterySaver flag in another
CL, so this adds the setting here.

Bug: 119261320
Test: Android builds
Change-Id: I9fe157c9bb8d032f8ae60391c1f09ff6886c8e41
2019-02-06 11:31:29 -08:00
Benjamin Miller
8cc730d57d docs: recommend that DISALLOW_CROSS_PROFILE_COPY_PASTE is accompanied by setScreenCaptureDisabled().
Clarified the scope of the restriction (export-only).

Bug: 77204173
Test: javadoc UserManager.java and inspect generated HTML
Change-Id: Iec4cf141741dfec6942decf6ef3f237d5eaa48f2
2019-02-06 16:11:10 +00:00
Anton Hansson
d136a7a224 Merge "Remove empty default constructor" 2019-02-06 15:20:19 +00:00