Commit Graph

21 Commits

Author SHA1 Message Date
Tsung-Mao Fang
0f7b80f47f Set an action name for wallpaer index
Since Android T+, app has to assign an action name for opening a
external app page.

Test: Manual test wallpaper search result and can open.
Fix: 239867167
Change-Id: I4579aaf6e831ff82721c958e6b91ede4cabda2c8
2022-07-26 02:36:13 +00:00
Wesley.CW Wang
ff0e65c7f7 Add intent extra when launching WallpaperPicker from SUW and Settings
- Add extra to these intents to help WallpaperPicker log the launch
 source

Bug: 154781896
Test: make SettingsRoboTests
Change-Id: Ifb0ed22ab8ebfbb3c2ad24e9b7bad80007162b6e
2020-09-23 08:06:52 +00:00
Matthew Mintz
3243920695 Make WallpaperPreferenceController available when only style picker present.
WallpaperPreferenceController prefers the style picker over the basic wallpaper picker. However, the entire setting is disabled when only the style picker is available, even though the basic wallpaper picker is not used. This change corrects that.

Fixes: 162395248
Test: Added unit tests. Also built, flashed and tested setting with all four combinations of CategoryPickerActivity and CustomizationPickerActivity enabled/disabled.
Change-Id: I4184f834ed771359cef13b64aacf2072e592d6d8
2020-07-29 17:39:47 +08:00
Chihhang Chuang
786e814706 Launch WallpaperPicker in a new task[Part2]
Didn't notice com.android.settings.Settings$WallpaperSettingsActivity was also change unexpectedly, we should only add new task for CustomizationPickerActivity only.

Test: Manually
Fixes: 158642941
Change-Id: I9b271d0fbf124d2d38bc52fa99c2c17b0bfc658c
2020-06-16 18:38:04 +08:00
Chihhang Chuang
8bed8d3454 Launch WallpaperPicker in a new task
Wallpaper does not support multi window mode, but launching from
Settings will make it support multi window because the root activity
supports.

Solution: Launch WallpaperPicker in a new task

Test: Manually
Fixes: 158642941
Change-Id: I93a6eaa8c0292e99c54d5278274482075ed007d5
2020-06-16 15:20:59 +08:00
Amin Shaikh
be8345e565 Add theme component options to settings keywords.
Fixes: 135521048
Test: mp settingsg; search for keywords
Change-Id: Ic2c2827fd5b6eff3b8cc11dc5201fc7c4d55778f
2019-07-02 13:33:46 -04:00
Amin Shaikh
87ef55ea90 Add Settings keywords for Styles & Wallpaper.
Reusing existing strings since this is coming in after string freeze.
TODO: create a new keyword string for this preference.

Fixes: 130759285
Test: m RunSettingsRoboTests and searching keywords on device
Change-Id: Ice1bc34b381302745cb55056377cc94ea74e8d50
2019-04-18 13:29:15 -04:00
Amin Shaikh
2a9911e3a0 Show Styles & Wallpaper in Settings
Show "Styles & Wallpaper" in Settings based on whether the ThemePicker
component is availalable. Also update dashboard summary for display.

Bug: 129874298
Test: m RunSettingsRoboTests
Change-Id: Id7e0bb9cbc689bb9e637919a10a7d1006397afab
2019-04-09 13:25:57 -04: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
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.

This causes a lot of trivial code changes.

I also updated the ordering of the imports in all affected files.

Bug: 110953302
Test: Built
      make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
2018-08-30 08:11:39 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Doris Ling
4427cd7e22 Disable Wallpaper setting when Wallpaper is disabled.
Check whether the wallpaper picker is enabled in
WallpaperPreferenceController.isAvailable() instead of always returning
true.

Bug: 63939450
Test: make RunSettingsRoboTests
Change-Id: Ie3a4a68b728ccab1a7aa50c0018a5153907c49b4
2017-07-25 10:38:22 -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
Fan Zhang
9b6f181340 Remove no-op handlePerferenceTreeClick from PrefControllers
Bug: 33429853
Test: RunSettingsRoboTests
Change-Id: I5633953e3d7b07f9006e541b96a24a2a769e2686
2016-12-07 15:34:31 -08:00
Fan Zhang
242da31179 Fix logging spam in DashboardFragment.
When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.

Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
2016-10-25 17:14:47 -07:00
Fan Zhang
db1112a221 Add progressive disclsoure
- Add a ProgressiveDisclosureMixin that contains all logic for collapse
  preference list when it's too long
- Refactored PreferenceController's updateState to take a preference
  instead of PreferenceScreen, because with progressive disclosure the
  preference can either be in screen or the mixin. DashboardFragment is
  responsible finding the preference before passing it to controller.

Bug: 32255863
Test: RunSettingsRoboTests

Change-Id: I6713abd61c954ce12732902e5b3ca4d4c0b1563e
2016-10-18 16:57:11 -07:00
Fan Zhang
66b573ad5a Add display settings dashboard to new IA.
- Added a activity-alias pointing to displaySettings as top level
  setting item.
- Refactored all preference logic in DisplaySettings into
  PreferenceControllers. During fragment onAttach it installs all
  controllers, and during onResume it updates preference state. Each
  controller listens to its own preference change event.

Bug: 31800242
Test: RunSettingsRoboTests
Change-Id: Ibc9bf200c5acce7c4ae9292340822afee27a3a28
2016-10-10 18:26:29 -07:00