Commit Graph

29 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
391217977f Update the summary of AoD when Bedtime mode is on
Since Bedtime mode can suppress AoD, after reviewed by UX, we decide
update the summary to "Unavailable because Bedtime mode is on" when AoD
is suppressed by Bedtime mode.

Bug: 168790245
Test: manual & robotest
Change-Id: Id2511cb0ad93b44f6bf701a707b7ddef9438653d
2020-11-12 21:47:15 +08:00
Yi-Ling Chuang
31719321af Make some display related slices public.
Only PreferenceControllers with isPublicSlice() set to true are exposed
to other apps. Others will be Settings only.

Bug: 141088937
Test: robotests
Change-Id: I2a36da4ac4bb14a4d2ac7b89ab2bb3ebf8e655f7
2019-11-28 14:29:33 +08:00
Edgar Wang
0f8c7a71d0 Handle Aware sensor status for Always On
- "Always On" preference will be hiden when aware
sensor is available
- Extract NavModeCandidateInfo from SystemNavigationGestureSettings

Bug: 136610131
Test: robotest & manual
Change-Id: If58c70549339b66116f19df7193d85bb04e3f1b7
2019-09-21 07:19:35 +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
b80aee943c Fix NPE when querying AmbientDisply through ExternalSeting
Bug: 110403709
Test: manual
Change-Id: Iee9994061c2b5c4bdd7aefe2d25a73e8ed4c9db0
2018-07-03 13:16:48 -07:00
Fan Zhang
7431c91de6 Remove search indexing pipeline from Settings
Index is already handled by SettingsIntelligenec. No longer needed in
Settings.

Change-Id: Id43fb3100dc2759185744441cff8cb9cd2d2da20
Fixes: 69808376
Test: robotests
2018-06-21 09:38:36 -07:00
Matthew Fritze
bf1f5b5813 Add isSliceable API to BasePrefController
Only support explicitly approved Settings Slices,
dictated by controllers which return true for the new
method isSliceable.

Updating the supported settings to a whitelist means that
the method to return all available slices must be updated,
and checking slicability when we index slices.

Test: robotests
Bug: 79779103
Change-Id: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
2018-05-22 11:06:42 -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
Matthew Fritze
f87a1f3f41 Establish permanently unavailable settings
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
2018-05-09 08:36:59 -07: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
Matthew Fritze
3cd543fb85 Fix crash in non-indexable keys collection
Some of the AmbientDisplay preference controllers were
crashing when their isAvailable methods were being called
by their fragment's search index providers, which meant that
the entire collection of non-indexable keys failed. Thus,
all search results were showing up. In the case of a secondary
user, they were able to see developer options which crashed
settings when clicked.

There are two issues addressed in this cl.
1. Fix the crashes so the non-indexable keys collection works
2. Contain each fragment's collection, so that if a fragment does
crash, the damage is minimized.

Part 1 is checking that the config in isAvailable is not null,
and creating one if so.

Part 2 is fixed by surrounding the collection of non-indexable
keys in a try-catch, with an option in the catch to re-throw the
error if a system property is set. Thus, in a new pre-submit
instrumentation test, we can and docheck if any of the fragments crash
when collecting non-indexable keys.

Change-Id: I820bd9cb2649aa6faff7f82fcf575a62e41dc4fc
Fixes: 77486668
Test: atest NonIndexableCrashTest, robotests
2018-04-04 13:36:33 -07:00
Dieter Hsu
beb89c3545 Support AOD in the Universal Settings API
Bug: 67997452
Test: make -j RunSettingsRoboTests
Change-Id: I609ac74f70bf040bd9033f421b4bb7c02bf33440
2018-03-30 13:20:56 +08:00
Fan Zhang
f75edca09f Revert "Support AOD in the Universal Settings API"
This reverts commit 537c2cfc2c.

Fixes: 77278897

Change-Id: I7a5ff34bf79b87f6a7be50c2e8f421bfc4a22195
2018-03-29 20:20:31 +00:00
Dieter Hsu
537c2cfc2c Support AOD in the Universal Settings API
Bug: 67997452
Test: make -j RunSettingsRoboTests
Change-Id: I161bc5746573444b284a03de8f5d4d8e510153dc
2018-03-28 02:12:16 +00:00
jeffreyhuang
f279ba3f72 Update AmbientDisplayAlwaysOnPrefTest to sdk 26
Test: make RunSettingsRoboTests -j40
Change-Id: Ifdd4db51e87fd38defef23946811b5e24e6c7cfe
2017-11-28 13:41:02 -08:00
Fan Zhang
25f29bf126 Only allow Settings app launch search result page
Bug: 68199963
Test: robotest
Change-Id: I0018e9c60b0dd46fc2420a563a93b706bf252dc4
2017-10-24 16:27:47 -07:00
Andrew Sapperstein
6eafaf46aa Merge "Refactoring for AmbientAlwaysOnPreferenceController" into oc-dr1-dev
am: 64b15c4a7b

Change-Id: Ic1bd3074c086723c231c05fe2706f6ccc30c4cdd
2017-08-09 13:06:33 +00:00
Andrew Sapperstein
5be6c30012 Refactoring for AmbientAlwaysOnPreferenceController
Makes a few methods static so we can call them from other locations.

Bug: 64256644
Test: robotests
Change-Id: Ie97cda342c3143a21bd273e4d29f64f75e006059
2017-08-08 13:58:18 -07:00
Geoffrey Pitsch
cf83f9dd12 Merge "AOD setting availability depends on other user settings" into oc-dr1-dev
am: 6d62355313

Change-Id: If6f49df149ebaf960f40336556e5e9c199c23ef2
2017-08-01 14:08:10 +00:00
Geoffrey Pitsch
f3fc635947 AOD setting availability depends on other user settings
Bug: 62918778
Test: make
ROBOTEST_FILTER=AmbientDisplayAlwaysOnPreferenceControllerTest
RunSettingsRoboTests -j
Change-Id: Id6f1ad580cf5caace82a1bfa85e85b98f134f9d6
2017-07-31 13:56:41 -04:00
Matthew Fritze
73056522b3 Add default value to inline payloads
If we try to set an inline result when it has not yet been
accessed in settings, nothing is read from Settings.
Thus, include a default value for a fallback.

Change-Id: I8a593d9ff3308b2d0cd5bc65658d160abf55b07e
Fixes: 63955012
Test: robotests
2017-07-25 14:37:05 -07:00
Matthew Fritze
458bb887e1 Add default value to inline payloads
If we try to set an inline result when it has not yet been
accessed in settings, nothing is read from Settings.
Thus, include a default value for a fallback.

Manual merge for: ag/2588219/

Change-Id: I3b8eea4f82764852cea642db4455ba57f10a7d37
Fixes: 63955012
Test: robotests
2017-07-25 10:44:15 -07:00
Andrew Sapperstein
36af00bb21 Add ResultPayload for always-on ambient display.
Bug: 62022517
Test: robotest
Change-Id: Ib4ee4d8d999e5a1f9edf34ea6068644b41fc4838
2017-07-23 06:11:22 +00:00
Andrew Sapperstein
eb1a45b95b Add ResultPayload for always-on ambient display.
Bug: 62022517
Test: robotest
Change-Id: Ib6382030ffa0c159ab6ca4b45dd966ee9287181f
Merged-In: Ib4ee4d8d999e5a1f9edf34ea6068644b41fc4838
2017-07-22 20:57:07 -07:00
Geoffrey Pitsch
8d973761ad Disable lift-to-wake when always-on is checked
The setting has little to no meaning when AOD is on.

Test: make
ROBOTEST_FILTER=AmbientDisplayAlwaysOnPreferenceControllerTest
RunSettingsRoboTests -j
Bug:62391405
Change-Id:If5492227755ca81ec0bcf921a81e2bfd33a85b9c
2017-07-12 13:42:34 -04:00
Geoffrey Pitsch
57adc290d2 Disable lift-to-wake when always-on is checked
The setting has little to no meaning when AOD is on.

Test: make
ROBOTEST_FILTER=AmbientDisplayAlwaysOnPreferenceControllerTest
RunSettingsRoboTests -j
Bug:62391405
Change-Id:If5492227755ca81ec0bcf921a81e2bfd33a85b9c
2017-07-11 14:05:03 -04: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
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