Commit Graph

9 Commits

Author SHA1 Message Date
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
HJ ChangLiao
5621641c41 Wake notifications to TogglePreferenceController
Convert Wake for new notifications to TogglePreferenceController
Because Slice controller only support Constructor(context)
Move other parameter to setAmbientDisplayConfiguration

Change-Id: I01042b84217ad9592fece966374140dffaf813e4
Fixes:67997460
Test: make RunSettingsRoboTests -j
2018-03-31 03:13:41 +00:00
Leif Hendrik Wilden
28dee1f086 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: I70a6e76cc8440547746ecc008c32bd06a7de8161
2018-01-24 12:30:39 -08:00
Leif Wilden
cab0ee611d Revert "Migrate to use instrumentation classes from settingslib."
This reverts commit 1546cca529.

Reason for revert: Broke fingerprint setup flow. b/72267201

Change-Id: I8321265ae64732c526325882ddea51080decddf5
2018-01-22 20:57:36 +00:00
Leif Hendrik Wilden
1546cca529 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: Ie5515bb0fe3e621fc7723a9b04ba23e4bfa9c401
2018-01-18 11:13:24 -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
e8e65a367b Add ambient notifications as inline setting.
Bug: 62022517
Test: robotest and manual
Change-Id: If245f541ec3c8a1627d082b97bba9b325438cfeb
2017-07-26 20:19:19 +00: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