Commit Graph

6510 Commits

Author SHA1 Message Date
Antony Sargent
9ceb587ede Don't crash on null Intent in FingerprintEnrollFindSensor
During a run of the setup wizard, a tester one time encountered a case
where the 'Accept Legal terms' screen followed by the Security screen
showed for a second time after already confirming the pattern in the
Security screen. The logs showed a crash in
FingerprintEnrollFindSensor.onActivityResult which could only have
happened if it was called with a requestCode of CONFIRM_REQUEST and a
resultCode of RESULT_OK, but a null Intent.

This isn't an expected flow, and AFAIK we haven't been able to reproduce
the original problem, but it seems reasonable to at least not crash in
settings, so this CL defends against that crash by just calling finish()
in this case, which means the caller who started the
FingerprintEnrollFindSensor will see the default result code of
Activity.RESULT_CANCELLED.

Bug: 80099085
Test: make -j RunSettingsRoboTests
Change-Id: I94401eabe295e4d5396cf7d324fbf1902dc45f6d
2018-05-31 14:22:38 -07:00
Josh Hou
606222da7f Add Slices for Enhanced 4G LTE
Add Slices for Enhanced 4G LTE
Enhanced 4G LTE Slice Provider:
Create slice to display appropriate message with further instructions
Enhanced 4G LTE Slice Broadcast Reciver:
1. Change the setting via ImsManager
2. Ask to requery the slice in one second to display updated settings if 1 is valid or display appropriate message

Bug: 79270171
Test: Robotests
Test: Use support-slices-demos-debug.apk to test on device
Change-Id: I48d412de94d5d9f1ad42a299691ec5cf8001c6a1
2018-05-31 10:34:00 -07:00
TreeHugger Robot
4199198ec2 Merge "Make Settings Slider Slices one row" into pi-dev 2018-05-31 16:03:25 +00:00
TreeHugger Robot
e68598380e Merge "Shown toast when BT turned on" 2018-05-31 07:00:27 +00:00
ryanywlin
d67314e771 Handle Bluetooth is not supported on emulator
- Disable audio swicher while Bluetooth feature is not supported
- Error handle before using LocalBluetoothManager in the constructor

Bug: 80491267
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j42

Change-Id: I971f31cd08dd0a2778548f6d1d675f279d92ef8e
2018-05-31 12:48:13 +08:00
Weien Wang
31f17d88d0 Merge "Fix the battery icon on the battery page when low battery" 2018-05-31 04:37:05 +00:00
hughchen
3051845840 Shown toast when BT turned on
* Shown "Bluetooth turned on" toast only when BT turned on in "Pair new device"
* Add test to verify shown toast function can be called when BT turned on.

Bug: 79383997
Test: make -j42 RunSettingsRoboTests ROBOTEST_FILTER=BluetoothPairingDetailTest
Change-Id: I25f75aaa04063d9ef8a0df4bb06aeaa70d7ac146
2018-05-31 11:03:37 +08:00
TreeHugger Robot
32f70ecd95 Merge "Use settingslib shadows in Settings robotest" 2018-05-30 23:00:20 +00:00
Matthew Fritze
93307cdb69 Make Settings Slider Slices one row
To unify all Settings slices into one row, we change
Settings Slider from user a header and a input range to
only using an Input Range.

Change-Id: I61715a45b29b6a52a47711811e5c6b2c83d50901
Fixes: 80430118
Test: robotests
2018-05-30 15:39:43 -07:00
Fan Zhang
6fc7ebd72b Use settingslib shadows in Settings robotest
Change-Id: Ieae5d65bb5efdbc4c91455d1f722e84fe9e60116
Fixes: 80428049
Test: robotest
2018-05-30 14:36:26 -07:00
TreeHugger Robot
2c032fdd19 Merge "Stop using AppState for app icon in DomainAppPreference." 2018-05-30 20:31:54 +00:00
TreeHugger Robot
ad90960b6e Merge "delete DeviceInfoSettings and activity, pref xml" 2018-05-30 20:14:50 +00:00
Fan Zhang
179f537173 Stop using AppState for app icon in DomainAppPreference.
Change-Id: I080ed9d2d7d70c092bec54ed4e4b6bb2b6c8f453
Fixes: 77967533
Test: robotest
2018-05-30 12:33:26 -07:00
TreeHugger Robot
50437769a2 Merge "Skip device index job if caller is not Settings app." 2018-05-30 18:40:21 +00:00
Fan Zhang
74ba1a51d7 Skip device index job if caller is not Settings app.
Change-Id: I96184f111e83477b46ddf321ec74917bab330048
Fixes: 80437512
Test: robotests
2018-05-30 10:38:58 -07:00
TreeHugger Robot
cf2e1fd593 Merge "Plumb context object to PowerWhitelistBackend." into pi-dev 2018-05-30 03:08:20 +00:00
Ivan Chiang
c6d7191cb9 Fix gray out previously connected device preference issue
Count the dock devices in previously connected device controller.

Change-Id: I08d82ec715698ecf894a4a7cd0631c5f1de0f591
Fix: 80227045
Test: m -j SettingsRoboTests RunSettingsRoboTests
2018-05-30 02:45:47 +00:00
TreeHugger Robot
6e06da361a Merge "Plumb context object to PowerWhitelistBackend." 2018-05-30 01:50:40 +00:00
TreeHugger Robot
3a05544d34 Merge "Misc fixes for Settings" 2018-05-30 00:26:48 +00:00
TreeHugger Robot
ce7d1ab3bb Merge "Prevent disabling default phone/sms apps in battery setting" into pi-dev 2018-05-30 00:18:45 +00:00
Fan Zhang
3489f65024 Plumb context object to PowerWhitelistBackend.
Change-Id: Ice0d037625d47f1f668b00499a7f1ad2302cc0ba
Merged-In: Ice0d037625d47f1f668b00499a7f1ad2302cc0ba
Fixes: 76435804
Test: robotests
2018-05-29 22:33:01 +00:00
Fan Zhang
7e395e1a00 Plumb context object to PowerWhitelistBackend.
Change-Id: Ice0d037625d47f1f668b00499a7f1ad2302cc0ba
Fixes: 76435804
Test: robotests
2018-05-29 22:32:22 +00:00
Fan Zhang
9ab2f37226 Prevent disabling default phone/sms apps in battery setting
- In handleDisableable(), call getKeepEnabledPackages() in the same way
  as AppActionButtonPreferenceController.
- Update getKeepEnabledPackages() to dynamically query default phone/sms
  app packages.

Change-Id: I8dc7d6248cf440dcc053f6acba9d5548d5670c41
Merged-In: I8dc7d6248cf440dcc053f6acba9d5548d5670c41
Fixes: 80328396
Bug: 80312809
Test: robotests
2018-05-29 22:25:56 +00:00
Fan Zhang
b70b11e02b Prevent disabling default phone/sms apps in battery setting
- In handleDisableable(), call getKeepEnabledPackages() in the same way
  as AppActionButtonPreferenceController.
- Update getKeepEnabledPackages() to dynamically query default phone/sms
  app packages.

Change-Id: I8dc7d6248cf440dcc053f6acba9d5548d5670c41
Bug: 80328396
Bug: 80312809
Test: robotests
2018-05-29 22:21:24 +00:00
Fan Zhang
8379a09554 Misc fixes for Settings
- Add some precautious logging in RoundedHomepageIcon in case b/79841665
  comes back.
- Hide memory setting from app info page.

Change-Id: I37d090504ab25854e1278aa3a6d3e85781f394b1
Fixes: 79841665
Fixes: 80140797
Test: visual
2018-05-29 13:56:43 -07:00
Matthew Fritze
58019a84ed Merge "Fix bluetooth search result no-op" into pi-dev am: f14bfcbfa6
am: 9cb3dd123d

Change-Id: Ib35794ec9c9e71c53145f418629287fd72d9adc6
2018-05-29 12:56:44 -07:00
Fan Zhang
0b5f345e87 Merge "Fix a bug where device index is not skipped correct." into pi-dev am: 75b3e6f302
am: 9bc1f54268

Change-Id: Id2979eaf1f08bd2c67bd6bba31a62eb5d0acf8e2
2018-05-29 12:53:47 -07:00
Matthew Fritze
111fc0344b Merge "Fix DND crash from SpringboardActivity" into pi-dev am: 3f790b76b0
am: 7fcbaf4ac9

Change-Id: I999288a61ebc780986ed108cd0b255db6ee4d791
2018-05-29 12:52:43 -07:00
TreeHugger Robot
f14bfcbfa6 Merge "Fix bluetooth search result no-op" into pi-dev 2018-05-29 19:40:14 +00:00
TreeHugger Robot
75b3e6f302 Merge "Fix a bug where device index is not skipped correct." into pi-dev 2018-05-29 18:48:24 +00:00
TreeHugger Robot
3f790b76b0 Merge "Fix DND crash from SpringboardActivity" into pi-dev 2018-05-29 18:47:23 +00:00
Matthew Fritze
d5fc3a95c6 Fix bluetooth search result no-op
Bluetooth fragment was manually setting intent information,
which meant that the result didn't fire an intent properly.

This type of regression or mistake will be caught in the fix for
b/77921040.

Change-Id: I49f87f40acbfc3f74ea2e97835f2644d443169e2
Fixes: 80317645
Test: robotests
2018-05-29 11:38:52 -07:00
TreeHugger Robot
cb4faa37e9 Merge "Modified the ManageDomainUrls" 2018-05-29 17:34:41 +00:00
Michael Wright
1c7ae169ac Merge "Hide haptic intensity settings for devices without enough dynamic range." into pi-dev am: 8c60fc69b7
am: 23460d03bc

Change-Id: I5c5e8a4157874f19abe28201fba772c72bc7f9d9
2018-05-25 19:17:33 -07:00
TreeHugger Robot
8c60fc69b7 Merge "Hide haptic intensity settings for devices without enough dynamic range." into pi-dev 2018-05-26 02:03:09 +00:00
Fan Zhang
548485336f Fix a bug where device index is not skipped correct.
When checking language/build fingerprint to skip reindex, language check
was comparing Locale object and String object, so they would never be
equal, so we accidentally reindex every time.

- Switched Objects.equal to TextUtils.equal, this catches the error at
compiler level.

Bug: 80065409
Test: compile/robotest
Change-Id: I2b3c68bb1c2fd876338f42321605567d7e64d64b
2018-05-25 16:25:14 -07:00
stanley.tf_wang
828409a79d Modified the ManageDomainUrls
Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.applications
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
      atest UniquePreferenceTest
      atest SettingsGatewayTest

Change-Id: Ib5b1281be6cb3cab8528d10b6d6ff3146f33b8df
2018-05-25 16:16:21 -07:00
Michael Wright
3dbaac6e71 Hide haptic intensity settings for devices without enough dynamic range.
Despite our hope, devices prior to P18 just don't have the dynamic range
to give three distinct vibration intensity settings. Given this, only
show an on / off toggle for devices by default unless they explicitly
opt-in to multiple intensity levels.

Test: m -j RunSettingsRoboTests
Bug: 80243632
Change-Id: I14ece855cf20f9fa44b0648d28f89c0053be5c5f
2018-05-25 22:57:03 +01:00
TreeHugger Robot
834305e258 Merge "Remove OverlayManagerWrapper class out from Settings" 2018-05-25 21:08:13 +00:00
Matthew Fritze
a559103b1b Fix DND crash from SpringboardActivity
Special case Uris need to explicitly add their intents.
This unfortunately duplicates a list of special-cased Slices,
but I have attached a bug with a plan to address this duplicity in Q.

Change-Id: I346915c32543713d33716422018d7c950cce323d
Fixes: 80065409
Test: atest SliceDeepLinkSpringBoardTest
2018-05-25 13:35:23 -07:00
Ching-Sung Li
feae5d79cf Remove OverlayManagerWrapper class out from Settings
Remove OverlayManagerWrapper and use IOverlayManager instead. Based on
comment from reviewer to refactor ThemePreferenceController.

Bug: 76167422
Test: RunSettingsRoboTests
Change-Id: I0bddf50d8ea7721fe258a9a9b51f8c56dd5afcce
2018-05-25 12:59:18 -07:00
TreeHugger Robot
7d214f99ee Merge "2nd attempt to fix Slice strict mode." into pi-dev 2018-05-25 19:44:32 +00:00
TreeHugger Robot
9534fbdf1b Merge "2nd attempt to fix Slice strict mode." 2018-05-25 18:41:28 +00:00
Fan Zhang
934de22622 2nd attempt to fix Slice strict mode.
1. Use real BluetoothAdapter instead of settingslib version. The
   settingslib version contains calls that violates strictmode rules.
2. Override StrictMode rules in SettingsSliceProvider when it's called
   in background thread. When in background, the enforcement from Slice
   framework (StrictMode#ThreadPolicy) is not useful and can be safely
   ignored.

Change-Id: I68523148f4c1dc88a54e207447d21ec439478cdf
Bug: 79985175
Test: robotests
2018-05-25 10:39:59 -07:00
TreeHugger Robot
da07a66365 Merge "Add remaining whitelisted controllers" into pi-dev 2018-05-25 16:53:44 +00:00
TreeHugger Robot
fdef0464e9 Merge "Add remaining whitelisted controllers" 2018-05-25 16:47:57 +00:00
Fan Zhang
2313b24215 2nd attempt to fix Slice strict mode.
1. Use real BluetoothAdapter instead of settingslib version. The
   settingslib version contains calls that violates strictmode rules.
2. Override StrictMode rules in SettingsSliceProvider when it's called
   in background thread. When in background, the enforcement from Slice
   framework (StrictMode#ThreadPolicy) is not useful and can be safely
   ignored.

Change-Id: I68523148f4c1dc88a54e207447d21ec439478cdf
Merged-In: I68523148f4c1dc88a54e207447d21ec439478cdf
Fixes: 79985175
Test: robotests
2018-05-25 16:37:56 +00:00
TreeHugger Robot
b915f3566b Merge "Make summary text update after settings changes" into pi-dev 2018-05-25 15:01:26 +00:00
TreeHugger Robot
038d1f9db5 Merge "Make summary text update after settings changes" 2018-05-25 14:52:59 +00:00
Ivan Chiang
95abf59af4 Fix gray out previously connected device preference issue
Count the dock devices in previously connected device controller.

Fix: 80227045
Test: m -j SettingsRoboTests RunSettingsRoboTests
Change-Id: I08d82ec715698ecf894a4a7cd0631c5f1de0f591
Merged-In: I08d82ec715698ecf894a4a7cd0631c5f1de0f591
2018-05-25 08:51:30 +00:00