Commit Graph

4746 Commits

Author SHA1 Message Date
Oscar Shu
aaf9b88835 Merge "Revert "Wifi MAC Randomization: Developer option change global settings"" 2019-01-30 10:55:34 +00:00
Mathieu Chartier
4625b2e489 Merge "Add runtime_native namespace for properties" 2019-01-30 01:15:36 +00:00
Mathieu Chartier
7f11eb9057 Add runtime_native namespace for properties
Create a namespace for runtime native properties, java language
properties will be added in a later CL.

Bug: 111397239
Bug: 120794191
Bug: 123524494

Test: adb shell device_config put runtime_native gctype CC,preverify
Test: verify the property is set correctly
Exempt-From-Owner-Approval: Previously approved

Change-Id: I84ec84f0befdbf778b9cef43991b63fbab3b0943
2019-01-30 00:15:59 +00:00
Adam He
b278ec3836 Merge changes from topics "dsiable_settings_2", "disable_cc_settings"
* changes:
  Added new APIs to let ContentCaptureService enable / disable the feature.
  Added new APIs to let Settings enable / disable ContentCapture
2019-01-29 22:46:24 +00:00
TreeHugger Robot
577c93bd2e Merge "Update IntentFactory to construct intents using RemoteActionTemplate... objects that are returned by the model" 2019-01-29 22:03:03 +00:00
Philip P. Moltmann
5fb9cef346 Merge "New device config to enable location perm re-up" 2019-01-29 21:55:12 +00:00
TreeHugger Robot
8a5c213cf7 Merge "Add experiment flag for maximum number of smart actions per notification" 2019-01-29 21:07:04 +00:00
Gustav Sennton
78ce9ed65b Merge "Update the notification_assistant DeviceConfig namespace." 2019-01-29 21:05:47 +00:00
TreeHugger Robot
7447f3bda9 Merge "Add privacy platform flags." 2019-01-29 19:00:10 +00:00
Oscar Shu
ca823585e4 Revert "Wifi MAC Randomization: Developer option change global settings"
This reverts commit 0a20eda58d.

Reason for revert: Enabling feature by default. Global flag moved to OEM configurable overlay instead

Bug: 123408542
Test: unit tests
Test: Manually verify developer option is gone

Change-Id: I34bfedba786e53426a941ad12ea7c7b119987420
2019-01-29 10:27:51 -08:00
TreeHugger Robot
c62d5fab0a Merge "Moved Content Capture settings to DeviceConfig." 2019-01-29 18:22:07 +00:00
TreeHugger Robot
63d14042a2 Merge "Support Slices in Settings Search" 2019-01-29 16:40:57 +00:00
Gustav Sennton
4bf5ff5859 Add experiment flag for maximum number of smart actions per notification
We here add an experiment flag to limit the number of smart actions
shown per notification (including turning all small actions off) from
the System UI.

Bug: 122506860
Test: atest SystemUITests
Test: call "adb shell settings put global
    smart_replies_in_notifications_flags enabled=true,max_num_actions=X" for
    different values of X and ensure the behaviour is correct.
Change-Id: I2759f4bc297386d20f3a6d1cb2975165e5c87c38
2019-01-29 16:31:15 +00:00
Gustav Sennton
73a8c1b06c Update the notification_assistant DeviceConfig namespace.
To adhere to new API guidelines we here update the
notification_assistant namespace in DeviceConfig.

Bug: 120792826
Test: make ExtServices
    && adb install -r $OUT/system/priv-app/ExtServices/ExtServices.apk
    && atest ExtServicesUnitTests
Change-Id: I85f714931c28c7a35c64b1394992afcd7aa68490
2019-01-29 12:19:27 +00:00
TreeHugger Robot
1ea5775448 Merge "Game Driver: rename GUP to Game Driver" 2019-01-29 10:51:26 +00:00
Pavel Grafov
1f47ab08c1 Merge "Whitelist packages from VPN lockdown." am: 774c3ce152 am: b478bb25ac
am: 2b996ad0dd

Change-Id: Ice1f8f27da3d0092af58c8e93969575ba9f8f925
2019-01-28 22:13:24 -08:00
Pavel Grafov
2b996ad0dd Merge "Whitelist packages from VPN lockdown." am: 774c3ce152
am: b478bb25ac

Change-Id: I10094606f74e6cdc5f4b0b6591cf776fd895b1d3
2019-01-28 21:34:03 -08:00
Sudheer Shanka
ca923a9aab Merge "Update DownloadStorageProvider to include MediaStore.Downloads." 2019-01-29 02:57:44 +00:00
Felipe Leme
70bcf38e2c Moved Content Capture settings to DeviceConfig.
To test, manually played with 'adb shell device_config'. Examples:

$ adb shell device_config list content_capture
$ adb shell device_config delete content_capture enable_contentcapture
$ adb shell stop && adb shell start
$ adb shell service check content_capture
Service content_capture: not found

$ adb shell device_config put content_capture enable_contentcapture always
$ adb shell stop && adb shell start
$ adb shell service check content_capture
Service content_capture: found

Then ran CTS and FrameworkCoreTests below...

Test: atest CtsContentCaptureServiceTestCases \
      FrameworksCoreTests:android.provider.SettingsBackupTest#secureSettingsBackedUpOrBlacklisted
Test: m update-api

Bug: 121037717
Bug: 121153631

Change-Id: Ib93bf8181253228ccbdb3edbd84c5d0431c84eb4
2019-01-28 16:34:40 -08:00
Felipe Leme
91ddecac0a Added new APIs to let Settings enable / disable ContentCapture
Bug: 123286662
Test: atest ChildlessActivityTest#testSetContentCaptureFeatureEnabled_disabledBySettings \
        ChildlessActivityTest#testSetContentCaptureFeatureEnabled_disabledThenReEnabledBySettings\
        FrameworksCoreTests:SettingsBackupTest#secureSettingsBackedUpOrBlacklisted
Test: atest CtsContentCaptureServiceTestCases # for sanity check

Change-Id: I7cd2c36c1d7e23efb9acacf4f18cecd8838f5ac5
2019-01-28 16:20:30 -08:00
Matthew Fritze
51598602e3 Support Slices in Settings Search
Add an API for Settings search to associate Uris to Keys,
to enable support for Slices in search.

We add a separate API rather than updating IndexableData because:
- Apps will need to support a method of collecting all slices for the
Slices API, and that method can be shared between the Slices API and
this one.
- To update search indexableresource, we would need to establish a
contract on how to declare a slice Uri in each xml. Even if we did that,
the providing app would need their own logic to parse the Xml for
the Slices api, so we can't save them work.

Bug: 62807132
Test: contract files
Change-Id: Ie8853ac57643231794afdbb2f7ce1cc0f77619a2
2019-01-28 15:54:24 -08:00
Chris Tate
d10f95dcef Merge "Defer broadcasts to slow-handling apps" 2019-01-28 22:30:26 +00:00
Christopher Tate
2f558d2659 Defer broadcasts to slow-handling apps
When an app takes a long time to handle broadcasts, we start deferring
further broadcasts to it to make sure that other broadcast traffic in
the system can continue to make progress.  Global delivery order is
technically rearranged, but delivery order from the point of view of any
given app remains consistent with issuance order.

When alarm broadcasts are issued, we prioritize delivery of deferred
alarms to the alarm recipients (i.e. we suspend the deferral policy and
catch up as promptly as possible) in order to minimize wake time spent
waiting for the alarm broadcast to be delivered.  Once an app with a
deferred broadcast backlog is no longer the target of an in-flight
alarm, we re-impose deferral policy on it.

This policy intentionally trades off increased broadcast delivery
latency to apps that take a "long" time to handle broadcasts, in
exchange for lowering delivery latency to all other apps in the system
that would previously have had to wait behind the slow app.

In addition, broadcast dispatch policy parameters can now be overlaid
via the usual global Settings mechanism.  In particular, configuring the
"bcast_slow_time" parameter to a value in milliseconds higher than the
queue's broadcast timeout period will disable the new slow-receiver
policies.

Bug: 111404343
Test: device boots & runs
Test: tests/ActivityTests
Change-Id: I76ac79bdf41ca3cfcc48515bca779ea0f5744c0b
2019-01-28 12:32:41 -08:00
Alex Salo
440fe3d817 Add a flags to AttentionManagerService
Additionally, simplify some flag names.

Test: manually tested, works as expected
Bug: 111939367
Change-Id: I8c2702dbbaf964096d6907cbcd6c90dfd38b7d07
2019-01-28 18:20:44 +00:00
Salvador Martinez
6994848491 Merge "Create public intent for dpp configurator activity" 2019-01-28 17:35:41 +00:00
Sudheer Shanka
e93db5123b Update DownloadStorageProvider to include MediaStore.Downloads.
Bug: 120879205
Test: manual
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: I44be836899437d87fc1a00e5fe316c6b68488643
2019-01-28 08:20:47 -08:00
Tony Mak
fc039c36ab Update IntentFactory to construct intents using RemoteActionTemplate...
objects that are returned by the model

1. TemplateIntentFactory is the intent generator. It reads from the
   templates that are returned from the model, and construct the
   intents accordingly. If template is missing, we fallback to use
   LegacyIntentFactory.
2. LegacyIntentFactory is the old(existing) intent generator.
3. Added a flag to allow us to switch between them.

Test: atest TemplateIntentFactoryTest.java
Test: atest LegacyIntentFactoryTest.java

Change-Id: I7bdcc73321f5a0160c5ff0edf1a2095119f4dcb1
2019-01-28 14:31:26 +00:00
TreeHugger Robot
92fd290867 Merge "Add threshold flag for foreign language detection." 2019-01-28 13:04:35 +00:00
Abodunrinwa Toki
a77dba6a22 Add threshold flag for foreign language detection.
Required for feature tuning and experiments

Also
- Updates Javadoc as per API review request
- Updates TextClassificationConstants test

Bug: 120794314
Bug: 118296637
Bug: 34780395
Test: atest core/tests/coretests/src/android/view/textclassifier/TextClassificationConstantsTest.java
Test: (MANUAL)
      1. Install an app that handles Intent.ACTION_TRANSLATE
      2. Run adb shell settings put global text_classifier_constants system_textclassifier_enabled=false,lang_id_threshold_override=0
      3. Select foreign text
      4. Observe that a "Translate" option is shown in the selection toolbar

      1. Install an app that handles Intent.ACTION_TRANSLATE
      2. Run adb shell settings put global text_classifier_constants system_textclassifier_enabled=false,lang_id_threshold_override=2
      3. Select foreign text
      4. Observe that a "Translate" option is not shown in the selection toolbar

Change-Id: I02b6ca48669e66a24150b04bba2ebfcf9ebe6bfd
2019-01-28 11:27:01 +00:00
Yiwei Zhang
2b3be86334 Game Driver: rename GUP to Game Driver
Bug: 119221883
Test: Build, flash, boot and make RunSettingsRoboTests
Change-Id: I39724917b516b4871c6b1b1f0d30aa0f793942a4
2019-01-28 00:24:30 -08:00
Yohei Yukawa
fe32d1f8d1 Add SHOW_IME_WITH_HARD_KEYBOARD to CLONE_TO_MANAGED_PROFILE
With this CL, SHOW_IME_WITH_HARD_KEYBOARD will be shared within the
same profile group.

Since AccessibilityManagerService always reads
SHOW_IME_WITH_HARD_KEYBOARD from the profile parent user [1], in
practice sharing SHOW_IME_WITH_HARD_KEYBOARD within the same profile
group would be the easiest and safest way for now to avoid breaking
SHOW_IME_WITH_HARD_KEYBOARD.

Note that with my previous CL [2], InputMethodSettings already adjust
the target user ID by checking CLONE_TO_MANAGED_PROFILE when writing
secure settings.  Hence no change in the InputMethodManagerService
side is necessary.

When work profile is not enabled, there should be no behavior change.

 [1]: I530481e102ac376a4506b662862ee1ee74815b40
      03a65b04d8
 [2]: Ieefefb8630ddef3b247ebb865a604e5c72dfb49c
      15be5e6f1c

Fix: 123379418
Test: manually verified as follows.
  1. Build aosp_taimen-userdebug and flash it.
  2. adb root
  3. adb shell setprop persist.debug.per_profile_ime 1
  4. Install Test DPC.
  5. Enable managed profile with Test DPC.
  6. Attach a Bluetooth hardware keyboard.
  7. make -j EditTextVariations
  8. adb install -r \
     $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
  9. adb shell am start --user 10 -n \
     com.android.inputmethod.tools.edittextvariations/.EditTextVariations
 10. Focus in the top edit field on the EditTextVariations.
 11. Tap the IME switcher icon on the navigation bar.
 12. adb shell settings get secure --user 0 show_ime_with_hard_keyboard
       -> 0
 13. adb shell settings get secure --user 10 show_ime_with_hard_keyboard
       -> 0
 14. Toggle "Show virtual keyboard" button to enable it.
 15. adb shell settings get secure --user 0 show_ime_with_hard_keyboard
       -> 1
 16. adb shell settings get secure --user 10 show_ime_with_hard_keyboard
       -> 1
Change-Id: Iacb79b24d6bd97495ac81a58c1df651cf594a8c2
2019-01-27 08:06:30 -08:00
Jeff Sharkey
cb269aac7e Get CtsProviderTestCases building against API.
To help confirm that we're actually testing developer-visible
behaviors, we need to build against public APIs, since there have
been plenty of examples in this suite of "testing" hidden API
behaviors, which are then misleading to developers.

Bug: 120429729
Test: atest cts/tests/tests/provider/
Exempt-From-Owner-Approval: Trivial API annotations
Change-Id: I07fe33e54f611a6060217f0706fb99b809961f4d
2019-01-27 03:03:39 +00:00
Philip P. Moltmann
25995fee24 New device config to enable location perm re-up
Also expose some test-api's so that tests can set this device config.

Bug: 112390914
Test: Tried to trigger with option not set -> no notification
      atest CtsPermissionTestCases:android.permission.cts.LocationAccessCheckTest
Change-Id: Id48771b62615c2083529a2481585fa8a6ada1e45
2019-01-25 15:10:42 -08:00
TreeHugger Robot
4e78dec0d8 Merge "Add api to change charging state update delay" 2019-01-25 22:42:06 +00:00
Joel Galenson
489239befa Add privacy platform flags.
Add a privacy platform namespace and a flag to enable/disable to
Permissions Hub.

Bug: 122615235
Test: Manually set/unset flag, see/don't see Permissions Hub screens.
Change-Id: I82d49991fab880147db42cc156e8e417f5657a3c
2019-01-25 14:01:48 -08:00
Pavel Grafov
a462bcb9c4 Whitelist packages from VPN lockdown.
Bug: 77468593
Test: atest com.android.server.connectivity.VpnTest
Change-Id: I9119c139ab07a761ce5dfd1365b70eb905fd32dc
2019-01-25 19:59:03 +00:00
Matthew Fritze
623f3785bd Merge "Add NFC Settings Panel API" 2019-01-25 18:27:03 +00:00
Ng Zhi An
0941120f79 Add api to change charging state update delay
This adds a field Settings.Global.BATTERY_CHARGING_STATE_UPDATE_DELAY
that overrides the value of battery_charged_delay_ms in
Settings.GLOBAL.BATTERY_STATS_CONSTANTS.

This new field can then be set for experimentation, and easily reset to
default by deleting, or setting it to a negative value.

Expose a method in BatteryManager to set a value for this new setting.

Bug: 111360323
Test: adb shell settings put global battery_charging_state_update_delay 999
adb shell dumpsys batterystats --settings # should see battery_charged_delay_ms=999
adb shell settings put global battery_charging_state_update_delay -1
adb shell dumpsys batterystats --settings # should see battery_charged_delay_ms=90000
Change-Id: Ic308af938836a1f9c235cec341808b6c6c28d22d
2019-01-25 09:14:44 -08:00
Matthew Fritze
f8a1ff15e9 Add NFC Settings Panel API
NFC Panel is the third Settings Panel, which hosts NFC related settings.
Currently the panel only holds the NFC slice, but is open to future
additions.

Test: atest SettingsPanelTest
Bug: 120142616
Change-Id: Ib9e36b6c645ecb8788c558f505197723836f4616
2019-01-24 17:03:41 -08:00
Jeff Sharkey
334ddaa544 Merge "Define DeviceConfig for storage features." 2019-01-25 00:19:16 +00:00
Dan Albert
fa4f594144 Merge "resolve merge conflicts of fb54fde402 to master" 2019-01-24 23:00:19 +00:00
Christine Franks
69aab0df31 Merge "Move color modes to ColorDisplayService" 2019-01-24 22:54:09 +00:00
Dan Albert
fe1cdd047f resolve merge conflicts of fb54fde402 to master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I7256999a13b713607cfb4c844bf1bc7b37b827a7
2019-01-24 14:46:02 -08:00
Dan Albert
fb54fde402 Merge "Revert "Whitelist packages from VPN lockdown."" am: 9f73671651
am: 2f94ef95c4

Change-Id: I933a58f97b48f7a2db372cff6fb43318c840c6f8
2019-01-24 13:58:15 -08:00
Jeff Sharkey
5d0c55c0d9 Define DeviceConfig for storage features.
Best-practices mean that we should start using this path for remote
configuration, instead of Settings.Global values.

Bug: 112545973
Test: manual
Change-Id: Ic6f1e9eca28690a212baeb52bd119717c3f495a4
2019-01-24 14:32:33 -07:00
TreeHugger Robot
0b7dff0e16 Merge "Adds setting for direction of dismiss gesture." 2019-01-24 21:20:30 +00:00
Dan Albert
ee8e6a0fae Revert "Whitelist packages from VPN lockdown."
This reverts commit bb9cef04c5.

Reason for revert: broke pi-dev-plus-aosp

Change-Id: Iaf5c8aa4a8720eb2852da8cd91c81a77ccb92b68
2019-01-24 21:05:39 +00:00
Philip P. Moltmann
a0f377fbe8 Merge "Set assistant as a role" 2019-01-24 20:51:41 +00:00
Gus Prevas
a18dc57f6f Adds setting for direction of dismiss gesture.
Bug: 122314709
Test: atest SystemUITests, manual
Change-Id: I829c4148b6d5afc7b106d706d677c6105ec0f078
2019-01-24 14:04:49 -05:00
Christine Franks
d154fe5dbf Move color modes to ColorDisplayService
Bug: 123352608
Test: atest FrameworksServicesTests:ColorDisplayServiceTest
Change-Id: Iee9034721366723a7b2faba0ea2adc9479c6fec5
2019-01-24 10:58:00 -08:00