Commit Graph

157 Commits

Author SHA1 Message Date
Salvador Martinez
ef7ce46657 Change dark theme screen to toggle
The dark theme screen has been removed in favor of a simple
toggle with a dialog that shows up the first time a user
tries to enable dark theme when in light theme.

Test: robotests pass
Bug: 130251804
Change-Id: I48f8e24a2b2a117e5a8054c5bc0b240ba68fe1ad
2019-04-15 19:52:49 -07:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
jackqdyulei
cf6374e427 Build infra to inject slice to PreferenceFragment
Reuse the PreferenceController and LayoutPreference however create
specific one for slice:
1. SlicePreference: container to inject slice view
2. SlicePreferenceController: handle updates for slice

Also add styles for it with default layout.

Bug: 120803703
Test: RunSettingsRoboTests

Change-Id: I6ab083ad57117e6198dcba37702a25213da78719
2018-12-18 14:38:25 -08:00
Fan Zhang
0023558ec3 Fix Display settings summary when there is no wallpaper.
Change-Id: I715cef9dc42de1231491b5a7184f0f151d94af11
Fixes: 69905032
Test: robotests
2018-10-30 10:10:30 -07:00
Fan Zhang
9ce4a1fcde Use searchable="false" to suppress nonIndexables.
When possible, remove or simplify getNonIndexable() logic in fragments,
and use searchable="false" in xml to suppress index.

Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69
Fixes: 112608186
Test: robotest and manual search
2018-08-17 09:21:05 -07:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
Fan Zhang
78ea7da54c Misc tweaks to Indexable usage and tests.
- Make SettingsPreferenceFragment implement Indexable directly
- Add existing fragments that are SettingsPrefFragment but not Indexable
  to grandfather list.
- Fix "font size" fragment so it shows up in search properly.
- Remove duplicates for "lock screen display", "Screen saver".

Bug: 70720645
Test: robotests
Change-Id: I44ce0cac0fdf5e882b315861bb4bebc45dbe01e6
2018-07-02 16:46:23 -07:00
Fan Zhang
7f5692bdea Misc search clean up
- Make color mode page searchable and suppress its parent page.
- Suppress entire DataUsageSummaryLegacy page in search. This page will
  be deleted soon

Change-Id: I0f98c9073358934b98e986d034c89a9bf87e58ad
Fixes: 70720645
Test: robotests
2018-06-08 14:51:19 -07:00
Fan Zhang
30d4d015b5 Merge Ambient display into Lockscreen settings.
And remove the entry point from security page. Now we only have 1 entry
point from Display page.

Change-Id: I06bc15a6fd8802a4918d8772af2722d5aafa332e
Fixes: 71892510
Test: robotests
2018-05-16 11:24:32 -07:00
Fan Zhang
89f668ce29 Convert auto-brightness switch to a full screen UI.
Change-Id: Id5e5ec959201102a7c60372a441dc6813ceedbae
Bug: 69795935
Test: Existing conformance tests still pass (CodeInspectionTest,
      UniquePreferenceTest, manual search test)
2018-04-10 21:25:09 +00:00
Tony Mantler
0fcd6cbaa8 Autogenerate SearchIndexableResources subclass
Bug: 77148954
Test: RunSettingsLibRoboTests RunSettingsRoboTests RunSettingsGoogleRoboTests RunArcSettingsRoboTests
Change-Id: I842c42c55014c3310070ef22bd4f0d9a70dfd804
2018-04-03 10:26:55 -07:00
LexHuang
78df73f00a Support Screen Rotate in the Universal Settings API
Change extend from AbstractPreferenceController to TogglePreferenceControllear

Bug: 67997439
Test: make RunSettingsRoboTests
Change-Id: I86e59d00384fb131f2f2b92186e8536324db2e1b
2018-03-30 02:32:36 +00:00
Fan Zhang
fc1590e901 Make FontSizePreferenceController slice compatible.
Bug: 67997826
Test: robotests
Change-Id: Iea1cff48f39e1433abea285309376876e8356c07
2018-03-29 12:33:13 -07:00
Matthew Fritze
5c5a921efb Add keywords for search terms
A large update for search keywords collected from logging
and individual feedback.

At the moment, we don't have a great way to test that a keyword
matches to a search result. It's a bit akin to testing that the
wifi title is Wifi.

Fixes: 36983488
Fixes: 36622889
Fixes: 76115241
Test: Manual audit of keywords surfacing the proper results.
Change-Id: Ia1031b7f6ec1edfcc28c07e6b55049b8dac7c685
2018-03-23 09:41:47 -07:00
TreeHugger Robot
eae1ce5806 Merge "Remove controller definitions from code" 2018-02-27 03:03:27 +00: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
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
Matthew Fritze
c448863577 Index Nightdisplay Settings into search
Adds a SearchIndexProvider into NightDisplaySettings
to index night_display_settings.xml. It will show
up in search as long as ColorDisplayController
is available.

Also, supress the search result for Night Display
under Display settings in favor of the actual toggle.

Test: robotests
Fixes: 69852201

Change-Id: Id014a5ab03e7a6b5fc99f79a1cb41a0c06323f9c
2017-11-30 08:56:20 -08:00
Fan Zhang
e0b0e9f902 Refactor help menu stuff into a controller
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.

Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
2017-11-29 15:51:04 -08:00
Yoshinori Hirano
53cfd11793 Display network name in status bar
When config_showOperatorNameInStatusBar is true, "Network name" setting
is displayed in Settings app (Settings > Display).
The user can turn on/off the feature to display the network name in the
status bar from Settings app.

Fixes: 67620513
Test: manual - go to Settings > Display and turn on/off Network name.

Change-Id: I43f1d9cbea363527250639ce6146f1c5c6c8a482
2017-10-31 09:08:06 -07:00
TreeHugger Robot
11151f5052 Merge "Eliminate duplicate keys in pref xmls." 2017-10-28 19:39:28 +00:00
Fan Zhang
57ef92a810 Eliminate duplicate keys in pref xmls.
- Remove additional_system_update pref device_info page, we don't need
  it.
- Update keys in xml and Preference controller, and search index
  provider.
- Clean up in ScreenZoomPreference, it's anti-pattern to set fragment in
  constructor.
- Whitelist 2 that are super hard to remove.

Change-Id: Ibab6e2cb074513042a2ae007d9085aa64046eec8
Fixes: 67852637
Test: uniquePreferenceTest
2017-10-28 11:06:37 -07:00
Doris Ling
8b14a1a7a6 Change to use the expand button in support lib.
- functionality for hiding portions of the preferences in the preference
screen is added to the support lib. So, changing the settings
implementation to use the feature from the support lib instead.
- remove ProgressiveDisclosureMixin and the related code

Fixes: 63985174
Test: make RunSettingsRoboTests
Change-Id: Ib1d39b2db93d78a56c7adf90abcae5226f9564c2
2017-10-27 13:16:38 -07:00
Doris Ling
6f60cddc9e Add a new feature flag for the expand button in support lib.
- check the feature flag to determine whether to use the existing
progressive disclosure mixin or use the expand button in the support
library.
- add corresponding preference xml files that add the new preference
group attribute to use with the expand button in the support lib.

Bug: 63985174
Test: make RunSettingsRoboTests
Change-Id: Ida6eb6182a8066ad1413b7f6142512345fd914d0
2017-09-15 11:56:31 -07:00
Andrew Sapperstein
fedae393ef Duplicate ambient display setting in battery settings.
Also fixed a bug where ambient display was duplicated
in search results.

Change-Id: Iacdb53c70e90f8240da1ed9acec7e382ed1df5de
Fixes: 62298578
Test: robotests
2017-07-07 13:07:54 -07:00
Andrew Sapperstein
cc7adfd9e0 Merge "Reduce number of wallpaper results in search." into oc-dr1-dev am: 63c63ff640
am: 301dfdd8d1

Change-Id: Iab4d5c24b9ac7cee39af3bcc14631fa09bb455c5
2017-06-29 04:52:32 +00:00
Andrew Sapperstein
ebaab6aabd Reduce number of wallpaper results in search.
Previously we indexed the intent in display settings and every
app that handled ACTION_SET_WALLPAPER. Now, we only index an
app that handles ACTION_SET_WALLPAPER and is the listed package in
config_wallpaper_picker_package.

Change-Id: Ife81702017e3e8be4a754873d9c453fddf1cbd9e
Fixes: 62793068
Test: manual, search wallpaper and observe results
2017-06-28 17:16:57 -07:00
Tony Mantler
1d583e125f Make PreferenceController a mixin
Bug: 62912136
Test: Existing tests in BaseSearchIndexProviderTest
Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-26 10:58:36 -07:00
Romain Guy
305f900bfa Add saturation boost setting
Bug: 62238038 62377592 38225028
Test: make RunSettingsRoboTests -j40 ROBOTEST_FILTER=com.android.settings.display.ColorModePreferenceControllerTest
Change-Id: Iae8f4b25966ff28fde127e6103b2c03c67862cf0
2017-06-06 17:58:24 -07:00
Adrian Roos
e349ec30d8 AOD: Ambient display settings to dedicated settings screen
Bug: 33279975
Test: make RunSettingsRoboTests
Change-Id: I5f3ddf3b3abfc989907293b4a47b78568c01cf9b
2017-05-30 16:42:37 -07:00
Matthew Fritze
742467ec9f Remove Language and Input duplicates
Change the keys in the Language and Input screen for the
gesture and tts-output settings so they can be disabled
in search. Then change the preference controllers to take
a key as input to avoid crashes on the other screens with
these settings.

Merge for: ag/2098173/

Test: make RunSettingsRoboTests
Bug: 33701673
Change-Id: I8bc0776131fcac5a6edf7e8271bc53252c2fc719
2017-05-18 13:57:54 -07:00
Juan Lang
a5f0a82f8f Merge changes from topic 'footer-settingslib'
* changes:
  Depend on SettingsLib's version of lifecycle and FooterMixin.
  Add a factory method to create a Lifecycle.
2017-05-12 20:24:05 +00:00
Juan Lang
777ed2535a Depend on SettingsLib's version of lifecycle and FooterMixin.
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.

Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
     && make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
2017-05-12 11:10:46 -07:00
Adrian Roos
95ff1f4131 AOD: Add temporary always-on setting
Adds a setting for controlling always-on ambient display
until the new ambient display settings screen is implemented.

Also updates DozePreferenceController to use the the
AmbientDisplayConfiguration helper instead of recreating that
logic.

Also adds tests for both doze preference controllers.

Bug: 33279975
Test: Toggle "Settings > Display > Always on", verify ambient display is on / off
Test: make RunSettingsRoboTests
Change-Id: If36356bc29329a4e0732e79db662ffb02c9fc189
2017-05-11 17:15:20 -07:00
Fan Zhang
670410c04e Use a SwitchPreference for auto-rotate instead
- Change the UI to SwitchPreference
- Remove old string used by DropDownPreference
- Attach listener to monitor setting change

Change-Id: If42cceb74296814311eb0eff8e26b4a48a1c4d29
Fix: 35959797
Test: robotests
2017-05-06 10:42:37 -07:00
Matthew Fritze
49915a64c5 Remove accessibility duplicates in settings search
Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: Iae179b558065d728c14eb76f136d398081577779
2017-05-02 17:39:24 +00:00
Doris Ling
2e4ff90f5a Listen to brigtness updates to update brightness summary.
- add content observer for brightness relates changes, and update the
brightness preference summary when changes occur.
- also check for VR mode and auto brightness mode when reading the
current brightness value.

Change-Id: I611ec77174ab45315ccbee2952bdbc2c9a9cd954
Fix: 37227609
Test: make RunSettingsRoboTests
2017-04-27 10:52:31 -07:00
Doris Ling
3248492fd7 Merge "DO NOT MERGE: Revert "Add summary text to Display->Brightness level."" into oc-dev am: 024bc8706d
am: 387b8c0f8e

Change-Id: I6f38e2100fbbfa30df6e3719cb66062573e54556
2017-04-27 03:31:07 +00:00
TreeHugger Robot
024bc8706d Merge "DO NOT MERGE: Revert "Add summary text to Display->Brightness level."" into oc-dev 2017-04-27 03:22:21 +00:00
Doris Ling
cf4a185aeb DO NOT MERGE: Revert "Add summary text to Display->Brightness level."
This reverts commit 03ee253701.

The change does not work properly and is causing confusion.

Bug: 36650108

Change-Id: I00acced742b20e215c869ed58eb8750c654f5742
2017-04-26 21:33:16 +00:00
TreeHugger Robot
1c7e25d3b6 Merge "Remove duplicates between battery and display settings" into oc-dev 2017-04-22 00:56:09 +00:00
TreeHugger Robot
4d33effa55 Merge "Revert "Listen to brigtness updates to update brightness summary."" 2017-04-21 22:07:14 +00:00
Matthew Fritze
4897eccd5d Revert "Listen to brigtness updates to update brightness summary."
This reverts commit 83e2741bd7.

Change-Id: I93e2cf00ac5ffce7bd4e5951dcbe19c4189ffafd
2017-04-21 20:17:58 +00:00
Matthew Fritze
3266e3d712 Remove duplicates between battery and display settings
Change preference keys of duplicate settings between
display and battery to avoid duplication in search.

Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: Iaad52f16ce33c478c64bcec656cc8edbe0c97283
Merged-In: I56c82e9e7f163d345065ca478849de9b14c173fe
2017-04-20 11:11:20 -07:00
TreeHugger Robot
8968e61b95 Merge "Remove duplicates between battery and display settings" 2017-04-19 23:05:03 +00:00
Matthew Fritze
c6f2638009 Remove duplicates between battery and display settings
Change preference keys of duplicate settings between
display and battery to avoid duplication in search.

Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: I56c82e9e7f163d345065ca478849de9b14c173fe
2017-04-19 14:34:13 -07:00
Matthew Fritze
0811fd544b Revert "Listen to brigtness updates to update brightness summary."
This reverts commit 4b95879634.

Change-Id: I13de29b0e42a09f6b3618826d7eb2a9ed00a54d8
Merged-In: I09fd9c843a4d32a131b87cd638785af552f81507
2017-04-19 20:35:36 +00:00
Doris Ling
4b95879634 Listen to brigtness updates to update brightness summary.
- add content observer for brightness relates changes, and update the
brightness preference summary when changes occur.
- also check for VR mode and auto brightness mode when reading the
current brightness value.

Merged-In: I895d251e1dc12cb114ef00328eb8aa0075d77ab1
Change-Id: Ice549ffd708c2dad311a87b6a92bf1c8db426456
Fix: 37227609
Test: make RunSettingsRoboTests
2017-04-18 20:01:16 +00:00
Doris Ling
83e2741bd7 Listen to brigtness updates to update brightness summary.
- add content observer for brightness relates changes, and update the
brightness preference summary when changes occur.
- also check for VR mode and auto brightness mode when reading the
current brightness value.

Bug: 37227609
Test: make RunSettingsRoboTests
Change-Id: I895d251e1dc12cb114ef00328eb8aa0075d77ab1
2017-04-18 11:05:16 -07:00