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
This commit is contained in:
@@ -58,9 +58,9 @@ import com.android.settings.SettingsRobolectricTestRunner;
|
||||
import com.android.settings.TestConfig;
|
||||
import com.android.settings.accessibility.AccessibilitySettings;
|
||||
import com.android.settings.inputmethod.AvailableVirtualKeyboardFragment;
|
||||
import com.android.settings.inputmethod.InputMethodAndLanguageSettings;
|
||||
import com.android.settings.inputmethod.PhysicalKeyboardFragment;
|
||||
import com.android.settings.inputmethod.VirtualKeyboardFragment;
|
||||
import com.android.settings.language.LanguageAndInputSettings;
|
||||
import com.android.settings.print.PrintSettingsFragment;
|
||||
import com.android.settings.testutils.shadow.ShadowActivityWithLoadManager;
|
||||
import com.android.settings.testutils.shadow.ShadowContextImplWithRegisterReceiver;
|
||||
@@ -417,7 +417,7 @@ public class DynamicIndexableContentMonitorTest {
|
||||
final ContentObserver observer = extractContentObserver(UserDictionary.Words.CONTENT_URI);
|
||||
assertThat(observer).isNotNull();
|
||||
|
||||
verifyRebuildIndexing(InputMethodAndLanguageSettings.class);
|
||||
verifyRebuildIndexing(LanguageAndInputSettings.class);
|
||||
|
||||
/*
|
||||
* When user dictionary content is changed, rebuild indexing happens.
|
||||
@@ -426,7 +426,7 @@ public class DynamicIndexableContentMonitorTest {
|
||||
|
||||
observer.onChange(false /* selfChange */, UserDictionary.Words.CONTENT_URI);
|
||||
|
||||
verifyRebuildIndexing(InputMethodAndLanguageSettings.class);
|
||||
verifyRebuildIndexing(LanguageAndInputSettings.class);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -56,40 +56,40 @@ public class XmlParserUtilTest {
|
||||
|
||||
@Test
|
||||
public void testDataTitleValid_ReturnsPreferenceTitle() {
|
||||
XmlResourceParser parser = getChildByType(R.xml.gesture_settings,
|
||||
"com.android.settings.gestures.GesturePreference");
|
||||
XmlResourceParser parser = getChildByType(R.xml.ia_display_settings,
|
||||
"com.android.settings.TimeoutListPreference");
|
||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||
String title = XmlParserUtils.getDataTitle(mContext, attrs);
|
||||
String expTitle = mContext.getString(R.string.assist_gesture_title);
|
||||
String expTitle = mContext.getString(R.string.screen_timeout);
|
||||
assertThat(title).isEqualTo(expTitle);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDataKeywordsValid_ReturnsPreferenceKeywords() {
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.ia_display_settings);
|
||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||
String keywords = XmlParserUtils.getDataKeywords(mContext, attrs);
|
||||
String expKeywords = mContext.getString(R.string.keywords_gesture);
|
||||
String expKeywords = mContext.getString(R.string.keywords_display);
|
||||
assertThat(keywords).isEqualTo(expKeywords);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDataKeyValid_ReturnsPreferenceKey() {
|
||||
XmlResourceParser parser = getChildByType(R.xml.gesture_settings,
|
||||
"com.android.settings.gestures.GesturePreference");
|
||||
XmlResourceParser parser = getChildByType(R.xml.ia_display_settings,
|
||||
"com.android.settings.TimeoutListPreference");
|
||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||
String key = XmlParserUtils.getDataKey(mContext, attrs);
|
||||
String expKey = "gesture_assist";
|
||||
String expKey = "screen_timeout";
|
||||
assertThat(key).isEqualTo(expKey);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDataSummaryValid_ReturnsPreferenceSummary() {
|
||||
XmlResourceParser parser = getChildByType(R.xml.gesture_settings,
|
||||
"com.android.settings.gestures.GesturePreference");
|
||||
XmlResourceParser parser = getChildByType(R.xml.ia_display_settings,
|
||||
"com.android.settings.TimeoutListPreference");
|
||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||
String summary = XmlParserUtils.getDataSummary(mContext, attrs);
|
||||
String expSummary = mContext.getString(R.string.assist_gesture_summary);
|
||||
String expSummary = mContext.getString(R.string.screen_timeout_summary);
|
||||
assertThat(summary).isEqualTo(expSummary);
|
||||
|
||||
}
|
||||
@@ -128,7 +128,7 @@ public class XmlParserUtilTest {
|
||||
|
||||
@Test
|
||||
public void testDataKeyInvalid_ReturnsNull() {
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.ia_display_settings);
|
||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||
String key = XmlParserUtils.getDataKey(mContext, attrs);
|
||||
assertThat(key).isNull();
|
||||
@@ -136,7 +136,7 @@ public class XmlParserUtilTest {
|
||||
|
||||
@Test
|
||||
public void testDataSummaryInvalid_ReturnsNull() {
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.ia_display_settings);
|
||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||
String summary = XmlParserUtils.getDataSummary(mContext, attrs);
|
||||
assertThat(summary).isNull();
|
||||
@@ -144,7 +144,7 @@ public class XmlParserUtilTest {
|
||||
|
||||
@Test
|
||||
public void testDataSummaryOffInvalid_ReturnsNull() {
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.ia_display_settings);
|
||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||
String summaryOff = XmlParserUtils.getDataSummaryOff(mContext, attrs);
|
||||
assertThat(summaryOff).isNull();
|
||||
@@ -152,7 +152,7 @@ public class XmlParserUtilTest {
|
||||
|
||||
@Test
|
||||
public void testDataEntriesInvalid_ReturnsNull() {
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.gesture_settings);
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.ia_display_settings);
|
||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||
String entries = XmlParserUtils.getDataEntries(mContext, attrs);
|
||||
assertThat(entries).isNull();
|
||||
|
@@ -29,7 +29,7 @@ import com.android.settings.SettingsRobolectricTestRunner;
|
||||
import com.android.settings.SubSettings;
|
||||
import com.android.settings.TestConfig;
|
||||
import com.android.settings.dashboard.SiteMapManager;
|
||||
import com.android.settings.gestures.GestureSettings;
|
||||
import com.android.settings.gestures.SwipeToNotificationSettings;
|
||||
import com.android.settings.search2.ResultPayload.PayloadType;
|
||||
|
||||
import org.junit.Before;
|
||||
@@ -155,7 +155,7 @@ public class CursorToSearchResultConverterTest {
|
||||
TITLES[0], // Title
|
||||
SUMMARY, // Summary on
|
||||
SUMMARY, // summary off
|
||||
GestureSettings.class.getName(),
|
||||
SwipeToNotificationSettings.class.getName(),
|
||||
BLANK, // screen title
|
||||
null, // icon
|
||||
BLANK, // action
|
||||
@@ -226,7 +226,7 @@ public class CursorToSearchResultConverterTest {
|
||||
TITLES[0], // Title
|
||||
SUMMARY, // Summary on
|
||||
SUMMARY, // summary off
|
||||
GestureSettings.class.getName(),
|
||||
SwipeToNotificationSettings.class.getName(),
|
||||
BLANK, // screen title
|
||||
null, // icon
|
||||
BLANK, // action
|
||||
|
@@ -205,25 +205,25 @@ public class DatabaseIndexingManagerTest {
|
||||
|
||||
@Test
|
||||
public void testAddResource_RowsInserted() {
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.ia_display_settings);
|
||||
mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
|
||||
new HashMap<>());
|
||||
Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index", null);
|
||||
assertThat(cursor.getCount()).isEqualTo(7);
|
||||
assertThat(cursor.getCount()).isEqualTo(16);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddResourceWithNIKs_RowsInsertedDisabled() {
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
|
||||
// Only add 2 of 6 items to be disabled.
|
||||
String[] keys = {"gesture_double_tap_power", "gesture_swipe_down_fingerprint"};
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.ia_display_settings);
|
||||
// Only add 2 of 16 items to be disabled.
|
||||
String[] keys = {"brightness", "wallpaper"};
|
||||
Map<String, List<String>> niks = getNonIndexableKeys(keys);
|
||||
mManager.indexOneSearchIndexableData(mDb, localeStr, resource, niks);
|
||||
|
||||
Cursor cursor = mDb.rawQuery("SELECT * FROM prefs_index WHERE enabled = 0", null);
|
||||
assertThat(cursor.getCount()).isEqualTo(2);
|
||||
cursor = mDb.rawQuery("SELECT * FROM prefs_index WHERE enabled = 1", null);
|
||||
assertThat(cursor.getCount()).isEqualTo(5);
|
||||
assertThat(cursor.getCount()).isEqualTo(14);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -306,7 +306,7 @@ public class DatabaseIndexingManagerTest {
|
||||
|
||||
@Test
|
||||
public void testAddResourceCustomSetting_RowsMatch() {
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.swipe_to_notification_settings);
|
||||
mManager.indexOneSearchIndexableData(mDb, localeStr, resource,
|
||||
new HashMap<>());
|
||||
final String prefTitle =
|
||||
@@ -339,7 +339,7 @@ public class DatabaseIndexingManagerTest {
|
||||
assertThat(cursor.getString(9)).isEmpty();
|
||||
// Screen Title
|
||||
assertThat(cursor.getString(10)).isEqualTo(
|
||||
mContext.getString(R.string.gesture_preference_title));
|
||||
mContext.getString(R.string.fingerprint_swipe_for_notifications_title));
|
||||
// Class Name
|
||||
assertThat(cursor.getString(11)).isEqualTo(className);
|
||||
// Icon
|
||||
@@ -477,7 +477,7 @@ public class DatabaseIndexingManagerTest {
|
||||
|
||||
@Test
|
||||
public void testResourceProvider_RowInserted() {
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.swipe_to_notification_settings);
|
||||
resource.xmlResId = 0;
|
||||
resource.className = "com.android.settings.display.ScreenZoomSettings";
|
||||
|
||||
@@ -489,7 +489,7 @@ public class DatabaseIndexingManagerTest {
|
||||
|
||||
@Test
|
||||
public void testResourceProvider_Matches() {
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.gesture_settings);
|
||||
SearchIndexableResource resource = getFakeResource(R.xml.swipe_to_notification_settings);
|
||||
resource.xmlResId = 0;
|
||||
resource.className = "com.android.settings.display.ScreenZoomSettings";
|
||||
|
||||
|
Reference in New Issue
Block a user