/frameworks/base/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/ |
D | ShortcutManagerTestUtils.java | 41 import android.content.pm.ShortcutInfo; 386 public static List<ShortcutInfo> filter(List<ShortcutInfo> list, Predicate<ShortcutInfo> p) { in filter() 387 final ArrayList<ShortcutInfo> ret = new ArrayList<>(list); in filter() 392 public static List<ShortcutInfo> filterByActivity(List<ShortcutInfo> list, in filterByActivity() 399 public static List<ShortcutInfo> changedSince(List<ShortcutInfo> list, long time) { in changedSince() 442 public static List<ShortcutInfo> assertShortcutIds(List<ShortcutInfo> actualShortcuts, in assertShortcutIds() 446 for (ShortcutInfo s : actualShortcuts) { in assertShortcutIds() 455 public static List<ShortcutInfo> assertShortcutIdsOrdered(List<ShortcutInfo> actualShortcuts, in assertShortcutIdsOrdered() 459 for (ShortcutInfo s : actualShortcuts) { in assertShortcutIdsOrdered() 466 public static List<ShortcutInfo> assertAllHaveIntents( in assertAllHaveIntents() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | ShortcutManagerTest2.java | 37 import android.content.pm.ShortcutInfo; 81 () -> new ShortcutInfo.Builder(getTestContext()).build()); in testShortcutInfoMissingMandatoryFields() 86 () -> new ShortcutInfo.Builder(getTestContext(), null)); in testShortcutInfoMissingMandatoryFields() 91 () -> new ShortcutInfo.Builder(getTestContext(), "")); in testShortcutInfoMissingMandatoryFields() 96 () -> new ShortcutInfo.Builder(getTestContext(), "id").setIntent(null)); in testShortcutInfoMissingMandatoryFields() 101 () -> new ShortcutInfo.Builder(getTestContext(), "id").setIntent(new Intent())); in testShortcutInfoMissingMandatoryFields() 106 () -> new ShortcutInfo.Builder(getTestContext(), "id") in testShortcutInfoMissingMandatoryFields() 112 () -> new ShortcutInfo.Builder(getTestContext(), "id").setActivity(null)); in testShortcutInfoMissingMandatoryFields() 117 () -> new ShortcutInfo.Builder(getTestContext(), "id").setShortLabel(null)); in testShortcutInfoMissingMandatoryFields() 122 () -> new ShortcutInfo.Builder(getTestContext(), "id").setShortLabel("")); in testShortcutInfoMissingMandatoryFields() [all …]
|
D | BaseShortcutManagerTest.java | 63 import android.content.pm.ShortcutInfo; 319 void injectValidateIconResPackage(ShortcutInfo shortcut, Icon icon) { in injectValidateIconResPackage() 496 public boolean setDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in setDynamicShortcuts() 503 public boolean addDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in addDynamicShortcuts() 509 public boolean updateShortcuts(List<ShortcutInfo> shortcutInfoList) { in updateShortcuts() 936 entryName = ShortcutInfo.getResourceEntryName(entryName); in setUpAppResources() 1294 protected void lookupAndFillInResourceNames(ShortcutInfo si) { in lookupAndFillInResourceNames() 1394 protected ShortcutInfo makeShortcutIdOnly(String id) { in makeShortcutIdOnly() 1395 return new ShortcutInfo.Builder(mClientContext, id).build(); in makeShortcutIdOnly() 1401 protected ShortcutInfo makeShortcut(String id) { in makeShortcut() [all …]
|
D | ShortcutManagerTest10.java | 26 import android.content.pm.ShortcutInfo; 56 ShortcutInfo s1 = makeShortcut("s1"); in testCreateShortcutResult_noDefaultLauncher() 65 ShortcutInfo s1 = makeShortcut("s1"); in testCreateShortcutResult_validResult() 88 ShortcutInfo s1 = makeShortcut("s1"); in testCreateShortcutResult_alreadyPinned() 112 ShortcutInfo s1 = makeShortcut("s1"); in testCreateShortcutResult_alreadyPinnedByAnother() 128 ShortcutInfo s1 = makeShortcut("s1"); in testCreateShortcutResult_defaultLauncherChanges()
|
D | ShortcutManagerTest1.java | 18 import static android.content.pm.ShortcutInfo.DISABLED_REASON_BACKUP_NOT_SUPPORTED; 19 import static android.content.pm.ShortcutInfo.DISABLED_REASON_NOT_DISABLED; 20 import static android.content.pm.ShortcutInfo.DISABLED_REASON_SIGNATURE_MISMATCH; 21 import static android.content.pm.ShortcutInfo.DISABLED_REASON_VERSION_LOWER; 83 import android.content.pm.ShortcutInfo; 261 final ShortcutInfo si1 = makeShortcut( in testSetDynamicShortcuts() 270 final ShortcutInfo si2 = makeShortcut( in testSetDynamicShortcuts() 277 final ShortcutInfo si3 = makeShortcut( in testSetDynamicShortcuts() 325 final ShortcutInfo si1 = makeShortcut("shortcut1"); in testAddDynamicShortcuts() 326 final ShortcutInfo si2 = makeShortcut("shortcut2"); in testAddDynamicShortcuts() [all …]
|
D | ShortcutManagerTest8.java | 39 import android.content.pm.ShortcutInfo; 177 ShortcutInfo s1 = makeShortcut("s1"); in testRequestPinShortcut_notSupported() 189 ShortcutInfo s1 = makeShortcut("s1"); in testRequestPinShortcut_notSupported() 201 ShortcutInfo s1 = makeShortcut("s1"); in testRequestPinShortcut_notSupported() 259 final ShortcutInfo.Builder b = new ShortcutInfo.Builder(mClientContext, "s1") in checkRequestPinShortcut() 263 final ShortcutInfo s = b.build(); in checkRequestPinShortcut() 339 ShortcutInfo s1 = makeShortcutWithActivity("s1", in testRequestPinShortcut_explicitTargetActivity() 395 ShortcutInfo s1 = makeShortcutWithActivity("s1", in testRequestPinShortcut_wrongTargetActivity() 414 final ShortcutInfo.Builder b = new ShortcutInfo.Builder(mClientContext, "s1") in testRequestPinShortcut_noTargetActivity_noMainActivity() 417 final ShortcutInfo s = b.build(); in testRequestPinShortcut_noTargetActivity_noMainActivity() [all …]
|
D | ShortcutManagerTest3.java | 22 import android.content.pm.ShortcutInfo; 45 private ShortcutInfo shortcut(String id, ComponentName activity, int rank) { in shortcut() 49 private ShortcutInfo shortcut(String id, ComponentName activity) { in shortcut() 50 return makeShortcutWithActivityAndRank(id, activity, ShortcutInfo.RANK_NOT_SET); in shortcut()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | ShortcutPackage.java | 24 import android.content.pm.ShortcutInfo; 111 final private ArrayMap<String, ShortcutInfo> mShortcuts = new ArrayMap<>(); 171 ShortcutInfo si = mShortcuts.valueAt(i); in onRestored() 172 si.clearFlags(ShortcutInfo.FLAG_SHADOW); in onRestored() 175 if (restoreBlockReason != ShortcutInfo.DISABLED_REASON_NOT_DISABLED) { in onRestored() 176 si.addFlags(ShortcutInfo.FLAG_DISABLED); in onRestored() 188 public ShortcutInfo findShortcutById(String id) { in findShortcutById() 193 ShortcutInfo si = findShortcutById(id); in isShortcutExistsAndInvisibleToPublisher() 198 ShortcutInfo si = findShortcutById(id); in isShortcutExistsAndVisibleToPublisher() 202 private void ensureNotImmutable(@Nullable ShortcutInfo shortcut, boolean ignoreInvisible) { in ensureNotImmutable() [all …]
|
D | ShortcutBitmapSaver.java | 20 import android.content.pm.ShortcutInfo; 86 public final ShortcutInfo shortcut; 94 private PendingItem(ShortcutInfo shortcut, byte[] bytes) { in PendingItem() 137 public String getBitmapPathMayWaitLocked(ShortcutInfo shortcut) { in getBitmapPathMayWaitLocked() 146 public void removeIcon(ShortcutInfo shortcut) { in removeIcon() 152 shortcut.clearFlags(ShortcutInfo.FLAG_HAS_ICON_FILE | in removeIcon() 153 ShortcutInfo.FLAG_ADAPTIVE_BITMAP | ShortcutInfo.FLAG_HAS_ICON_RES | in removeIcon() 154 ShortcutInfo.FLAG_ICON_FILE_PENDING_SAVE); in removeIcon() 157 public void saveBitmapLocked(ShortcutInfo shortcut, in saveBitmapLocked() 200 ShortcutInfo.FLAG_HAS_ICON_FILE | ShortcutInfo.FLAG_ICON_FILE_PENDING_SAVE); in saveBitmapLocked() [all …]
|
D | ShortcutParser.java | 24 import android.content.pm.ShortcutInfo; 60 public static List<ShortcutInfo> parseShortcuts(ShortcutService service, in parseShortcuts() 71 List<ShortcutInfo> result = null; in parseShortcuts() 99 private static List<ShortcutInfo> parseShortcutsOneFile( in parseShortcutsOneFile() 102 List<ShortcutInfo> result) throws IOException, XmlPullParserException { in parseShortcutsOneFile() 127 ShortcutInfo currentShortcut = null; in parseShortcutsOneFile() 144 final ShortcutInfo si = currentShortcut; in parseShortcutsOneFile() 206 final ShortcutInfo si = parseShortcutAttributes( in parseShortcutsOneFile() 287 private static ShortcutInfo parseShortcutAttributes(ShortcutService service, in parseShortcutAttributes() 331 private static ShortcutInfo createShortcutFromManifest(ShortcutService service, in createShortcutFromManifest() [all …]
|
D | ShortcutRequestPinProcessor.java | 27 import android.content.pm.ShortcutInfo; 68 public ShortcutInfo getShortcutInfo() { in getShortcutInfo() 174 public final ShortcutInfo shortcutOriginal; 180 public final ShortcutInfo shortcutForLauncher; 187 ShortcutInfo shortcutOriginal, ShortcutInfo shortcutForLauncher, in PinShortcutRequestInner() 199 public ShortcutInfo getShortcutInfo() { in getShortcutInfo() 229 public boolean requestPinItemLocked(ShortcutInfo inShortcut, AppWidgetProviderInfo inAppWidget, in requestPinItemLocked() 273 public Intent createShortcutResultIntent(@NonNull ShortcutInfo inShortcut, int userId) { in createShortcutResultIntent() 296 private PinItemRequest requestPinShortcutLocked(ShortcutInfo inShortcut, in requestPinShortcutLocked() 301 final ShortcutInfo existing = ps.findShortcutById(inShortcut.getId()); in requestPinShortcutLocked() [all …]
|
D | ShortcutPackageInfo.java | 22 import android.content.pm.ShortcutInfo; 67 private long mVersionCode = ShortcutInfo.VERSION_CODE_UNKNOWN; 68 private long mBackupSourceVersionCode = ShortcutInfo.VERSION_CODE_UNKNOWN; 92 return new ShortcutPackageInfo(ShortcutInfo.VERSION_CODE_UNKNOWN, /* last update time =*/ 0, in newEmpty() 147 return ShortcutInfo.DISABLED_REASON_SIGNATURE_MISMATCH; in canRestoreTo() 152 return ShortcutInfo.DISABLED_REASON_BACKUP_NOT_SUPPORTED; in canRestoreTo() 158 return ShortcutInfo.DISABLED_REASON_VERSION_LOWER; in canRestoreTo() 160 return ShortcutInfo.DISABLED_REASON_NOT_DISABLED; in canRestoreTo() 243 ShortcutInfo.VERSION_CODE_UNKNOWN); in loadFromXml() 255 ATTR_BACKUP_SOURCE_VERSION, ShortcutInfo.VERSION_CODE_UNKNOWN); in loadFromXml() [all …]
|
D | ShortcutPackageItem.java | 20 import android.content.pm.ShortcutInfo; 111 long currentVersionCode = ShortcutInfo.VERSION_CODE_UNKNOWN; in attemptToRestoreIfNeededAndSave() 116 restoreBlockReason = ShortcutInfo.DISABLED_REASON_SIGNATURE_MISMATCH; in attemptToRestoreIfNeededAndSave() 126 ShortcutInfo.getDisabledReasonDebugString(restoreBlockReason), in attemptToRestoreIfNeededAndSave()
|
D | ShortcutService.java | 48 import android.content.pm.ShortcutInfo; 1268 void removeIconLocked(ShortcutInfo shortcut) { in removeIconLocked() 1368 FileOutputStreamWithPath openIconFileForWrite(@UserIdInt int userId, ShortcutInfo shortcut) in openIconFileForWrite() 1393 void saveIconAndFixUpShortcutLocked(ShortcutInfo shortcut) { in saveIconAndFixUpShortcutLocked() 1415 shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_RES); in saveIconAndFixUpShortcutLocked() 1429 throw ShortcutInfo.getInvalidIconException(); in saveIconAndFixUpShortcutLocked() 1445 void injectValidateIconResPackage(ShortcutInfo shortcut, Icon icon) { in injectValidateIconResPackage() 1486 void fixUpShortcutResourceNamesAndValues(ShortcutInfo si) { in fixUpShortcutResourceNamesAndValues() 1642 private void fixUpIncomingShortcutInfo(@NonNull ShortcutInfo shortcut, boolean forUpdate, in fixUpIncomingShortcutInfo() 1669 ShortcutInfo.validateIcon(shortcut.getIcon()); in fixUpIncomingShortcutInfo() [all …]
|
D | ShortcutLauncher.java | 22 import android.content.pm.ShortcutInfo; 114 if (restoreBlockReason != ShortcutInfo.DISABLED_REASON_NOT_DISABLED) { in onRestored() 149 final ShortcutInfo si = packageShortcuts.findShortcutById(id); in pinShortcuts() 177 public boolean hasPinned(ShortcutInfo shortcut) { in hasPinned()
|
/frameworks/base/services/core/java/com/android/server/policy/ |
D | ShortcutManager.java | 55 private final SparseArray<ShortcutInfo> mShortcuts = new SparseArray<>(); 56 private final SparseArray<ShortcutInfo> mShiftShortcuts = new SparseArray<>(); 81 ShortcutInfo shortcut = null; in getIntent() 85 SparseArray<ShortcutInfo> shortcutMap = isShiftOn ? mShiftShortcuts : mShortcuts; in getIntent() 175 ShortcutInfo shortcut = new ShortcutInfo(title, intent); in loadShortcuts() 189 private static final class ShortcutInfo { class in ShortcutManager 193 public ShortcutInfo(String title, Intent intent) { in ShortcutInfo() method in ShortcutManager.ShortcutInfo
|
/frameworks/base/core/java/android/content/pm/ |
D | ShortcutManager.java | 324 public boolean setDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in setDynamicShortcuts() 343 public List<ShortcutInfo> getDynamicShortcuts() { in getDynamicShortcuts() 362 public List<ShortcutInfo> getManifestShortcuts() { in getManifestShortcuts() 384 public boolean addDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in addDynamicShortcuts() 430 public List<ShortcutInfo> getPinnedShortcuts() { in getPinnedShortcuts() 451 public boolean updateShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in updateShortcuts() 718 public boolean requestPinShortcut(@NonNull ShortcutInfo shortcut, in requestPinShortcut() 745 public Intent createShortcutResultIntent(@NonNull ShortcutInfo shortcut) { in createShortcutResultIntent()
|
D | IPinItemRequest.aidl | 20 import android.content.pm.ShortcutInfo; 28 ShortcutInfo getShortcutInfo(); in getShortcutInfo()
|
D | IShortcutService.aidl | 21 import android.content.pm.ShortcutInfo; 46 boolean requestPinShortcut(String packageName, in ShortcutInfo shortcut, in requestPinShortcut() 49 Intent createShortcutResultIntent(String packageName, in ShortcutInfo shortcut, int userId); in createShortcutResultIntent()
|
D | LauncherApps.java | 274 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) { in onShortcutsChanged() 770 private List<ShortcutInfo> maybeUpdateDisabledMessage(List<ShortcutInfo> shortcuts) { in maybeUpdateDisabledMessage() 775 final ShortcutInfo si = shortcuts.get(i); in maybeUpdateDisabledMessage() 776 final String message = ShortcutInfo.getDisabledReasonForRestoreIssue(mContext, in maybeUpdateDisabledMessage() 801 public List<ShortcutInfo> getShortcuts(@NonNull ShortcutQuery query, in getShortcuts() 825 public List<ShortcutInfo> getShortcutInfo(@NonNull String packageName, in getShortcutInfo() 865 public int getShortcutIconResId(@NonNull ShortcutInfo shortcut) { in getShortcutIconResId() 879 final List<ShortcutInfo> shortcuts = getShortcuts(q, user); in getShortcutIconResId() 888 @NonNull ShortcutInfo shortcut) { in getShortcutIconFd() 928 public Drawable getShortcutIconDrawable(@NonNull ShortcutInfo shortcut, int density) { in getShortcutIconDrawable() [all …]
|
D | ShortcutInfo.java | 54 public final class ShortcutInfo implements Parcelable { class 381 private ShortcutInfo(Builder b) { in ShortcutInfo() method in ShortcutInfo 486 private ShortcutInfo(ShortcutInfo source, @CloneFlags int cloneFlags) { in ShortcutInfo() method in ShortcutInfo 751 public ShortcutInfo clone(@CloneFlags int cloneFlags) { in clone() 752 return new ShortcutInfo(this, cloneFlags); in clone() 760 public void ensureUpdatableWith(ShortcutInfo source, boolean isUpdating) { in ensureUpdatableWith() 789 public void copyNonNullFieldsFrom(ShortcutInfo source) { in copyNonNullFieldsFrom() 1195 public ShortcutInfo build() { in build() 1196 return new ShortcutInfo(this); in build() 1850 private ShortcutInfo(Parcel source) { in ShortcutInfo() method in ShortcutInfo [all …]
|
D | ShortcutInfo.aidl | 18 parcelable ShortcutInfo;
|
D | ShortcutServiceInternal.java | 44 public abstract List<ShortcutInfo>
|
/frameworks/support/compat/src/androidTest/java/androidx/core/content/pm/ |
D | ShortcutManagerCompatTest.java | 45 import android.content.pm.ShortcutInfo; 108 any(ShortcutInfo.class), nullable(IntentSender.class))).thenReturn(true); in testRequestPinShortcut_v26() 111 ArgumentCaptor<ShortcutInfo> captor = ArgumentCaptor.forClass(ShortcutInfo.class); in testRequestPinShortcut_v26() 124 when(mockShortcutManager.createShortcutResultIntent(any(ShortcutInfo.class))) in testCreateShortcutResultIntent_v26() 131 ArgumentCaptor<ShortcutInfo> captor = ArgumentCaptor.forClass(ShortcutInfo.class); in testCreateShortcutResultIntent_v26()
|
/frameworks/support/compat/src/main/java/androidx/core/content/pm/ |
D | ShortcutInfoCompat.java | 22 import android.content.pm.ShortcutInfo; 57 public ShortcutInfo toShortcutInfo() { in toShortcutInfo() 58 ShortcutInfo.Builder builder = new ShortcutInfo.Builder(mContext, mId) in toShortcutInfo()
|