Home | History | Annotate | Download | only in shortcutmanager

Lines Matching refs:si

134                     ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
136 assertTrue(getManager().setDynamicShortcuts(list(si)));
142 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
145 assertTrue(getManager().addDynamicShortcuts(list(si)));
149 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
153 assertTrue(getManager().setDynamicShortcuts(list(si)));
158 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
162 assertTrue(getManager().addDynamicShortcuts(list(si)));
167 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
170 assertTrue(getManager().setDynamicShortcuts(list(si)));
176 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
179 assertTrue(getManager().addDynamicShortcuts(list(si)));
188 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
191 assertTrue(getManager().setDynamicShortcuts(list(si)));
196 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
199 assertTrue(getManager().addDynamicShortcuts(list(si)));
204 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
207 assertTrue(getManager().updateShortcuts(list(si)));
216 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
219 assertTrue(getManager().setDynamicShortcuts(list(si)));
224 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
227 assertTrue(getManager().addDynamicShortcuts(list(si)));
232 ShortcutInfo si = new ShortcutInfo.Builder(getTestContext(), "id")
235 assertTrue(getManager().updateShortcuts(list(si)));
252 .forShortcutWithId("s1", si -> {
253 assertEquals("title1", si.getShortLabel());
255 .forShortcutWithId("s2", si -> {
256 assertEquals("title2", si.getShortLabel());
258 .forShortcutWithId("s3", si -> {
259 assertEquals("title3", si.getShortLabel());
278 .forShortcutWithId("s1x", si -> {
279 assertEquals("title1x", si.getShortLabel());
293 .forShortcutWithId("s1", si -> {
294 assertEquals("title1", si.getShortLabel());
296 .forShortcutWithId("s2", si -> {
297 assertEquals("title2", si.getShortLabel());
299 .forShortcutWithId("s3", si -> {
300 assertEquals("title3", si.getShortLabel());
318 .forShortcutWithId("s2", si -> {
319 assertEquals("title2-updated", si.getShortLabel());
346 .forShortcutWithId("s1x", si -> {
347 assertEquals("title1x", si.getShortLabel());
383 .forShortcutWithId("s1", si ->{
384 assertEquals("shortlabel", si.getShortLabel());
385 assertEquals("longlabel", si.getLongLabel());
386 assertEquals(getActivity("Launcher"), si.getActivity());
387 assertEquals("disabledmessage", si.getDisabledMessage());
388 assertEquals(1, si.getIntents().length);
389 assertEquals("view", si.getIntents()[0].getAction());
390 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
391 assertEquals("ev1", si.getExtras().getString("ek1"));
392 assertEquals(set("cat1"), si.getCategories());
409 .forShortcutWithId("s1", si ->{
410 assertEquals("xxx", si.getShortLabel());
411 assertEquals(null, si.getLongLabel());
412 assertEquals(getActivity("Launcher"), si.getActivity());
413 assertEquals(null, si.getDisabledMessage());
414 assertEquals(1, si.getIntents().length);
415 assertEquals("main", si.getIntents()[0].getAction());
416 assertEquals("yyy", si.getIntents()[0].getStringExtra("k1"));
417 assertEquals(null, si.getExtras());
418 assertEquals(null, si.getCategories());
440 .forShortcutWithId("s1", si ->{
441 assertEquals("shortlabel", si.getShortLabel());
442 assertEquals("longlabel", si.getLongLabel());
443 assertEquals(getActivity("Launcher"), si.getActivity());
444 assertEquals("disabledmessage", si.getDisabledMessage());
445 assertEquals(1, si.getIntents().length);
446 assertEquals("view", si.getIntents()[0].getAction());
447 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
448 assertEquals("ev1", si.getExtras().getString("ek1"));
449 assertEquals(set("cat1"), si.getCategories());
468 .forShortcutWithId("s1", si ->{
469 assertEquals("xxx", si.getShortLabel());
487 .forShortcutWithId("s1", si ->{
488 assertEquals("xxx", si.getShortLabel());
507 .forShortcutWithId("s1", si ->{
508 assertEquals("xxx", si.getShortLabel());
525 .forShortcutWithId("s1", si ->{
526 assertEquals("xxx", si.getShortLabel());
543 .forShortcutWithId("s1", si ->{
544 assertEquals("xxx", si.getShortLabel());
590 .forShortcutWithId("s1", si -> {
591 assertEquals("title1", si.getShortLabel());
593 .forShortcutWithId("s2", si -> {
594 assertEquals("title2", si.getShortLabel());
596 .forShortcutWithId("s3", si -> {
597 assertEquals("title3", si.getShortLabel());
616 .forShortcutWithId("s1x", si -> {
617 assertEquals("title1x", si.getShortLabel());
631 .forShortcutWithId("s1", si -> {
632 assertEquals("title1", si.getShortLabel());
634 .forShortcutWithId("s2", si -> {
635 assertEquals("title2", si.getShortLabel());
637 .forShortcutWithId("s3", si -> {
638 assertEquals("title3", si.getShortLabel());
656 .forShortcutWithId("s1", si -> {
657 assertEquals("title1", si.getShortLabel());
659 .forShortcutWithId("s2", si -> {
660 assertEquals("title2-updated", si.getShortLabel());
662 .forShortcutWithId("s3", si -> {
663 assertEquals("title3", si.getShortLabel());
680 .forShortcutWithId("s1", si -> {
681 assertEquals("title1", si.getShortLabel());
683 .forShortcutWithId("s2", si -> {
684 assertEquals("title2-updated", si.getShortLabel());
686 .forShortcutWithId("s3", si -> {
687 assertEquals("title3", si.getShortLabel());
701 .forShortcutWithId("s1x", si -> {
702 assertEquals("title1x", si.getShortLabel());
735 si ->{
736 assertEquals("shortlabel", si.getShortLabel());
737 assertEquals("longlabel", si.getLongLabel());
738 assertEquals(getActivity("Launcher"), si.getActivity());
739 assertEquals("disabledmessage", si.getDisabledMessage());
740 assertEquals(1, si.getIntents().length);
741 assertEquals("view", si.getIntents()[0].getAction());
742 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
743 assertEquals("ev1", si.getExtras().getString("ek1"));
744 assertEquals(set("cat1"), si.getCategories());
761 .forShortcutWithId("s1", si ->{
762 assertEquals("xxx", si.getShortLabel());
763 assertEquals(null, si.getLongLabel());
764 assertEquals(getActivity("Launcher"), si.getActivity());
765 assertEquals(null, si.getDisabledMessage());
766 assertEquals(1, si.getIntents().length);
767 assertEquals("main", si.getIntents()[0].getAction());
768 assertEquals("yyy", si.getIntents()[0].getStringExtra("k1"));
769 assertEquals(null, si.getExtras());
770 assertEquals(null, si.getCategories());
792 .forShortcutWithId("s1", si ->{
793 assertEquals("shortlabel", si.getShortLabel());
794 assertEquals("longlabel", si.getLongLabel());
795 assertEquals(getActivity("Launcher"), si.getActivity());
796 assertEquals("disabledmessage", si.getDisabledMessage());
797 assertEquals(1, si.getIntents().length);
798 assertEquals("view", si.getIntents()[0].getAction());
799 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
800 assertEquals("ev1", si.getExtras().getString("ek1"));
801 assertEquals(set("cat1"), si.getCategories());
820 .forShortcutWithId("s1", si ->{
821 assertEquals("xxx", si.getShortLabel());
839 .forShortcutWithId("s1", si ->{
840 assertEquals("xxx", si.getShortLabel());
859 .forShortcutWithId("s1", si ->{
860 assertEquals("xxx", si.getShortLabel());
928 .forShortcutWithId("s1", si -> {
929 assertEquals("1a", si.getShortLabel());
931 .forShortcutWithId("s2", si -> {
932 assertEquals("2a", si.getShortLabel());
939 .forShortcutWithId("s2", si -> {
940 assertEquals("2a", si.getShortLabel());
942 .forShortcutWithId("s3", si -> {
943 assertEquals("3a", si.getShortLabel());
954 .forShortcutWithId("s2", si -> {
955 assertEquals("2b", si.getShortLabel());
957 .forShortcutWithId("s3", si -> {
958 assertEquals("3b", si.getShortLabel());
965 .forShortcutWithId("s1", si -> {
966 assertEquals("1b", si.getShortLabel());
968 .forShortcutWithId("s2", si -> {
969 assertEquals("2b", si.getShortLabel());
996 .forShortcutWithId("s1", si -> {
997 assertEquals("upd1a", si.getShortLabel());
999 .forShortcutWithId("s2", si -> {
1000 assertEquals("upd2a", si.getShortLabel());
1007 .forShortcutWithId("s2", si -> {
1008 assertEquals("upd2a", si.getShortLabel());
1010 .forShortcutWithId("s3", si -> {
1011 assertEquals("3a", si.getShortLabel());
1022 .forShortcutWithId("s2", si -> {
1023 assertEquals("upd2b", si.getShortLabel());
1025 .forShortcutWithId("s3", si -> {
1026 assertEquals("3b", si.getShortLabel());
1033 .forShortcutWithId("s1", si -> {
1034 assertEquals("upd1b", si.getShortLabel());
1036 .forShortcutWithId("s2", si -> {
1037 assertEquals("upd2b", si.getShortLabel());
1069 .forShortcutWithId("s1", si ->{
1070 assertEquals("shortlabel", si.getShortLabel());
1071 assertEquals("longlabel", si.getLongLabel());
1072 assertEquals(getActivity("Launcher"), si.getActivity());
1073 assertEquals("disabledmessage", si.getDisabledMessage());
1074 assertEquals(1, si.getIntents().length);
1075 assertEquals("view", si.getIntents()[0].getAction());
1076 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
1077 assertEquals("ev1", si.getExtras().getString("ek1"));
1078 assertEquals(set("cat1"), si.getCategories());
1093 .forShortcutWithId("s1", si ->{
1094 assertEquals("shortlabel", si
1095 assertEquals("longlabel", si.getLongLabel());
1096 assertEquals(getActivity("Launcher"), si.getActivity());
1097 assertEquals("disabledmessage", si.getDisabledMessage());
1098 assertEquals(1, si.getIntents().length);
1099 assertEquals("view", si.getIntents()[0].getAction());
1100 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
1101 assertEquals("ev1", si.getExtras().getString("ek1"));
1102 assertEquals(set("cat1"), si.getCategories());
1117 .forShortcutWithId("s1", si ->{
1118 assertEquals("x", si.getShortLabel());
1119 assertEquals("longlabel", si.getLongLabel());
1120 assertEquals(getActivity("Launcher"), si.getActivity());
1121 assertEquals("disabledmessage", si.getDisabledMessage());
1122 assertEquals(1, si.getIntents().length);
1123 assertEquals("view", si.getIntents()[0].getAction());
1124 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
1125 assertEquals("ev1", si.getExtras().getString("ek1"));
1126 assertEquals(set("cat1"), si.getCategories());
1141 .forShortcutWithId("s1", si ->{
1142 assertEquals("x", si.getShortLabel());
1143 assertEquals("y", si.getLongLabel());
1144 assertEquals(getActivity("Launcher"), si.getActivity());
1145 assertEquals("disabledmessage", si.getDisabledMessage());
1146 assertEquals(1, si.getIntents().length);
1147 assertEquals("view", si.getIntents()[0].getAction());
1148 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
1149 assertEquals("ev1", si.getExtras().getString("ek1"));
1150 assertEquals(set("cat1"), si.getCategories());
1165 .forShortcutWithId("s1", si ->{
1166 assertEquals("x", si.getShortLabel());
1167 assertEquals("y", si.getLongLabel());
1168 assertEquals(getActivity("Launcher2"), si.getActivity());
1169 assertEquals("disabledmessage", si.getDisabledMessage());
1170 assertEquals(1, si.getIntents().length);
1171 assertEquals("view", si.getIntents()[0].getAction());
1172 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
1173 assertEquals("ev1", si.getExtras().getString("ek1"));
1174 assertEquals(set("cat1"), si.getCategories());
1189 .forShortcutWithId("s1", si ->{
1190 assertEquals("x", si.getShortLabel());
1191 assertEquals("y", si.getLongLabel());
1192 assertEquals(getActivity("Launcher2"), si.getActivity());
1193 assertEquals("z", si.getDisabledMessage());
1194 assertEquals(1, si.getIntents().length);
1195 assertEquals("view", si.getIntents()[0].getAction());
1196 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
1197 assertEquals("ev1", si.getExtras().getString("ek1"));
1198 assertEquals(set("cat1"), si.getCategories());
1213 .forShortcutWithId("s1", si ->{
1214 assertEquals("x", si.getShortLabel());
1215 assertEquals("y", si.getLongLabel());
1216 assertEquals(getActivity("Launcher2"), si.getActivity());
1217 assertEquals("z", si.getDisabledMessage());
1218 assertEquals(1, si.getIntents().length);
1219 assertEquals("main", si.getIntents()[0].getAction());
1220 assertEquals(null, si.getIntents()[0].getStringExtra("k1"));
1221 assertEquals("ev1", si.getExtras().getString("ek1"));
1222 assertEquals(set("cat1"), si.getCategories());
1237 .forShortcutWithId("s1", si ->{
1238 assertEquals("x", si.getShortLabel());
1239 assertEquals("y", si.getLongLabel());
1240 assertEquals(getActivity("Launcher2"), si.getActivity());
1241 assertEquals("z", si.getDisabledMessage());
1242 assertEquals(1, si.getIntents().length);
1243 assertEquals("main", si.getIntents()[0].getAction());
1244 assertEquals(null, si.getIntents()[0].getStringExtra("k1"));
1245 assertEquals("X", si.getExtras().getString("ek1"));
1246 assertEquals(set("cat1"), si.getCategories());
1261 .forShortcutWithId("s1", si ->{
1262 assertEquals("x", si.getShortLabel());
1263 assertEquals("y", si.getLongLabel());
1264 assertEquals(getActivity("Launcher2"), si.getActivity());
1265 assertEquals("z", si.getDisabledMessage());
1266 assertEquals(1, si.getIntents().length);
1267 assertEquals("main", si.getIntents()[0].getAction());
1268 assertEquals(null, si.getIntents()[0].getStringExtra("k1"));
1269 assertEquals("X", si.getExtras().getString("ek1"));
1270 assertEquals(set("dog"), si.getCategories());
1285 .forShortcutWithId("s1", si ->{
1286 assertEquals("x", si.getShortLabel());
1287 assertEquals("y", si.getLongLabel());
1288 assertEquals(getActivity("Launcher2"), si.getActivity());
1289 assertEquals("z", si.getDisabledMessage());
1290 assertEquals(1, si.getIntents().length);
1291 assertEquals("main", si.getIntents()[0].getAction());
1292 assertEquals(null, si.getIntents()[0].getStringExtra("k1"));
1293 assertEquals("X", si.getExtras().getString("ek1"));
1294 assertEquals(set("dog"), si.getCategories());
1392 .forShortcutWithId("s1", si -> {
1393 assertEquals("1a", si.getShortLabel());
1395 .forShortcutWithId("s2", si -> {
1396 assertEquals("2a", si.getShortLabel());
1403 .forShortcutWithId("s2", si -> {
1404 assertEquals("2a", si.getShortLabel());
1406 .forShortcutWithId("s3", si -> {
1407 assertEquals("3a", si.getShortLabel());
1418 .forShortcutWithId("s2", si -> {
1419 assertEquals("2b", si.getShortLabel());
1421 .forShortcutWithId("s3", si -> {
1422 assertEquals("3b", si.getShortLabel());
1429 .forShortcutWithId("s1", si -> {
1430 assertEquals("1b", si.getShortLabel());
1432 .forShortcutWithId("s2", si -> {
1433 assertEquals("2b", si.getShortLabel());
1454 .forShortcutWithId("s2", si -> {
1455 assertEquals("2a", si.getShortLabel());
1461 .forShortcutWithId("s2", si -> {
1462 assertEquals("2a", si.getShortLabel());
1463 assertTrue(si.isEnabled()); // still enabled.
1465 .forShortcutWithId("s3", si -> {
1466 assertEquals("3a", si.getShortLabel());
1467 assertFalse(si.isEnabled()); // disabled.
1468 assertNull(si.getDisabledMessage());
1480 .forShortcutWithId("s3", si -> {
1481 assertEquals("3b", si.getShortLabel());
1488 .forShortcutWithId("s1", si -> {
1489 assertEquals("1b", si.getShortLabel());
1490 assertEquals("custom message", si.getDisabledMessage());
1492 .forShortcutWithId("s2", si -> {
1493 assertEquals("2b", si.getShortLabel());
1494 assertEquals("custom message", si.getDisabledMessage());
1510 .forShortcutWithId("s2", si -> {
1511 assertEquals("2a", si.getShortLabel());
1518 .forShortcutWithId("s2", si -> {
1519 assertEquals("2a", si.getShortLabel());
1521 .forShortcutWithId("s3", si -> {
1522 assertEquals("3a", si.getShortLabel());
1539 .forShortcutWithId("s3", si -> {
1540 assertEquals("3b", si.getShortLabel());
1542 .forShortcutWithId("s2", si -> {
1543 assertEquals("re-published", si.getShortLabel());
1624 .forShortcutWithId("ms21", si-> {
1626 assertEquals("Shortcut 1", si.getShortLabel());
1627 assertEquals("Long shortcut label1", si.getLongLabel());
1628 assertEquals(getActivity("Launcher_manifest_2"), si.getActivity());
1629 assertEquals("Shortcut 1 is disabled", si.getDisabledMessage());
1631 "android.shortcut.media"), si.getCategories());
1633 mLauncherContext1, si.getPackage(), si.getId(), true));
1636 assertEquals(1, si.getIntents().length);
1638 Intent i = si.getIntents()[0];
1650 .forShortcutWithId("ms22", si-> {
1651 assertEquals("Shortcut 2", si.getShortLabel());
1652 assertEquals(null, si.getLongLabel());
1653 assertEquals(getActivity("Launcher_manifest_2"), si.getActivity());
1654 assertEquals(null, si.getDisabledMessage());
1655 assertEquals(null, si.getCategories());
1657 mLauncherContext1, si.getPackage(), si.getId(), true));
1660 assertEquals(2, si.getIntents().length);
1662 Intent i = si.getIntents()[0];
1675 i = si.getIntents()[1];
1719 .forShortcutWithId("s1", si-> {
1720 assertEquals(1, si.getIntents().length);
1722 Intent i = si.getIntents()[0];
1731 .forShortcutWithId("s2", si-> {
1732 assertEquals(2, si.getIntents().length);
1734 Intent i = si.getIntents()[0];
1744 i = si.getIntents()[1];
1809 .forShortcutWithId("ms41", si -> {
1810 assertEquals(Intent.ACTION_VIEW, si.getIntent().getAction());
1812 .forShortcutWithId("ms42", si -> {
1813 assertEquals(Intent.ACTION_VIEW, si.getIntent().getAction());
1837 .forShortcutWithId("s1", si ->{
1838 assertEquals("shortlabel", si.getShortLabel());
1839 assertEquals("longlabel", si.getLongLabel());
1840 assertEquals(getActivity("Launcher"), si.getActivity());
1841 assertEquals("disabledmessage", si.getDisabledMessage());
1842 assertEquals(1, si.getIntents().length);
1843 assertEquals("view", si.getIntents()[0].getAction());
1844 assertEquals("v1", si.getIntents()[0].getStringExtra("k1"));
1845 assertEquals("ev1", si.getExtras().getString("ek1"));
1846 assertEquals(set("cat1"), si.getCategories());
1848 assertEquals(getUserHandle(), si.getUserHandle());