Commit Graph

4878 Commits

Author SHA1 Message Date
Gustav Sennton
c81eb67413 Merge "Move NotificationAssistant flags into SystemUi namespace." 2019-02-27 19:09:33 +00:00
Gustav Sennton
ddd78b2d4f Move NotificationAssistant flags into SystemUi namespace.
Create SystemUi DeviceConfig namespace and add a class to store all its
flags in. These flags will be shared between the SystemUi package and
other Notification packages - like ExtServices and
NotificationManagerService.

Performing experiments across different packages is much more involved
than performed single-package experiments. Therefore, we put flags
related to Notifications into the System UI experiment flag package.

Bug: 120792826
Test: atest AssistantSettingsTest
Change-Id: I83992291e660ab092bed8d22d1abaaa2bd9d6f9a
2019-02-27 16:51:47 +00:00
Issei Suzuki
f2d13673f4 Merge "Move AmbientDisplayConfiguration class out of internal package." 2019-02-27 14:28:36 +00:00
Michal Karpinski
750c23d541 Merge "Default ACTIVITY_STARTS_LOGGING_ENABLED flag to 1" 2019-02-27 13:10:12 +00:00
Narayan Kamath
01794b570b Merge "Drop support for device configurable "compatibility WAL"." 2019-02-27 11:03:29 +00:00
Issei Suzuki
ca19e6e3ef Move AmbientDisplayConfiguration class out of internal package.
Test: m droid (run full build), atest SystemUITests
Bug: 126327497
Change-Id: Ife8303924bd02e9639008293bf9028f4871a9b16
2019-02-27 10:34:17 +01:00
Dongwon Kang
2ee0891fdc Add documentation on MediaNative.NAMESPACE
Test: build
Bug: 126180197
Change-Id: I94796781b30e1361fdd222bb510762b34501ca26
2019-02-26 14:16:08 -08:00
Michal Karpinski
dbd7154348 Merge "Rework adding bg activity starts whitelisting token for broadcasts" 2019-02-26 21:10:10 +00:00
Yiwen Chen
5624e4f021 Merge "Remove @hide from comment of apply_ramping_ringer so that it can be accessed from setting intelligence." 2019-02-26 18:17:12 +00:00
Michal Karpinski
4b8aef21b2 Rework adding bg activity starts whitelisting token for broadcasts
Add token around the places we call scheduleTempWhitelistLocked().

Move to a timeout-based mechanism - allow the receiver to open
activities from background for at least the time it's running,
but extend the privilege if it finished sooner than the allowed
timeout.

Also, make the timeout configurable in BroadcastConstants.

Bug: 123384391
Bug: 123711192
Bug: 110956953
Test: atest WmTests:ActivityStarterTests
Test: manual with Play "finished install" notifications that do
      broadcast trampoline, Chrome bookmarks widget, BBC News widget,
      Citymapper "get me somewhere" notification

Change-Id: I814472187bec4b4a1ce48112e7b666efd2d04ef6
2019-02-26 17:38:43 +00:00
Michal Karpinski
b639402f5b Default ACTIVITY_STARTS_LOGGING_ENABLED flag to 1
Bug: 110956953
Test: atest WmTests:ActivityStarterTests
Change-Id: I864abba208d75a131da098b77cc09e46101c4986
2019-02-26 11:34:48 +00:00
TreeHugger Robot
52480bee82 Merge "Fix Battery Saver location bugs." 2019-02-25 21:33:36 +00:00
Narayan Kamath
b8280438d8 Drop support for device configurable "compatibility WAL".
WAL as a journaling mode is no longer configurable on a
per-device basis. We preserve support for changing this value
via phenotype for now, but this will likely be removed in a
follow up once this change has been vetted.

Test: atest FrameworksCoreTests:android.database
Test: atest CtsDatabaseTestCases
Bug: 123352172
Change-Id: I163bad836b71770946ce12a8bfd19f362033ea83
2019-02-25 13:00:14 +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
Yiwen Chen
ea4238f060 Remove @hide from comment of apply_ramping_ringer so that it can be accessed from setting intelligence.
Bug: 120789399
Test: When finish the whole change, flash into a dev phone to test first.
Change-Id: I50047dece95122f0d55f370d644a38c68abec045
2019-02-22 16:35:40 -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