Settings: Hide Flashlight
* Class comment states: "Headless activity that toggles flashlight state when launched." * Comment in constructor states: "The sole purpose of this activity is to provide a place to index flashlight into Settings search." * Since it does only the second thing successfully and we do neither know why we need a useless search result nor does it serve any purpose, hide it from search results * We could remove the whole class, but since it's from AOSP I decided to keep the change footprint minimal Test: Type "Flashlight" into settings search - result does not appear anymore Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/6397 Change-Id: I53541c700e24efd33d386c38a4ea38fb1b8b81d6
This commit is contained in:
parent
ed17d8d92b
commit
26c986650e
1 changed files with 1 additions and 4 deletions
|
|
@ -87,10 +87,7 @@ public class FlashlightHandleActivity extends Activity implements Indexable {
|
|||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
if (!FlashlightSlice.isFlashlightAvailable(context)) {
|
||||
Log.i(TAG, "Flashlight is unavailable");
|
||||
keys.add(DATA_KEY);
|
||||
}
|
||||
keys.add(DATA_KEY);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue