Commit Graph

4115 Commits

Author SHA1 Message Date
Kevin Chyn
6df6b027f0 Don't back up Assist Gesture setup/sensitivity
Fixes: 72715022

Test: With two devices, set up one, back up onto the other.
      SUW for Assist Gesture does not get skipped
Test: atest SettingsBackupTest

Change-Id: Id7348542a618c0366f89c47833af6f66bf52b18f
2018-06-11 16:13:00 -07:00
Remi NGUYEN VAN
1f8f21af60 Merge "Add configurable captive portal probes" into pi-dev 2018-05-23 14:26:39 +00:00
Remi NGUYEN VAN
8255c2d6c2 Add configurable captive portal probes
The probes allow testing for a configurable status code and location
header (regexes). They are disabled by default, so this CL is a
no-op unless the probe configurations are pushed.

Bug: b/79499239
Test: tests in CL pass, manual: captive portal login works
Change-Id: I785723aaed06054b9aa8ebff77803f23d7836db9
2018-05-23 20:48:46 +09:00
TreeHugger Robot
1561bb41bd Merge "Add Settings Slice Whitelist key" into pi-dev 2018-05-22 23:40:24 +00:00
Matthew Fritze
640821bbc8 Add Settings Slice Whitelist key
Bug: 79779103
Test: None - only a flag.
Change-Id: I764f2fddf05bf2b9df4e633c7f6c6c7e781c1149
Merged-In: I794159db4ff8aba7b6dcd91e13a984db40da47e7
2018-05-22 22:42:57 +00:00
Tony Huang
f0800fa3bd Add theme mode design let user can choose theme self
Add a ContentObserver on WallpaperManagerService to
listen THEME_MODE value change. When changed, call
notifyWallpaperColorsChanged and set WallpaperColors
color hint by the current mode.

Bug: 63903361
Test: manual
Change-Id: I4f7aa7b184565b1bb23c7f4f1f07fc310dac7546
2018-05-22 21:35:03 +00:00
Annie Meng
4451179411 Allow restore of settings with nullable components
Creates a new settings validator that allows for null components, which
have semantic meaning for certain settings (in this case, that no
service is selected).

Bug: 79925290
Test: 1) atest SettingsValidatorsTest
2) Manual:
- In Settings UI, select "None" for autofill service and accessibility
shortcut target
- "adb backup -keyvalue -f nullsettings.ab com.android.providers.settings"
- "adb restore nullsettings.ab"
- Verify no crashes and that autofill service and accessibility shortcut
target both have "None" in Settings UI

Change-Id: I159b3f4706c6b981a30437c31724b106eb4e3f2a
2018-05-22 11:11:58 +01:00
Annie Meng
eed1b812a4 Check settings validators for NPE
From b/79910479, we need to have better checks on settings validators.

Catch NPE for various settings validators and add a @Nullable annotation
to try to prevent NPEs in new validators.

Bug: 80067772
Test: atest SettingsValidatorsTest
Change-Id: I9a5058e1bae1ba0dea084c0589aa3e4ef3a51836
2018-05-21 16:42:23 +01:00
TreeHugger Robot
45a250a2be Merge changes Id4feeefa,Ie0a501b8 into pi-dev
* changes:
  Add counter for predictive info for hush gesture
  Update DND strings
2018-05-18 23:08:19 +00:00
Beverly
38fcfd0500 Add counter for predictive info for hush gesture
Test: adb shell settings get secure hush_gesture_used
Test: adb shell settings get secure manual_ringer_toggle_count
Change-Id: Id4feeefa03a5951c03b09ab466a6c399d8aadd0e
Fixes: 79537757
2018-05-18 21:45:17 +00:00
TreeHugger Robot
fedf04f3df Merge "(Behind flag) Wireless charging vibration feedback" into pi-dev 2018-05-18 20:57:21 +00:00
TreeHugger Robot
2b3c858296 Merge "Add explicit override for default Private DNS mode" into pi-dev 2018-05-18 07:59:58 +00:00
Annie Meng
b105913098 Merge "Fix NPE in ComponentNameValidator" into pi-dev 2018-05-17 18:20:29 +00:00
Annie Meng
5d26b8c03a Fix NPE in ComponentNameValidator
In general, we should consider null component names as invalid settings,
meaning that we don't restore.

b/79925290 to allow restoring null component names for specific
settings where null has semantic meaning.

Bug: 79910479
Test: 1) atest SettingsValidatorsTest
2) Manual:
- In Settings UI, select "None" for autofill service and accessibility
shortcut target
- "adb backup -keyvalue -f nullsettings.ab com.android.providers.settings"
- "adb restore nullsettings.ab" and verify no crashes
Change-Id: Iffecbe7d26a93a816e7be42f564ba471f9681876
2018-05-17 17:56:58 +00:00
Erik Kline
1984179409 Add explicit override for default Private DNS mode
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 79719289
Change-Id: I943c5476666e47d04690626e2133f501cb875b46
2018-05-17 17:41:12 +09:00
Dianne Hackborn
cd835ba418 Merge "More app ops fg/bg tuning" into pi-dev 2018-05-16 19:48:54 +00:00
Beverly
df9f36da19 (Behind flag) Wireless charging vibration feedback
- to turn vibration feedback on wireless charging:
    adb shell settings put global charging_vibration_enabled 1

Test: manual
Bug: 74505795
Change-Id: I177bc05e75bb9e66a88b45432eee778ab619e28f
2018-05-16 09:47:20 -04:00
TreeHugger Robot
7830cd820b Merge "Add SCREEN_BRIGHTNESS_FOR_VR to set of public settings." into pi-dev 2018-05-15 23:53:02 +00:00
Damien Bargiacchi
76fd7d5776 Merge "Switch the setting for Off Body Radios Off to User Absent Radios Off" into pi-dev 2018-05-15 20:58:31 +00:00
Jiabin Huang
eddc0d712c Merge "Add support for manually set surround formats." into pi-dev 2018-05-15 20:54:27 +00:00
Dianne Hackborn
e93ab41d2a More app ops fg/bg tuning
- Only report that something has changed when a uid changes between
  the restricted and unrestricted states.  (Adds new constant that
  defines this important division point.)

- Have different settle times for different key transitions: (a)
  out of the top state, (b) out of any other unrestricted state,
  (c) down to a lower background state.

- But, don't apply any settle time when transitioning from top to
  another unrestricted state...  there is no need to.

Bug: 78480444
Test: manual
Change-Id: Ife772858009a6da5c286e285a4059aea3ad3f6c7
2018-05-15 10:27:40 -07:00
jiabin
3994075a5b Add support for manually set surround formats.
To make surround sound setting more clear to users, we are changing
surround setting from ALWAYS to MANUAL. With MANUAL, users could enable
surround formats according to their need.

Bug: 67479735
Test: Try creating AudioTrack with enable/disable surround formats.
Change-Id: I79e610f6c43d7003daf13da3bee4e03ba9b6ea87
2018-05-15 10:10:47 -07:00
Beverly
301e92a4dd Show settings suggestion
Bug: 78445134
Test: Settings tests
Change-Id: Ib66ebb3af3328ac1ffa9949282afaf800e1f1019
2018-05-11 09:45:04 -04:00
Christopher Tate
72da1e6f78 Document system activity intents that may not be implemented
All of these activity-start intents might be unimplemented on some
Android products.  Document this to make sure that developers are
aware of the need to safeguard against this.

Bug: 68300743
Bug: 62201251
Bug: 69587018
Fixes: 77282739
Test: atest CtsContentTestCases:.AvailableIntentsTest
Change-Id: Ia2346d03ccb7f2bdad2b84ba9efff72413fdc3c2
2018-05-10 17:55:26 -07:00
Damien Bargiacchi
68bbaade77 Switch the setting for Off Body Radios Off to User Absent Radios Off
Bug: 79491395
Change-Id: I82f8742398da503bdddc420399de444e3314998e
2018-05-09 21:11:44 -07:00
Dianne Hackborn
65a4f251c7 Further flesh out app ops foreground state.
Fix some bugs, add the ability to monitor state changes, improve
dumpsys output to help debugging, add a new check API that allows
the caller to get the real state.

Bug: 78480444
Test: atest FrameworksServicesTests:AppOpsServiceTest
Test: atest CtsPermissionTestCases:AppOpsTest
Change-Id: I3d41be9968c1d95a1456f4052da958ea64aa068d
2018-05-09 18:02:35 -07:00
Victor Hsieh
792d36c170 Merge "Allow only selected priv apps to run OOB" into pi-dev 2018-05-09 19:21:22 +00:00
Victor Hsieh
785d618b1a Allow only selected priv apps to run OOB
- Add pm.dexopt.priv-apps-oob-list to allow selecting specific packages
  to run OOB, in a comma-separated string of package names. When set to
  "ALL" (default), all priv apps will run in OOB.
- Add a global config priv_app_oob_list to persist the state for
  experiment.
- Also make background dexopt to respect the config.

Test: 0. Reset previous OOB settings.
      1. settings put global priv_app_oob_list \
         com.google.android.gms,com.android.vending
      2. cmd package compile -m speed -f com.google.android.gms (then
         com.android.vending, com.google.android.googlequicksearchbox)
      3. dumpsys package dexopt
         # .vending and .gms are "verify", .googlequicksearchbox is
         # "speed".
Test: settings put global priv_app_oob_list 'ALL'  # see the same result
Test: settings delete global priv_app_oob_list  # see the same result
Test: atest SettingsBackupTest
Bug: 30972906
Bug: 63920015
Change-Id: Iba47b4763a026cdc94939db0a743822278917269
2018-05-09 07:45:51 -07:00
Rohan Shah
7af8fe3e29 Merge "Add knobs for tweaking blocking helper thresholds" into pi-dev 2018-05-08 21:00:07 +00:00
Rohan Shah
0350dab5b6 Add knobs for tweaking blocking helper thresholds
Added both blocking helper parameters to Global Settings to allow for
tweaking stats/values. Added listeners for value updates (so that
channels are updated properly with new thresholds).

Bug: 77143005
Test: manually, test cases
Change-Id: Ia5cfb29ca40500a694261bd5e9e60fa1f34e742a
2018-05-08 09:34:38 -07:00
android-build-team Robot
564942d065 Merge "Convert RTT background throttle to a settable value (1/2)." into pi-dev 2018-05-04 23:40:22 +00:00
Michael Wachenschwanz
b3972f9d23 Merge "Add Stable Charging Threshold for AppStandby" into pi-dev 2018-05-02 00:23:23 +00:00
Wei Wang
b6e04d5383 Convert RTT background throttle to a settable value (1/2).
Bug: 69323456
Test: Manual test. Unit tests with runtest.sh.
Change-Id: I7dd3efc0ef3f0a12303f927da134abbd2383deb6
2018-04-30 19:49:02 -07:00
Ajay Nadathur
43bda82c10 Add personalization state paused constant
- Add a new constant USER_SETUP_PERSONALIZATION_PAUSED to inform
interested listeners when personalization is paused.

bug: 78898802
Test: Manually tested and verified
Change-Id: I4481c38e31a8b47dfc98d8733b446885899d4a67
2018-04-30 21:42:44 +00:00
Chia-I Wu
06c0c3a933 Merge "Add COLOR_MODE_AUTOMATIC" into pi-dev 2018-04-27 15:47:41 +00:00
Sudheer Shanka
a750da1960 Merge "Schedule external stats sync on battery level change with a delay" into pi-dev 2018-04-27 03:20:38 +00:00
Michael Wachenschwanz
5ca5cb6c53 Add Stable Charging Threshold for AppStandby
Delay parole when charging to ensure the device has some time to charge
and avoid a spike is activity on plug in.

Change-Id: If85f097249aeed6b64f43a22f4d25ff0a070febb
Fixes: 78040839
Test: atest AppStandbyControllerTests
2018-04-26 15:44:58 -07:00
Sudheer Shanka
0719c6af44 Schedule external stats sync on battery level change with a delay
and fix locking in scheduleCpuStatsSyncDueToWakelockChange().

Bug: 74146897
Test: atest cts/hostsidetests/incident/src/com/android/server/cts/BatteryStatsValidationTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2891dfb8a0aedf429232f45e26deab93c738506e
2018-04-26 15:43:40 -07:00
TreeHugger Robot
4620d9b3a3 Merge "Add ADAPTIVE_BATTERY_MANAGEMENT_ENABLED" into pi-dev 2018-04-25 23:37:43 +00:00
Chia-I Wu
1e0e7176bd Add COLOR_MODE_AUTOMATIC
COLOR_MODE_SATURATED disables color management and thus treat any
color space as panel color space.  COLOR_MODE_AUTOMATIC is similar
to COLOR_MODE_SATURATED in that it stretches color spaces to panel
color space, but the stretching is color space aware.

persist.sys.sf.native_mode is extended to be a integer, where

 0: use DisplayColorSetting::MANAGED
 1: use DisplayColorSetting::UNMANAGED
 2: use DisplayColorSetting::ENHANCED

Bug: 73824924
Test: manual
Change-Id: Ia356958d8e1fbae90f244ded7111de2e45aa4b3c
2018-04-25 11:35:36 -07:00
Sudheer Shanka
e56013aa31 Rate limit battery external stats collection in takeUidSnapshot(s).
Bug: 74146897
Test: atest cts/tests/tests/os/src/android/os/health/cts/SystemHealthManagerTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2e01146718c3ce65d230308097622b958cb2897a
2018-04-23 11:38:36 -07:00
Lei Yu
4b976ad270 Add ADAPTIVE_BATTERY_MANAGEMENT_ENABLED
APP_STANDBY_ENABLED is controlled by server side to do experiment.
Before this CL, Adaptive Battery is hooked up to this flag, so
even though if user turns it off, it may be turned on by server.

Add a high level ADAPTIVE_BATTERY_MANAGEMENT_ENABLED to control
the feature in settings UI side.

AppStandbyController looks at both flags and enables standby
only if both are true.

Bug: 78153913
Test: Build
      Manually change both flags (through UI and adb)
      Verify dumpsys usagestats shows the correct state
      for mAppIdleEnabled.
Change-Id: I1fb4461f382e1ee87000fdc38962d94a17891c1e
2018-04-19 11:47:38 -07:00
TreeHugger Robot
af52d9815a Merge "Add setting for GNSS location request update duration" into pi-dev 2018-04-18 18:10:04 +00:00
Qingxi Li
ff03f0cfe4 Merge "Add Global Settings to device whether show Carrier menu" into pi-dev 2018-04-17 22:20:59 +00:00
Qingxi Li
ead1271f1c Add Global Settings to device whether show Carrier menu
Add Global Settings EUICC_SUPPORTED_COUNTRIES. When the device enabled
esim UI by default and the users in eSIM supported countries, even if
eSIM is not provisioned, carrier menu will be shown. This global
settings will be updated by eSIM mamanger when the phone boot up.

Bug: 77638033
Test: E2E
Change-Id: Ib3ac8bcdfab56d6cd7c12e48318f1794af5bc1aa
2018-04-17 10:02:37 -07:00
Lifu Tang
58aa11bd1f Add an action to launch scanning settings
Needs to launch scanning settings from other apps

Bug: 77823544
Test: build and flash
Change-Id: If02b359dcbfee79b34b6b66abb3cf36a2a3412e3
2018-04-13 16:32:08 -07:00
Mathew Inwood
fb55bd8706 Merge "Configurable sampling rate for hidden API access log events." into pi-dev 2018-04-11 16:45:19 +00:00
Santos Cordon
5177da3b01 Add SCREEN_BRIGHTNESS_FOR_VR to set of public settings.
This will allow the settings to be adjusted by any third party app,
just like SCREEN_BRIGHTNESS is today.

Additionally adds the default value to the SystemSettings database
on initial setup.

Test: After clean install check that the default value is in the DB via
  'adb shell settings get system screen_brightness_for_vr'
Test: Verify that SCREEN_BRIGHTNESS_FOR_VR can be changed by a 3rd party
  app with WRITE_SETTINGS permission.

Bug: 73090564
Change-Id: I93d167ab23652c39b0cf815eb40935be26b857a6
(cherry picked from commit 5956f49210f32b8ceabf860f904b5ca77ec9631c)
2018-04-10 09:55:09 -07:00
Mathew Inwood
04194fef78 Configurable sampling rate for hidden API access log events.
To reduce log spam, we do not log all hidden API accesses. This CL allows
configuration of the sampling rate of the log events so it can be tweaked
later if necessary.

Test: m
Test: $ adb shell settings put global hidden_api_access_log_sampling_rate 65536
Bug: 64382372
Bug: 77517571
Change-Id: I659c22bd504564da58d972f94b774a9af4039386
2018-04-10 16:57:07 +01:00
TreeHugger Robot
e5d97dd6f9 Merge "Add link to onboarding screen" into pi-dev 2018-04-10 14:35:44 +00:00