Commit Graph

4260 Commits

Author SHA1 Message Date
Beverly
28c3d164d9 Only play in-call notification if ringer is normal
- Add secure setting to enable/disable in call notifications
- Can toggle system setting using the following adb command:
adb shell settings put secure in_call_notification_enabled [0/1]

Bug: 71586014
Test: manual
Change-Id: I32e1d1d6dcae806e655ae6875a43d07ca83e77f4
2018-06-29 16:52:14 -04:00
TreeHugger Robot
c39a8ac6e7 Merge "Remove sleep_timeout setting from backup" 2018-06-28 17:34:11 +00:00
Bernardo Rufino
338832fad8 Remove sleep_timeout setting from backup
It is not user-configurable.

Bug: 79779285
Test: atest SettingsBackupTest
Test: # w/ LocalTransport
      adb shell settings put secure sleep_timeout 5000
      adb shell bmgr backupnow com.android.providers.settings
      adb shell settings put secure sleep_timeout 3000
      adb shell bmgr restore 1 com.android.providers.settings
      adb shell settings get secure sleep_timeout => ensure 3000

Change-Id: I68bf2f91cc3d4c00463468a6abaef3b64d5c10b9
2018-06-28 16:32:42 +00:00
Andrew Zeng
6badc28ecc Update notification settings Javadoc links.
Change-Id: If9ed94473fb5c0607fa44b9a42c62837878ffd00
2018-06-27 21:09:15 +00:00
TreeHugger Robot
b9d084d696 Merge "Use correct validator for SELECTED_SPELL_CHECKER_SUBTYPE" 2018-06-25 21:15:54 +00:00
TreeHugger Robot
67f17cd690 Merge "Handle tri-state location permission." 2018-06-25 18:41:07 +00:00
Yohei Yukawa
4bc81e836c Use correct validator for SELECTED_SPELL_CHECKER_SUBTYPE
This CL fixes a bug that COMPONENT_NAME_VALIDATOR is mistakenly used
for SELECTED_SPELL_CHECKER_SUBTYPE secure settings due to a comment
bug.  ANY_INTEGER_VALIDATOR should be used instead because it stores
the hashcode of SpellCheckerSubtype.

This CL also addresses the comment bug, which caused this issue.

Fix: 110363012
Test: atest FrameworksCoreTests:android.provider.SettingsBackupTest
Test: atest FrameworksCoreTests:android.provider.SettingsValidatorsTest
Test: manually verified as follows
 1. In a source device, complete the setup wizard (without restoring
    the previous settings) then run 'adb shell bmgr backupnow --all'
 2. In a destination device, restore settings by choosing the option
    from a cloud backup.
 3. Check logcat. Make sure that the following message is not shown.
      SettingsBackupAgent: Attempted restore of selected_spell_checker_subtype setting, but its value didn't pass validation, value: 0
Test: manually verified as follows
 1. In a source device
  1.1. complete the setup wizard without restoring the previous
       settings
  1.2. Open Settings -> System -> Languages & input -> Advanced
       -> Spell checker -> Languages
  1.3. Select 'French'
  1.4. adb shell settings get secure selected_spell_checker_subtype
       -> Make sure it shows '102517'
  1.5. adb shell bmgr backupnow --all
 2. In a destination device
  2.1. Restore settings by choosing the option from a cloud backup.
  2.2. adb shell settings get secure selected_spell_checker_subtype
       -> Make sure it shows '102517'
Change-Id: I560395a2ccd5bcf1bf7446123b892b23ab14f9f5
2018-06-25 11:35:19 -07:00
Wei Wang
dd070f2fd9 Handle tri-state location permission.
Use noteOp instead of checkOp as checkOp doesn't consider
background status.

Watch location permission changes caused by background status.

Restrict age of last location for foreground-only apps.

Bug: 80318398
Test: Manual
Change-Id: I3499d4150478b6f501966953f8e4a08169f3557c
2018-06-22 14:12:20 -07:00
TreeHugger Robot
751bd5b621 Merge "Link Speed Metrics Proto" 2018-06-20 19:28:39 +00:00
TreeHugger Robot
664e0d66c7 Merge "Wifi Usability Metrics Proto Update" 2018-06-20 18:03:16 +00:00
Jong Wook Kim
e4aa37fe48 Link Speed Metrics Proto
Add a histogram of link speed values with count and rssi values.

Collect this metrics only when enabled in settings. By default, we don't
collect this metrics.

Bug: 78354985
Test: Settings Unittest
Change-Id: I683dfb45a01de5e1243d612a117a5544b0d4dc05
2018-06-18 18:21:45 -07:00
Jong Wook Kim
411cab97c6 Wifi Usability Metrics Proto Update
Generate WifiIsUnusableEvent when there is a data stall or a firmware
alert. In WifiIsUnusableEvent, store metrics related to time, packet
counts, trigger reason, and score.

Also, log ExperimentValues that we plan to change through global
settings varaible.

This logging is enabled by setting WIFI_IS_UNUSABLE_EVENT_METRICS_ENABLED
to 1. By default, this metric is not collected.

Manual Check Process:
- Connect to a network
- adb shell settings put global wifi_is_unusable_event_metrics_enabled 1
- adb shell dumpsys wifi wifiMetricsProto
- Move away from the ap to trigger data stall
- adb shell dumpsys wifi | grep -10 WifiIsUnusableEventList
- Verify that there is a WifiIsUnusableEvent

Bug: 77603216
Test: Unittest (settings core/tests/coretests).
Test: Manual Check.
Change-Id: I2d8425a420f5ba18e3eee0e11b6f35f6239a97b2
2018-06-18 17:32:03 -07:00
Android Build Merger (Role)
383d04261f [automerger] Add documentation for additional flag to disable Home. am: 8f36f14e16
Change-Id: I2f6222308e1e6b6fbb8536a543230a8dd7aeb9ab
2018-06-19 00:24:22 +00:00
Michael Kwan
8f36f14e16 Add documentation for additional flag to disable Home.
Bug: 79545325
Change-Id: Ia3cf3108a5b1ea7d76d0d85c36f7fbc98bb4d82e
2018-06-18 14:27:24 -07:00
Kevin Chyn
114e58a6f9 Merge "Don't back up Assist Gesture setup/sensitivity" into pi-dev
am: a74fbef8ce

Change-Id: I28f349b3674126a85731489fd8119b41385934a7
2018-06-18 05:49:12 -07:00
Kevin Chyn
b5b29a8c70 Merge "Merge "Don't back up Assist Gesture setup/sensitivity" into pi-dev am: a74fbef8ce" into pi-dev-plus-aosp
am: fe611a5700

Change-Id: I1aba793c0c71573e06d52f14aec823a4f6d3ad93
2018-06-15 23:07:17 -07:00
Kevin Chyn
ecc07726e2 Merge "Don't back up Assist Gesture setup/sensitivity" into pi-dev
am: a74fbef8ce

Change-Id: Ib14cc5a35991dec3623ecf2dfdb72cbbccd7e53e
2018-06-15 22:49:30 -07:00
TreeHugger Robot
4fa7af169b Merge "Add emergency dialer option on power menu" 2018-06-14 09:52:27 +00:00
Wesley.CW Wang
8d07276f23 Add emergency dialer option on power menu
Add a button on power menu to launch emergency dialer.
Add FASTER_EMERGENCY_PHONE_CALL_ENABLED to SettingsBackupTest blacklist.

Test: Manually
Change-Id: I9c920e31433c0ac23165f917d8dd2befaaa4938d
Bug: 80376488
2018-06-14 15:06:20 +08:00
Beverly
dec19a768f Get rid of unnecessary todo
Test: builds
Change-Id: I7feffec1e06112030d2e02055555684827c22fcd
2018-06-12 15:53:05 -04:00
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
Damien Bargiacchi
0a8ab83382 Add a setting for the User Absent, Touch Off feature in Wear
This is an extension of the User Absent power feature on Wear aka "for small batteries". Turning the
sensor off is one of the aspects of power saving we want to take advantage of when the user is
absent.

Bug: 77293569
Test: make -j80
Test: Device boots
Change-Id: I25a3577d8eb2d157c20ed344056138bc32e8d158
2018-06-11 18:10:59 +00:00
Damien Bargiacchi
467fc61aa2 Merge changes from topic "wear_power_service-master"
* changes:
  Start the WearPowerService with the other Wear system services
  Add a setting for the User Absent, Touch Off feature in Wear
2018-06-11 17:49:24 +00:00
Fan Zhang
c69c8b6008 Add a setting to control multi-user feature on/off.
Bug: 72319180
Test: n/a
Change-Id: I0fd00e9c278de8ece530cacd43aaeae854002f14
2018-06-08 14:48:54 -07:00
Damien Bargiacchi
2e9b8c3753 Add a setting for the User Absent, Touch Off feature in Wear
This is an extension of the User Absent power feature on Wear aka "for small batteries". Turning the
sensor off is one of the aspects of power saving we want to take advantage of when the user is
absent.

Bug: 77293569
Test: make -j80
Test: Device boots
Change-Id: I25a3577d8eb2d157c20ed344056138bc32e8d158
2018-06-07 16:11:34 -07:00
Alice Sheng
59ca58c1f5 Merge "Clean up Wear CPU scaling and swap experiments." 2018-06-06 21:35:01 +00:00
Alice Sheng
8385c0d5b5 Clean up Wear CPU scaling and swap experiments.
The experiments are over now, cleaning up code.

Change-Id: I145b66415d96112535b93385bd0613c2d3d33e46
2018-06-06 09:42:25 -07:00
Lucas Dupin
a0c0cf7707 Whitelist always-on setting
Change-Id: I43c70be051f9a02d0d565fbe73b213788902f2ca
Fixes: 75252202
Test: Manually retore settings on another device using setup wizard
Test: atest core/tests/coretests/src/android/provider/SettingsBackupTest.java
2018-06-05 12:02:14 -07:00
Aurimas Liutikas
e701dc1799 Fix broken links in @see tags in framework docs.
doclava was accidentally suppressing all these broken links
in @see tags. This CL fixes issues so we can start enfocing
checks for broken @see links.

Test: make docs
Change-Id: If7830ece85f8d1f27c991eae282230814726e115
Exempt-From-Owner-Approval: Fixing @see javadoc link issues that are currently completely broken
2018-06-04 10:15:22 -07:00
Steven Wu
a680beb24d Store flashlight status and broadcast it needed for flashlight slice.
Test: manual
Bug: 74913192
Change-Id: I54ead1727d08b113dec13e3f7c128895770e68f1
2018-05-24 17:44:03 +00:00
Remi NGUYEN VAN
7bea387500 Merge "Add configurable captive portal probes" into pi-dev am: 1f8f21af60
am: 23d3487caa

Change-Id: Ia958815325d1466345e9626efc8f62fc9d08d774
2018-05-23 17:15:44 -07:00
Remi NGUYEN VAN
23d3487caa Merge "Add configurable captive portal probes" into pi-dev
am: 1f8f21af60

Change-Id: Iec7a74bbf2569a91e958c497200d77e8451cbf7b
2018-05-23 15:22:24 -07:00
Matthew Fritze
9a32638480 Merge "Add Settings Slice Whitelist key" into pi-dev
am: 1561bb41bd

Change-Id: Ic0843740958ff9e191f98220c3a80bf29a5e8251
2018-05-23 10:51:35 -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
886299c526 Add theme mode design let user can choose theme self am: f0800fa3bd
am: aef9007d12

Change-Id: I240f76ff5cb982a15aff65e3d683c9c9df031fa3
2018-05-22 15:11:02 -07:00
Tony Huang
aef9007d12 Add theme mode design let user can choose theme self
am: f0800fa3bd

Change-Id: Ie4b645af602aac8575e1c220714b094118a3aaa6
2018-05-22 15:04:57 -07: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
TreeHugger Robot
4b2bd72b74 Merge "Add Settings Slice Whitelist key" 2018-05-22 21:02:45 +00:00
Annie Meng
745039cb96 Merge "Allow restore of settings with nullable components" into pi-dev am: 2d6dbbac04
am: 89f02f871d

Change-Id: If9389caa9f5159bd7983eb785e092b24fd1b7cab
2018-05-22 12:17:45 -07:00
Annie Meng
89f02f871d Merge "Allow restore of settings with nullable components" into pi-dev
am: 2d6dbbac04

Change-Id: I28f02ff934aed4e51395c6c1692f655cf35bbbed
2018-05-22 12:02:00 -07:00
Matthew Fritze
7c5fa7ff09 Add Settings Slice Whitelist key
Bug: 79779103
Test: None - only a flag.
Change-Id: I794159db4ff8aba7b6dcd91e13a984db40da47e7
2018-05-22 08:08:27 -07: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
0e4f3bf243 Merge "Check settings validators for NPE" into pi-dev am: 3a95d0bb94
am: 0b653bc5e4

Change-Id: I5afb8ce11e978bc2290cb1ef266b6b68e638fce1
2018-05-22 03:10:33 -07:00
Annie Meng
0b653bc5e4 Merge "Check settings validators for NPE" into pi-dev
am: 3a95d0bb94

Change-Id: I75fe10196f29f10f80631f2a11ceda9e8a6d5d87
2018-05-22 03:03:21 -07: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
Beverly
f1ef5833b0 Merge changes Id4feeefa,Ie0a501b8 into pi-dev am: 45a250a2be
am: 6e66b320fd

Change-Id: I8f185099f0f00f62a9ae6e219f29c9dd2efd8d2d
2018-05-18 17:01:25 -07:00
Beverly
6e66b320fd Merge changes Id4feeefa,Ie0a501b8 into pi-dev
am: 45a250a2be

Change-Id: Id58b92f3400f17fedb30524cc851fa3c1304af61
2018-05-18 16:33:20 -07:00