Commit Graph

21048 Commits

Author SHA1 Message Date
Jack He
2b0dbf7d24 Bluetooth: Use config value for default max connected audio devices
* The first option in Bluetooth max connected audio devices preference
  should be using system default
* Added template based string array to show system default in the list
  preference and in preference summary when default is chosen
* Reset max connected audio devices property to empty string when
  development setting is disabled or when system default is chosen
* Added instrumentation test to check preference array size and whether
  default value is within range of preference array values
* Modified robolectric tests to verify the updated behaviors

Bug: 64767509
Test: Enable and disable multi-device mode in development settings
      make -j32 RunSettingsRoboTests
      atest SettingsUnitTests:BluetoothMaxConnectedAudioDevicesPreferenceControllerInstrumentationTest
Change-Id: I4915f12df0ac0e6f715e44e0df4a3707dde8d1a4
2018-03-01 02:01:30 +00:00
TreeHugger Robot
43a2878215 Merge "Auto update summary for mobile network preference." 2018-03-01 01:42:32 +00:00
TreeHugger Robot
f5b8aedcf5 Merge "Remove custom updateState() if it's just setting summary" 2018-03-01 01:29:22 +00:00
TreeHugger Robot
6f271c4287 Merge "Under "recent location requests", add "See all"" 2018-02-28 23:46:32 +00:00
Fan Zhang
b3b5082536 Auto update summary for mobile network preference.
Change-Id: Ic7854ef4d2d710dff528244a5e5fb75708740d2e
Fixes: 73504707
Test: robotests
2018-02-28 15:22:09 -08:00
Fan Zhang
04f1423bfa Remove custom updateState() if it's just setting summary
Change-Id: I6311d67d6ba11961a6814b91dcd8e37a2e17df40
Fixes: 73950519
Test: rerun robotests
2018-02-28 15:22:09 -08:00
Maggie
51fc2889f8 Under "recent location requests", add "See all"
Under Settings -> Security & Location -> Location, add "See all" button
under recent location requests

On location settings page, display at most 3 recent location requests.
If there are more than 3, show a "see all" button.
When user clicks "See all", take them to a new fragment with all recent
location requests.

Test: Robo
Test: Manual
Bug: 70350519
Change-Id: Id1f9a8da1593814a8f30f8e6ec8ac75fb10f6672
2018-02-28 12:58:42 -08:00
TreeHugger Robot
14fa2df9f4 Merge "Add summary for Display->Color settings." 2018-02-28 20:52:27 +00:00
TreeHugger Robot
9bd9e464c9 Merge "Force shortcuts to launch as the root of a new task" 2018-02-28 20:27:32 +00:00
TreeHugger Robot
6eb62e4115 Merge "Fix crash when launching about phone v2 through intent" 2018-02-28 19:37:57 +00:00
Doris Ling
be2a265bda Add summary for Display->Color settings.
Change-Id: Ia1332b4e3333099878ee52342c64b3d8595fdd94
Fixes: 73773857
Test: make RunSettingsRoboTests
2018-02-28 11:29:36 -08:00
Fan Zhang
a85dd50842 Force shortcuts to launch as the root of a new task
Otherwise it will try to find a existing task affinity, which can be
stale.

Test: manual
Change-Id: If2982612bf8789e726757e9fda1f70af47274a9e
Fixes: 73710228
2018-02-28 11:12:05 -08:00
Fan Zhang
cfd79a9a7a Fix crash when launching about phone v2 through intent
Change-Id: Ife6c24a7127fc9821760f9f5b58a33437711bc25
Fixes: 73971752
Test: atest
2018-02-28 10:21:32 -08:00
Jan Nordqvist
7bcddb1f3c Merge "Fixed failing launch of Data usage activty from data saver suggestion." 2018-02-28 17:21:16 +00:00
Victor Chang
614de3b79a Merge "Fix not delivering result to fragment using SubSettingLauncher" 2018-02-28 10:59:36 +00:00
Fan Zhang
906572b127 Change PreferenceController#getSummary return type.
Return CharSequence instead of String.

All user visible string should be modeled as CharSequence.

Bug: 73950519
Test: robotest
Change-Id: I30befef0c33f94351d4a2774e283bd1ed804aa8b
2018-02-27 22:30:12 -08:00
TreeHugger Robot
26ea60a231 Merge "Fix search non-indexable update" 2018-02-28 02:09:21 +00:00
TreeHugger Robot
45520fce49 Merge "Remove unused classes and tests." 2018-02-28 00:42:28 +00:00
Fan Zhang
f609cad6f0 Fix search non-indexable update
- When creating preference conotrollers, if one fail, skip that one
  instead of giving up entire operation.
- Fix BatterySaverController by providing a existing looper.

Change-Id: Iefe443b7fa91e51515c5c247fab4d9588867baef
Fixes: 73903739
Test: robotest
2018-02-27 16:15:56 -08:00
Lei Yu
4fc199b538 Merge "Fix the AnomalyCleanUpJobService" 2018-02-28 00:13:37 +00:00
TreeHugger Robot
77dbe4deb8 Merge "Add logging for battery tip" 2018-02-27 23:39:33 +00:00
TreeHugger Robot
78446ca872 Merge "Add metric for BatteryTipDialogFragmnt" 2018-02-27 23:39:33 +00:00
Alan Viverette
a4deb5cf4a Merge "Revert "Update to match now slice APIs"" 2018-02-27 22:08:31 +00:00
Alan Viverette
80c806abd6 Revert "Update to match now slice APIs"
This reverts commit 2d96005aba.

Reason for revert: prebuilt revert

Bug: 73903252
Bug: 73876473
Bug: 73875529
Bug: 73866916
Change-Id: I5d47a7c5ddebc16c1c508f5bb48ace809cbaf273
2018-02-27 22:07:12 +00:00
Jerry Zhang
40bd570352 Remove unused classes and tests.
Old usb pages have been replaced by UsbDetailsFragment
and UsbDefaultFragment. Old connected devices has
been replaced by new connected devices.

Bug: 70848054
Test: Passes
Change-Id: I538cbb88d4f878449a83da9a4a0381e74e840c6a
2018-02-27 13:50:10 -08:00
jackqdyulei
0fa413e314 Fix the AnomalyCleanUpJobService
1. Invoke it in BOOT_COMPLETED
2. Set it periodic
3. Change the anomaly history from 3 days to 30 days

Bug: 72385333
Test: RunSettingsRoboTests
Change-Id: Ib59a85f3dffd6c094ff400a75bec44d4c65bce44
2018-02-27 10:19:33 -08:00
Yueming Wang
3fc11a6db4 Revert "Change Settings to use URL_FILTERED and blocks menu options when DPC Apns are enforced."
This reverts commit ab1f251def.

Reason for revert: As per discussion in b/72484718, we are going to
block Access Point Name entry point in Network&Settings, so we no longer
need the change in ApnSettings fragment itself.
Bug: 72484718

Change-Id: I337a03e8baebaedb9e9ab83ccc4f7cf2f9c562c8
2018-02-27 12:02:54 +00:00
Alex Chau
ef5fd3c81d Merge "Revert "Fix the crash when editing or deleting APN."" 2018-02-27 12:02:19 +00:00
TreeHugger Robot
eae1ce5806 Merge "Remove controller definitions from code" 2018-02-27 03:03:27 +00:00
jackqdyulei
0e06b4e2a1 Add logging for battery tip
When it is triggered, we log the type of battery tip.

Bug: 3662211
Test: RunSettingsRoboTests
Change-Id: Iab1034008796b6b21eee53297b2e574199693f7e
2018-02-26 18:06:16 -08:00
Jan Nordqvist
e2385be5e1 Fixed failing launch of Data usage activty from data saver suggestion.
After introducing the new data usage UI behind a feature flag a bug was
introduced that causes the data saver suggestion to throw an exception
from a missing class reference in "legacy" mode.

Bug: 73648306
Test: manual
Change-Id: I4fcd2bd0f55931f40738266dca94a55fea5087b3
2018-02-26 17:10:45 -08:00
Fan Zhang
7335856213 Remove controller definitions from code
- With recent changes in DashboardFragment, if a controller is
  implemented using BasePreferenceController AND it's defined in xml, it
  should "just work (tm)".

Change-Id: I05ec175e3c3df706df1a59c4bd9c2db3bf7e19d2
Fixes: 73668763
Test: rerun robotest
2018-02-26 17:00:45 -08:00
TreeHugger Robot
247641c4b5 Merge "Search highlight polish" 2018-02-27 00:28:07 +00:00
TreeHugger Robot
d89e9c2e24 Merge "Report High usage even in a short period" 2018-02-26 23:00:22 +00:00
jackqdyulei
333f794b4f Add metric for BatteryTipDialogFragmnt
Bug: 73888115
Test: Build
Change-Id: I234865f31658d3a44df4aa9521b6b2ea0f26f287
2018-02-26 14:54:50 -08:00
Fan Zhang
730ea972d2 Search highlight polish
- Blink when starting highlight
- Extend highlight to 15 seconds
- Fade out when stopping highlight

Bug: 73313161
Test: visual
Change-Id: Ie6c3d640566f2eecc501d4c4f96df512171ff4b6
2018-02-26 14:48:13 -08:00
Zhizhi Liu
4b01eebe8b Merge "Move IconCache to SettingsLib(II)." 2018-02-26 19:22:04 +00:00
Yueming Wang
8558b593dd Revert "Fix the crash when editing or deleting APN."
This reverts commit db9a9bb0b0.

Reason for revert: As per discussion in b/72484718, we are going to
block Access Point Name entry point in Network&Settings, so we no longer
need the change in ApnSettings fragment itself.
Bug: 72484718

Change-Id: Ia84f129b86fe72b3b2dc9699d5893ced7c65e1c3
2018-02-26 19:14:27 +00:00
Victor Chang
61f7288166 Fix not delivering result to fragment using SubSettingLauncher
- Call Fragment.startActivityForResult instead of Activity's one

Test: make RunSettingsRoboTests
Test: App info page is closed instantly after uninstalling the package
Change-Id: If29c097c988101f89dcd9d0a5c1c68deed04eaa9
2018-02-26 15:41:52 +00:00
TreeHugger Robot
ce281e060d Merge "Fix bug causing the Overlay Settings page to be hidden behind overlays." 2018-02-26 13:38:47 +00:00
Peter Visontay
9aeaa197a9 Fix bug causing the Overlay Settings page to be hidden behind overlays.
Test: Manually using an app that displays a full-screen overlay.
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=DrawOverlayDetailsTest
Bug: 72734249

Change-Id: I84b61fea2a793bebfac025ca3a209286ceeef963
2018-02-26 12:04:57 +00:00
TreeHugger Robot
572efd22dd Merge "More renaming in DashboardFragment" 2018-02-24 02:58:32 +00:00
TreeHugger Robot
5a46ea547b Merge "Rename Indexable::getAllPreferenceControllers." 2018-02-24 02:05:25 +00:00
TreeHugger Robot
a0de28d0de Merge "Update the Bluetooth Active Device state in the Device Manager" 2018-02-24 01:07:45 +00:00
Fan Zhang
f7843adabd More renaming in DashboardFragment
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936

Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
2018-02-23 16:56:30 -08:00
Fan Zhang
aed8994f6f Rename Indexable::getAllPreferenceControllers.
To getPreferenceControllers. "all" is redundant. Then internally, the
old getPreferenceControllers() is renamed to
createPreferenceControllers() to emphasize the controllers are created
from code (versus the ones created from xml).

Bug: 73668763
Test: robotest
Change-Id: Ifec46aefdc2a418031c8e152028b30bdcd396fc7
2018-02-23 16:37:28 -08:00
TreeHugger Robot
8e6d5ad27e Merge "Instantiate pref controllers from xml if it's defined." 2018-02-24 00:13:45 +00:00
TreeHugger Robot
158096d25d Merge "Settings: Move DefaultAppInfo CandidateInfo to SettingsLib" 2018-02-23 23:31:47 +00:00
TreeHugger Robot
43a2ac6c7c Merge changes from topic "ww_5_auto_restrict"
* changes:
  Add special check for excessive bg anomaly
  Add auto restriction for excessive background
2018-02-23 22:56:48 +00:00
Fan Zhang
917f101899 Instantiate pref controllers from xml if it's defined.
- If a <preference> tag also defines a controller, we will try to
  instantiate it before displaying the UI. The same logic is shared by
  BaseSearchIndexProvider so it also drives search suppression.

- If user also defines a list of controllers programatically, the
  programatically created ones takes precedence.

Bug: 73668763
Test: WIP
Change-Id: I7aecec270bcd3af261e012ef1f6995d2a523cfa1
2018-02-23 14:08:51 -08:00