Commit Graph

4865 Commits

Author SHA1 Message Date
TreeHugger Robot
52480bee82 Merge "Fix Battery Saver location bugs." 2019-02-25 21:33:36 +00:00
TreeHugger Robot
7d9c08d393 Merge "Control lid behaviour with a Global setting" 2019-02-23 06:54:48 +00:00
TreeHugger Robot
fb8509a3dd Merge "Create setting screen from Notification Assistant" 2019-02-23 04:30:23 +00:00
Edward Savage-Jones
ce7a01fd78 Control lid behaviour with a Global setting
Using a global setting to specify the lid open/close behaviour
allows OEMs to support switching between windowed and windowless
lids at runtime instead of build time.

Bug: 70378569
Test: Find the hall effect sensor on the device and then using a magnet
confirm the expected behaviour for each global setting:
* No reaction from device
adb shell settings put global lid_behavior 0
* Sleep/screen off
adb shell settings put global lid_behavior 1
* Lock screen but screen stays on
adb shell settings put global lid_behavior 2
Change-Id: I53682711aeaaeb9eead7246ba83e4dd4b3c06a58
2019-02-23 10:18:21 +08:00
Kweku Adams
5e0052b1eb Fix Battery Saver location bugs.
1) Actively disabling LOCATION_MODE instead of LOCATION_PROVIDERS_ALLOWED
since the latter is deprecated and not supported.

2) The LOCATION_MODE_FOREGROUND_ONLY flag wasn't used anywhere. As
such, it was essentially no different from LOCATION_MODE_NO_CHANGE. I've
implemented the behavior in LocationManagerService so it works properly.

3) GnssLocationProvider only turned off GPS when the location mode was
LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF, but not the mode was
LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF. I've fixed it so GPS is
turned off in both modes.

4) PowerManager looked at the global battery saver state to determine if
the location mode should be used. This was fine for full Battery Saver,
but would be a problem with adaptive Battery Saver. The proper thing to
do is to just look at the local 'batterySaverEnabled' flag.

Bug: 121256487
Bug: 122849003
Bug: 119261320
Test: atest CtsBatterySavingTestCases
Change-Id: I8973d27fb050d9892bb97021712d9cf9743e8939
2019-02-22 17:07:08 -08:00
Fabian Kozynski
171f40d8a7 Create setting screen from Notification Assistant
Test: atest
Fixes: 120852765
Change-Id: I90b22daa67f73809697fd629dabec22ef991de54
2019-02-22 14:18:58 -05:00
Tyler Gunn
d490ce1483 Merge "Change data types on CallIdentification API." 2019-02-22 15:21:44 +00:00
TreeHugger Robot
3b2e1e3f2c Merge "Fixed a typo in the runtime_native DeviceConfig namespace." 2019-02-22 13:42:17 +00:00
Wale Ogunwale
691af68a3c Added some TestApi that are already used by CTS
Allows us to remove the use of private platform API from CTS.

Bug: 124134247
Test: builds
Change-Id: Iceb81ff7c9385e877d2612fbb7b506245d116928
2019-02-21 20:15:56 -08:00
Sherry Huang
a2c5d1a7f3 Merge "Implement USB-C overheat warning" 2019-02-21 23:09:08 +00:00
Chris Wailes
2c953c8427 Fixed a typo in the runtime_native DeviceConfig namespace.
Bug: 123524494
Bug: 68253328
Test: adb shell device_config put runtime_native blastula_pool_size_min 12
Test: adb shell device_config get runtime_native blastula_pool_size_min
Test: Treehugger
Change-Id: I53c47d43a874159508c92abe6c45498ad5385f53
2019-02-21 14:13:07 -08:00
Sherry Huang
ce02ed3a46 Implement USB-C overheat warning
When device USB-C port is susceptible to short circuits and
overheating, pop up a warning dialog and keep showing until
user clicks OK button or see care steps.

Test: manually set the emulated temperature to trigger warning
Test: atest SystemUITests

Change-Id: I4f6080187196a9716f12a9817dc10d3265dc202b
Bug: 110134720
Bug: 116866524
Bug: 77790357
Bug: 117178820
2019-02-21 22:00:47 +08:00
TreeHugger Robot
c6ab749ef1 Merge "Switching off ART verifications for debuggable apps (dev option-controlled)." 2019-02-20 03:55:40 +00:00
Yiwei Zhang
32981ff4d4 Merge "Game Driver: Add a Settings.Global property for sphal libraries" 2019-02-19 19:03:05 +00:00
Christian Wailes
18f7673fcd Merge "Add blastula pool system properties" 2019-02-19 18:15:48 +00:00
Jeff Sharkey
9f05e0ea17 MediaStore API and docs polishing.
Initial efforts at cleaning up MediaStore docs, including deprecation
of crufty methods, and annotations to communicate stored units.

Bug: 120429729, 124013019
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I87828f19030b6b354472c1b3ce767de166f86134
2019-02-18 13:04:25 -07:00
Jeff Sharkey
a13887fa63 Replace ContentInterface with wrapping.
After much discussion, we can't safely introduce ContentInterface,
so instead offer ContentResolver.wrap() methods.

Bug: 120974438
Test: manual
Change-Id: I0b399192a19948a8986146efa916375022c38b59
2019-02-15 19:45:18 -07:00
Mathieu Chartier
0bccbf7984 Add blastula pool system properties
This patch adds the following properties to DeviceConfig:
* BLASTULA_POOL_ENABLED
* BLASTULA_POOL_SIZE_MAX
* BLASTULA_POOL_SIZE_MIN
* BLASTULA_POOL_REFILL_THERSHOLD

The BLASTULA_POOL_ENABLED property is checked by ZygoteProcess but not
currently used due to an existing bug (b/123409530).  This will be
enabled by go/ag/6162164.  Until then the code path is tested via log
inspection.

The remaining properties are checked by ZygoteServer.  Values are
clamped to ensure that they cannot be set to values that are harmful to
the device.

Since device_config is not available in the Zygote the system properties
interface is used instead.

Bug: 123524494
Bug: 68253328

Test: adb shell device_config put runtime_native blastula_pool_enabled true
Test: manually verify the property change is observed

Change-Id: I2b675afd9fbc1cbb0e8bc1c491cfdbbb612d0d3b
2019-02-15 17:07:37 -08:00
Tyler Gunn
b483055581 Change data types on CallIdentification API.
Per API council feedback update the call identification name, details,
description and app name to use CharSequence.

Test: Update apis, run tests.
Bug: 123241094
Change-Id: I42df17506535c1dd598ffd61a44cb0d0440b8159
2019-02-15 16:04:13 -08:00
Jeff Sharkey
23dbb2b498 Merge changes from topic "columnz"
* changes:
  Annotation for ContentProvider columns.
  Add accessor methods to aid testing.
2019-02-15 19:33:48 +00:00
Jeff Sharkey
9c41bda03c Annotation for ContentProvider columns.
We have various "contract" classes across the OS which describe the
columns that are available for insert(), update(), and query() when
working with ContentProviders.

To help ensure that the underlying providers fully support the API
contracts being made, this change defines a new "@Column" annotation
which describes the underlying data type.

These annotations can then be used by the ContentProvider
implementations internally to ensure that they're fully meeting the
API contracts being made.

A future change will also wire up these annotations to be
automatically documented by doclava.

Bug: 120429729
Test: manual
Change-Id: Ie3d97937500cec05396c809ba2ea2e62d1b737fd
2019-02-15 08:45:57 -07:00
Yiwei Zhang
03f3ff20bf Game Driver: Add a Settings.Global property for sphal libraries
This change add the GAME_DRIVER_SPHAL_LIBRARIES property to save the
list of sphal libraries assessible to Game Driver.

Bug: 124448366
Test: Build, flash and boot.
Change-Id: I7cb06df80f19d87f5fd13d7df3c991ceb5bdfb06
2019-02-14 17:38:24 -08:00
Shafik Nassar
a07b43aec5 Merge "Make Rollback lifetime duration configurable" 2019-02-14 14:19:23 +00:00
TreeHugger Robot
06363e342c Merge "New API: Settings.ACTION_REQUEST_ENABLE_CONTENT_CAPTURE" 2019-02-14 11:06:25 +00:00
Alex Buynytskyy
5d5921ee2c Switching off ART verifications for debuggable apps (dev option-controlled).
This is complementary to switching off install-time checks for
debuggable apps and improves launch times for dex-heavy apps.
It's ON by default and controlled via developer option.

Bug: 124403695
Test: manual

Change-Id: Icafba38e8af71ef785088577ebf674bc13e26666
2019-02-13 17:20:41 -08:00
Felipe Leme
8b432642df New API: Settings.ACTION_REQUEST_ENABLE_CONTENT_CAPTURE
Test: m update-api # not implemented yet
Bug: 119264902

Change-Id: Icbda6de653d176995d03bbe080ab6b61632b7a03
2019-02-13 15:43:13 -08:00
TreeHugger Robot
61dac1aa50 Merge "Revert "Revert "Switch clock face while docked.""" 2019-02-13 22:45:48 +00:00
TreeHugger Robot
b742688d0b Merge "Make DocumentsContract#PATH_TREE private." 2019-02-13 21:47:31 +00:00
Robert Snoeberger
b300a4ee45 Revert "Revert "Switch clock face while docked.""
This reverts commit 708e739811.

Reason for revert: The issue motivating the revert was an earlier presubmit failure for my change.

Change-Id: Icdb7f4dddc5bbee8ce1f54bb8cee550ef0a4639e
Bug: 124252294
2019-02-13 20:15:12 +00:00
Misha Wagner
dc5beb50c8 Merge "Add KernelCpuThreadReader minimium CPU usage threshold" 2019-02-13 10:31:15 +00:00
shafik
0ad18b89ee Make Rollback lifetime duration configurable
Rollback lifetime duration is now configurable using a p/h flag.
The default remains 48 hours, and won't change unless another value is
pushed from the server.

The first expiration check now occurs after boot phase is done
instead of on service start. This neeeded to be done since Settings
Provider is not available on service start.

Test: atest RollbackTest
Test: adb shell device_config put rollback_boot
rollback_lifetime_in_millis 3600 and checked that the new value is 3600
Bug: 112431924
Change-Id: I6c28d9e945f28e340aff4914bfc772147667df2c
2019-02-13 10:08:08 +00:00
TreeHugger Robot
dc3e98eabb Merge "Revert "Switch clock face while docked."" 2019-02-13 06:00:56 +00:00
Lucas Dupin
708e739811 Revert "Switch clock face while docked."
This reverts commit 0ac3cdfa3f.

Reason for revert: Causes presubmit error
Fixes: 124252294

Change-Id: I881b24a60dd3a98afb807264d1e4318127a8c91b
2019-02-13 00:25:38 +00:00
Tim Van Patten
760fca89da Merge "ANGLE In Use Dialog Box" 2019-02-12 23:48:00 +00:00
TreeHugger Robot
44426e2142 Merge "Switch clock face while docked." 2019-02-12 23:17:43 +00:00
TreeHugger Robot
b6f498a2c9 Merge "Make ENABLE_ROLLBACK_TIMEOUT configurable" 2019-02-12 21:19:31 +00: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
TreeHugger Robot
79822242de Merge "Split blacklist from versioned blacklists." 2019-02-12 19:23:01 +00:00
Robert Snoeberger
0ac3cdfa3f Switch clock face while docked.
Bug: 120772327
Test: Added tests ClockManagerTest and DefaultClockSupplierTest
Change-Id: I404c6d52e1bd087d453d928faf373cf8dea9e2b2
2019-02-12 13:43:36 -05:00
Mohammad Samiul Islam
794f03d4c0 Make ENABLE_ROLLBACK_TIMEOUT configurable
Bug: 112431924
Test: atest RollbackTest
Test: manual testing
      - disable the RollbackManagerService by commenting out
        BroadcastReceiver for ACTION_PACKAGE_ENABLE_ROLLBACK
      - configure timeout: adb shell device_config put rollback
        enable_rollback_timeout 60000
      - install apk: adb install --enable-rollback
        out/target/product/taimen/data/app/RollbackTest/
        RollbackTest.apk
      - search for "rollback timed out" in `adb logcat`

Change-Id: I61600cf376755d80c735ad954a80ca98de508bda
2019-02-12 17:24:14 +00:00
Peiyong Lin
075a9e833f Split blacklist from versioned blacklists.
Previously we use blacklist to get all blacklists, to maintain the consistency
between blacklist and whitelist, and to move blacklist processing to GPU
service, we added blacklists to store all blacklists, and now blacklist will
only represent one blacklist.

BUG: 120869311
Test: Build, flash and boot. Verified in master patch ag/6288554
Change-Id: Ifac875177ad959705c8f80672341c4cbee7bbc93
Exempt-From-Owner-Approval: Change in CoreSettingsObserver.java is too minor
2019-02-12 17:15:01 +00:00
Mathieu Chartier
bd3810b28f Merge "Revert "Revert "Add view inflation device config property""" 2019-02-12 11:11:33 +00:00
Misha Wagner
648d20359f Add KernelCpuThreadReader minimium CPU usage threshold
Configurable using KernelCpuThreadReaderSettingsObserver.

Test: atest KernelCpuThreadReaderTest#testReader_filtersLowUsage
Change-Id: I92bb5fbee6b56bff00c61f359e8281966e2882c1
2019-02-12 11:05:29 +00:00
TreeHugger Robot
8c04b9f4b9 Merge "Add setting for Aware allowed/disallowed" 2019-02-12 02:02:15 +00:00
TreeHugger Robot
2e71c58863 Merge "Exposed even moar DeviceConfig APIs for testing." 2019-02-12 00:47:56 +00:00
Felipe Leme
5d56e66495 Merge "Use DeviceConfig to configure Augmented Autofill Modes." 2019-02-11 22:06:36 +00:00
Felipe Leme
cc5102705a Exposed even moar DeviceConfig APIs for testing.
Test: atest AugmentedLoginActivityTest
Test: m update-api
Bug: 124006095

Change-Id: I6e2e1f24ba5cc442d533f7d67cea40a670be3937
2019-02-11 10:03:26 -08:00
Felipe Leme
7841d02e36 Use DeviceConfig to configure Augmented Autofill Modes.
Test: atest AugmentedLoginActivityTest
Bug: 121037717

Change-Id: I269946b3055bce82872976d88fa315c7d8c01b99
2019-02-11 10:03:10 -08:00
Mathieu Chartier
743b363226 Revert "Revert "Add view inflation device config property""
Bug: 111895153
Bug: 123524494
Test: unlock lockscreen
Test: cts-tradefed run cts --enable-parameterized-modules --module-parameter instant_app -m CtsAccelerationTestCases
Test: 6/6 pass as expected (TOT)

This reverts commit 2a3b4394384217ae65b430339270c8914639a9e3.

Change-Id: Ib2267a10ef44b01bc077893172ad39b43ead7841
2019-02-11 16:47:56 +00:00
Hongyi Zhang
29301d3300 add scheduler namespace and flag
add namespace scheduler and flag enable_fast_metrics_collection

Bug: 120167542
Test: m -j passed
Change-Id: I17857e8ac94f21b462d120ef0c584ac2d5bce8fd
2019-02-11 06:15:51 +00:00