Commit Graph

64 Commits

Author SHA1 Message Date
Jason Chiu
2989c50a23 Add highlight menu keys for all toggle pref controllers and custom slices
Bug: 204695404
Test: manual, robotest build pass, unit
Change-Id: Iad2e28ada8ddb766ffa7eff2c8dc581250cbd6f8
2021-11-01 15:00:18 +08:00
Edgar Wang
0934babbfc Make the fragment title can’t searchable
we shouldn't take users so deep into the settings IA because it's easy
to feel lost in settings after clicking on a result without additional
context.

Bug: 143055215
Test: robotest & manual
Change-Id: I337cb5ead31e1e4e7bf9be78132e90630f83ee43
2020-02-06 19:07:11 +08:00
Edgar Wang
e19ee9a01f Revert "Settings search - Navigate user to exact page"
This reverts commit 08f2a58459.

Reason for revert: design changed, we decide to take the user to
the entry after clicking on a search result.
It's opposite with what we did, so we revert related CL first.

Test: robotest

Change-Id: Iadb9a94a7ef7838be34a54499e2d934d6396c336
2020-01-16 14:07:38 +08:00
Edgar Wang
08f2a58459 Settings search - Navigate user to exact page
- remove duplicate index preference
- default set searchable = false when the preference has fragment
- make some fragments indexable

Bug: 143057584
Test: robotest & manual

Change-Id: I4d64f6106d2f92f0a45e8c7e26388677f593f412
2019-12-24 21:04:11 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00
Issei Suzuki
fd85a9fae6 Move AmbientDisplayConfiguration class out of internal package.
Test: m droid (run full build)
Bug: 126327497
Change-Id: Idc07c811864edb4f88151051e25d6e05e4caf3b2
2019-02-27 13:25:15 +01: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
Fan Zhang
7c1233116b Clean up some search nonIndexableKeys.
- Make the entire gesture setting page unsearchable. This is safe
  because each row in gesture setting page lead to a child page, we are
  only removing duplicates.
- Make the pref controller for System -> gesture return
  AVILABLE_UNSEARCHABLE so it's also suppressed.
- Suppres the parent page for adaptive brightness.

Bug: 72748524
Test: manual
Change-Id: Id7317f5f126af88b1bde8d87b8a206d9909df904
2018-06-04 18:50:44 +00:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Mehdi Alizadeh
d18edec417 Adds the Swipe Up settings page under gestures
The illusteration video is not included yet.

Bug: 77549883
Test: Unit tests and Manual test
Change-Id: I7f2b2f3251a795dfd74dbbb442692e42a5a2966e
2018-04-11 05:40:12 +00:00
Julia Reynolds
a660cf1176 Merge "Prevent ringing updates" into pi-dev am: dbffb1812d
am: 8176af9610

Change-Id: I880b80215cfec3897b18200b18bedbb6c899e241
2018-04-10 16:15:11 -07:00
Julia Reynolds
584aba1f2b Prevent ringing updates
- Add video
- Update text
- Link from Sound settings
- Inherit from BasePreferenceController

Test: make -j RunSettingsRoboTests
Change-Id: If8cd9efd4e6034e6f6864a142a86cbc23bf59dc3
Fixes: 76832936
Fixes: 74410634
2018-04-10 17:32:06 -04:00
HJ ChangLiao
3c4c3fc5c7 GesturesSettingPreferenceController to Toggle
Convert GesturesSettingPreferenceController to
TogglePreferenceController,
All of its children need follow the change,
add setter and robotest for them:
AssistGestureSettingsPreferenceController
DoubleTapPowerPreferenceController
DoubleTapScreenPreferenceController
DoubleTwistPreferenceController
PickupGesturePreferenceController
SwipeToNotificationPreferenceController

Change-Id: I792b2d370eea828bf345fb2b1cc3eac260eb66f4
Merged-In: I792b2d370eea828bf345fb2b1cc3eac260eb66f4
Fixes: 74913806
Fixes: 67998110
Fixes: 67998098
Fixes: 67998048
Fixes: 67998069
Fixes: 67997452
Test: make RunSettingsRoboTests
2018-04-09 09:08:41 +00:00
HJ ChangLiao
22f53c0274 GesturesSettingPreferenceController to Toggle
Convert GesturesSettingPreferenceController to
TogglePreferenceController,
All of its children need follow the change,
add setter and robotest for them:
AssistGestureSettingsPreferenceController
DoubleTapPowerPreferenceController
DoubleTapScreenPreferenceController
DoubleTwistPreferenceController
PickupGesturePreferenceController
SwipeToNotificationPreferenceController

Change-Id: I792b2d370eea828bf345fb2b1cc3eac260eb66f4
Fixes: 74913806
Fixes: 67998110
Fixes: 67998098
Fixes: 67998048
Fixes: 67998069
Fixes: 67997452
Test: make RunSettingsRoboTests
2018-04-09 15:27:32 +08: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
Julia Reynolds
15dfbbec06 Add a setting for the volume hush gesture
Bug: 75252670
Test: make -j20 RunSettingsRoboTests
Change-Id: I699aeec54eb516931b6d7c5b3fc864b169015c2f
2018-03-21 15:27:54 -04: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
Kevin Chyn
bd947c7ba9 Clean up AssistGesturePreferenceController
The preference controller shouldn't be shared between the
"Assist Gesture" parent setting, and the child setting within

Fixes: 64318213

Test: manual test of settings && make -j RunSettingsRoboTests
Change-Id: I2d2437e2036881a08977924dc1386aa1fab67070
2017-08-11 00:58:09 +00:00
Doris Ling
204ca74397 Move Gesture settings up one level.
Move System->Languages, input & gestures->Gestures to System->Gestures.

Change-Id: Ie81876208383f69ebf1a0465d76c760d7dd9d95d
Fix: 62276882
Test: make RunSettingsRoboTests
(cherry picked from commit 55ce7de7d0)
2017-07-20 16:46:44 +00:00
Doris Ling
d299b03f28 Remove old code relating to SystemSettings not used in new IA.
- remove activity alias: DevelopmentSettingsDashboardAlias,
DateTimeDashboardAlias, AboutDeviceDashboardAlias,
BackupResetDashboardAlias, EnterprisePrivacyDashboardAlias, and
AccessibilityDashboardAlias and updated the corresponding target
activities with the alias metadata.

- remove InputMethodAndLanguageSettingsActivity and
GestureSettingsActivity and the associated xml.

Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: I7d4922f8dfaac40e8ad077a68008185cd9fe3304
2017-02-28 17:46:24 -08:00
TreeHugger Robot
3e0ae4ed90 Merge "Add settings for the assist gesture." 2017-02-17 02:13:00 +00:00
Philip Quinn
a9831d40d0 Add settings for the assist gesture.
Availability of the gesture is gated by a new FeatureProvider.

Test: make -j RunSettingsRoboTests; manual test on
      supported/unsupported configurations.

Change-Id: I3529367a73e33370d5112b91d5144293ffa7fa22
2017-02-14 16:45:23 -08:00
Matthew Fritze
46173a5265 Remove extra IndexProviders that provided bad data.
Gesture Settings and Wireless settings were indexing
duplicate results that only added complexity to Search.
PowerUsageDetail was never supposed to be indexed.

Bug:33701673
Test: make RunSettingsRoboTests
Change-Id: I45d1fa4bd412c3418acec24f8c98eb4736f220ab
2017-02-15 00:36:25 +00:00
Fan Zhang
7e6df837ee Remove getCategoryKey() from DashboardFragment children.
Use the centralized registry to look up category key instead.

Bug: 32936784
Test: make RunSettingsRoboTests -j40
Change-Id: I0b8c72d70f93e4b5c58871ac90de41f69ad15653
2017-01-24 14:51:15 -08:00
Matthew Fritze
65fb01b520 Add first inline switch result.
Adds gestures as Inline switch results to Settings Search.

Change-Id: Ie9b69ac2a54756d5b756401e348cae0a02c907c9
Fixes: 33669037
Test: make RunSettingsRoboTests
2016-12-21 10:52:59 -08:00
Fan Zhang
33b0d91d74 Add video to each gesture preference screen.
- Refactor GesturePreference to a generic VideoPreference.
- The old video_preference.xml is only for magnification video, so
  renamed.
- And use VideoPreference in gesture setting pages.
- Refactor common logic into GesturePreferenceController.

Bug: 32637613
Test: RunSettingsRoboTests

Change-Id: I58580b01a32873cb32c5dc5bf2ec021d5b1400cc
2016-11-10 15:24:45 -08:00
TreeHugger Robot
2c61018618 Merge "Add more gesture setting pages." 2016-11-09 21:13:02 +00:00
Fan Zhang
b99ea90046 Add more gesture setting pages.
Bug: 32637613
Test: make -j40 RunSettingsRoboTests
Change-Id: I77f90b8b7e3348ed717ee78693860f48e13070f2
2016-11-09 11:31:10 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
5b6478a349 Add swipe to see notification to "Notification preferences"
Bug: 31799948
Test: RunSettingsRoboTests
Change-Id: Ib892ca4d5596c1c89e1efaf636a3eefd7cee371a
2016-10-24 15:33:12 -07:00
Doris Ling
a902a5bd93 Ensure that the gesture animation video is paused properly. am: 4245ad4771 am: 5e4fce04fb
am: 12ffd7aaa7

Change-Id: I5c063fc4c1644a9d7e5360e91c1d79375f92986a
2016-10-21 23:51:21 +00:00
Doris Ling
4245ad4771 Ensure that the gesture animation video is paused properly.
Add the handling to pause the animation video when user navigates away
from the gesture settings.

Test: Manual - play gesture animation videos, then switch to another app
in recents. Verifies from logcat that NuPlayerDriver is not active.
Fix: 32064123

Change-Id: I3d0fb3946e4d0d77a686aa97cfabe667862cac17
2016-10-21 14:28:54 -07:00
Adrian Roos
2bd8835fda Separate ambient display triggers am: 82829ee0b1 am: 5ba2074e31
am: c0dfa153f4

Change-Id: I2eed4a8bfbc8ded0f5d12b3284d8ae5a0cfb1823
2016-10-18 22:27:31 +00:00
Adrian Roos
82829ee0b1 Separate ambient display triggers
Allows configuring notification and sensor triggers
separately. Introduces a helper class that hosts the
logic for determining what kinds of triggers a device
supports.

Bug: 32073185
Change-Id: Ie7e8eb6b895dcc54e6f972e70642c7248b9e223a
Test: disable "ambient display", sensor triggers should still work
2016-10-17 14:05:53 -07:00
Doris Ling
99238ff174 Add static preview images to gesture settings. am: 12e4bebabf am: df7b815980
am: fccee6adae

Change-Id: Ia745f80fa47a7316cb462918f900de001b1ecf03
2016-10-17 20:31:49 +00:00
Doris Ling
df7b815980 Add static preview images to gesture settings.
am: 12e4bebabf

Change-Id: I4f5f16b109c4997b15b93320945bbb3ccab06735
2016-10-17 20:18:30 +00:00
Doris Ling
ec5314f2f5 Merge "Add static preview images to gesture settings." into nyc-mr1-dev 2016-10-17 20:11:31 +00:00
Doris Ling
dc9f6c71be Remove pickup gesture settings if sensor is not found. am: 94e0da52fc am: 79aa718669
am: ef980e4dd1

Change-Id: I6d5ee494b26838f0c508f297a28a18ccc1867422
2016-10-12 00:47:37 +00:00
Doris Ling
12e4bebabf Add static preview images to gesture settings.
Set the animation preview image view to the newly added preview image
instead of loading it from animation video.

Test: manual - launch gesture settings and visually check the animation
preview images.

Bug: 31636637

Change-Id: If25a0e3501bea0c6343326a143d665ec79e3d7c7
2016-10-11 16:44:58 -07:00
Doris Ling
94e0da52fc Remove pickup gesture settings if sensor is not found.
Update gesture settings to check for available pickup sensor before
showing pickup gesture settings.

Test: manual - launch gesture settings on different device and check for
pickup preference. Auto test pending.

Bug: 32072298

Change-Id: Iaab0290dcfeb2b0c9195df685f225d092a658347
2016-10-11 14:23:59 -07:00
Doris Ling
c037ed5bdb Add condition check for double tap gesture settings. am: c8b7555fc9 am: 7f62890cad
am: a5eb66eb01

Change-Id: I0d56e0b1e3b25bd589fcfd4ba2301d51369f217e
2016-10-07 18:15:40 +00:00
Doris Ling
c8b7555fc9 Add condition check for double tap gesture settings.
Only shows the double tap gesture preference if the config is enabled.

Test: manual - launch gesture settings on different devices and check
for double tap preference. Auto test pending.
Bug: 31930457

Change-Id: Id972f60035d0c74f0832395f0229691cd3296d60
2016-10-04 15:31:58 -07:00
Doris Ling
430025c4d6 Split Ambient Display settings. am: 1ad58d0abf am: f89766dbab
am: 0dfe46fe58

Change-Id: I33ffaa71c09cff7a4df496c42371519367e1772c
2016-09-24 00:35:24 +00:00
Doris Ling
1ad58d0abf Split Ambient Display settings.
1. Reverting the changes for Display->Ambient Display; this setting
   will control incoming notification pulse.
2. Added 2 separate entries in gestures settings to control pick up
   and double tap gestures-triggered pulsing for Ambient Display.
3. Added automated tests to verify the preference initializes to the
   correct default value, and also verify that toggling the preference
   updates the corresponding settings correctly.

Test: make SettingsTests

Bug: 30595437
Change-Id: I125bf75fc4ccfea126a00ffae4207fcb789f487a
2016-09-23 15:33:37 -07:00
Doris Ling
d0c7de09f0 Re-enable Ambient Display double tab. am: fec320324c am: 6bc8858379
am: 5d4c701707

Change-Id: I01c2e3a4a207f0338744228171a0cee7ff6bfbab
2016-08-27 00:33:28 +00:00
Doris Ling
fec320324c Re-enable Ambient Display double tab.
Restoring the changes to move Display->Ambient Display to Moves->Quick screen

This reverts commit 9b3000d8ac, except for
the removal of res/raw/gesture_ambient_move_lift.mp4

Test: Manual - Go to Settings->Display->Quick screen check and verify
the preference is restored.

Bug: 30595437
Change-Id: Ie50bcebd119714d49422b7139d0d0234f27584e2
2016-08-26 14:46:03 -07:00
Fan Zhang
e668afed14 Merge "Use isOemUnlockEnabled to drive oem unlocking toggle." into nyc-mr1-dev am: 2c8178db3a am: a9d2aa8dfa
am: 77ba0620ea

Change-Id: I7a557b4ce9923b7d9b3bd2add8c02fdbadfe589d
2016-08-24 16:18:02 +00:00
Doris Ling
008ba4ec40 Fix animation video render issue when Settings->Moves is resumed from
screen off.

Re-initialize the animation video if necessary when the preference is
visible to the user.

Fixes: 31023261

Test: manual -
1. Go to Settings -> Moves and verify that the animation video are
displayed correctly on load.
2. Press power button to turn screen off, then on again. Verify when
Moves settings resumes, the animation video is displayed correctly.
3. Repeat #2 above but let display time out instead of turning off
screen by power button.

Change-Id: I0ee21d23a4c402b3a8463dca3b36fce67d651993
2016-08-23 16:08:34 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00