Merge changes from topic "slice-highlight" into sc-v2-dev am: 6821b6be32
am: 026b1b5df6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16151654 Change-Id: If46903bb26371ea90075d1c6cc063af4d10a88d4
This commit is contained in:
@@ -44,17 +44,18 @@ import java.util.List;
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class SlicesIndexerTest {
|
||||
|
||||
private final String[] KEYS = new String[]{"key1", "key2", "key3"};
|
||||
private final String[] TITLES = new String[]{"title1", "title2", "title3"};
|
||||
private final String SUMMARY = "subtitle";
|
||||
private final String SCREEN_TITLE = "screen title";
|
||||
private final String KEYWORDS = "a, b, c";
|
||||
private final String FRAGMENT_NAME = "fragment name";
|
||||
private final int ICON = 1234; // I declare a thumb war
|
||||
private final Uri URI = Uri.parse("content://com.android.settings.slices/test");
|
||||
private final String PREF_CONTROLLER = "com.android.settings.slices.tester";
|
||||
private final int SLICE_TYPE = SliceData.SliceType.SLIDER;
|
||||
private final String UNAVAILABLE_SLICE_SUBTITLE = "subtitleOfUnavailableSlice";
|
||||
private static final String[] KEYS = new String[]{"key1", "key2", "key3"};
|
||||
private static final String[] TITLES = new String[]{"title1", "title2", "title3"};
|
||||
private static final String SUMMARY = "subtitle";
|
||||
private static final String SCREEN_TITLE = "screen title";
|
||||
private static final String KEYWORDS = "a, b, c";
|
||||
private static final String FRAGMENT_NAME = "fragment name";
|
||||
private static final int ICON = 1234; // I declare a thumb war
|
||||
private static final Uri URI = Uri.parse("content://com.android.settings.slices/test");
|
||||
private static final String PREF_CONTROLLER = "com.android.settings.slices.tester";
|
||||
private static final int SLICE_TYPE = SliceData.SliceType.SLIDER;
|
||||
private static final String UNAVAILABLE_SLICE_SUBTITLE = "subtitleOfUnavailableSlice";
|
||||
private static final int HIGHLIGHT_MENU_KEY = 5678; // I declare a thumb war
|
||||
|
||||
private Context mContext;
|
||||
|
||||
@@ -145,6 +146,9 @@ public class SlicesIndexerTest {
|
||||
.isEqualTo(UNAVAILABLE_SLICE_SUBTITLE);
|
||||
assertThat(cursor.getInt(
|
||||
cursor.getColumnIndex(IndexColumns.PUBLIC_SLICE))).isEqualTo(0);
|
||||
assertThat(cursor.getInt(
|
||||
cursor.getColumnIndex(IndexColumns.HIGHLIGHT_MENU_RESOURCE)))
|
||||
.isEqualTo(HIGHLIGHT_MENU_KEY);
|
||||
cursor.moveToNext();
|
||||
}
|
||||
} finally {
|
||||
@@ -191,6 +195,9 @@ public class SlicesIndexerTest {
|
||||
.isEqualTo(UNAVAILABLE_SLICE_SUBTITLE);
|
||||
assertThat(cursor.getInt(
|
||||
cursor.getColumnIndex(IndexColumns.PUBLIC_SLICE))).isEqualTo(1);
|
||||
assertThat(cursor.getInt(
|
||||
cursor.getColumnIndex(IndexColumns.HIGHLIGHT_MENU_RESOURCE)))
|
||||
.isEqualTo(HIGHLIGHT_MENU_KEY);
|
||||
cursor.moveToNext();
|
||||
}
|
||||
} finally {
|
||||
@@ -224,7 +231,8 @@ public class SlicesIndexerTest {
|
||||
.setUri(URI)
|
||||
.setPreferenceControllerClassName(PREF_CONTROLLER)
|
||||
.setSliceType(SLICE_TYPE)
|
||||
.setUnavailableSliceSubtitle(UNAVAILABLE_SLICE_SUBTITLE);
|
||||
.setUnavailableSliceSubtitle(UNAVAILABLE_SLICE_SUBTITLE)
|
||||
.setHighlightMenuRes(HIGHLIGHT_MENU_KEY);
|
||||
|
||||
if (isPublicSlice) {
|
||||
builder.setIsPublicSlice(true);
|
||||
|
Reference in New Issue
Block a user