Files
app_Settings/tests/robotests/res/xml-mcc999/display_settings.xml
Matthew Fritze 80e54df833 Move the indexing back into DatabaseIndexingManager
For the sake of incremental updates, we moved all of the
conversion from PreIndexData to IndexData, and the
insertion of the rows into the SQLite DB into a new class,
IndexDataConverter. However, it's real role is just to
convert PreIndexData into IndexData.

So this CL moves the insertion of the rows back into
DatabaseIndexingManager.

Again, for the sake of simplicity, I did not change the
conversion flow. Rather, instead of inserting a row at the
end of the conversion, I just put it into a list which is
then returned. This lets me move the tests to appropriate
locations, without having to change them too much.

In the tests, the references to real xml layouts are
changed to fake references. Hooray for being less brittle.
IndexDataConverter now just tests that the IndexData
has the appropriate data from PreIndexdData.

Independently, we test that IndexData gets inserted in
DatabaseIndexingManager.

In the next CL, I'll refactor the conversion
flow for readability.

Bug: 33577327
Test: make RunSettingsRoboTests
Test: Took a database dump before and after change,
      and they were the same. Cool.

Change-Id: I39cc812d1f736e13a0a51af50984c239961ecf7a
2017-09-25 16:48:22 -07:00

61 lines
2.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
WARNING: This resource file is used to test Settings Search indexing.
If you change something in here, please run the settings robotests and
make sure they still pass.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:title="page_title"
settings:keywords="keywords">
<Preference
android:key="pref_key_1"
android:title="pref_title_1"
android:summary="summary_1"
settings:keywords="keywords1, keywords2, keywords3" />
<SwitchPreference
android:key="pref_key_2"
android:title="pref_title_2"
android:summary="summary_2"
settings:keywords="keywords1, keywords2, keywords3" />
<Preference
android:key="pref_key_3"
android:title="pref_title_3"
android:summary="summary_3"
android:icon="@drawable/ic_android"
settings:keywords="keywords1, keywords2, keywords3" />
<ListPreference
android:key="pref_key_4"
android:title="pref_title_4"
android:summary="summary_4"
settings:keywords="keywords1, keywords2, keywords3" />
<CheckBoxPreference
android:key="pref_key_5"
android:title="pref_title_5"
android:summaryOn="summary_on"
android:summaryOff="summary_off"
settings:keywords="keywords1, keywords2, keywords3" />
</PreferenceScreen>