Home
last modified time | relevance | path

Searched refs:ShortcutInfo (Results 1 – 25 of 39) sorted by relevance

12

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DShortcutManagerTest2.java39 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 …]
DBaseShortcutManagerTest.java65 import android.content.pm.ShortcutInfo;
322 void injectValidateIconResPackage(ShortcutInfo shortcut, Icon icon) { in injectValidateIconResPackage()
499 public boolean setDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in setDynamicShortcuts()
506 public boolean addDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in addDynamicShortcuts()
512 public boolean updateShortcuts(List<ShortcutInfo> shortcutInfoList) { in updateShortcuts()
945 entryName = ShortcutInfo.getResourceEntryName(entryName); in setUpAppResources()
1306 protected void lookupAndFillInResourceNames(ShortcutInfo si) { in lookupAndFillInResourceNames()
1406 protected ShortcutInfo makeShortcutIdOnly(String id) { in makeShortcutIdOnly()
1407 return new ShortcutInfo.Builder(mClientContext, id).build(); in makeShortcutIdOnly()
1413 protected ShortcutInfo makeShortcut(String id) { in makeShortcut()
[all …]
DShortcutManagerTest10.java26 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()
DShortcutManagerTest1.java18 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;
84 import android.content.pm.ShortcutInfo;
272 final ShortcutInfo si1 = makeShortcut( in testSetDynamicShortcuts()
281 final ShortcutInfo si2 = makeShortcut( in testSetDynamicShortcuts()
288 final ShortcutInfo si3 = makeShortcut( in testSetDynamicShortcuts()
336 final ShortcutInfo si1 = makeShortcut("shortcut1"); in testAddDynamicShortcuts()
337 final ShortcutInfo si2 = makeShortcut("shortcut2"); in testAddDynamicShortcuts()
[all …]
DShortcutManagerTest8.java39 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 …]
DShortcutManagerTest3.java23 import android.content.pm.ShortcutInfo;
48 private ShortcutInfo shortcut(String id, ComponentName activity, int rank) { in shortcut()
52 private ShortcutInfo shortcut(String id, ComponentName activity) { in shortcut()
53 return makeShortcutWithActivityAndRank(id, activity, ShortcutInfo.RANK_NOT_SET); in shortcut()
56 private ShortcutInfo shortcut(String id, Set<String> categories) { in shortcut()
/frameworks/base/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/
DShortcutManagerTestUtils.java42 import android.content.pm.ShortcutInfo;
391 public static List<ShortcutInfo> filter(List<ShortcutInfo> list, Predicate<ShortcutInfo> p) { in filter()
392 final ArrayList<ShortcutInfo> ret = new ArrayList<>(list); in filter()
397 public static List<ShortcutInfo> filterByActivity(List<ShortcutInfo> list, in filterByActivity()
404 public static List<ShortcutInfo> changedSince(List<ShortcutInfo> list, long time) { in changedSince()
447 public static List<ShortcutInfo> assertShortcutIds(List<ShortcutInfo> actualShortcuts, in assertShortcutIds()
451 for (ShortcutInfo s : actualShortcuts) { in assertShortcutIds()
460 public static List<ShortcutInfo> assertShortcutIdsOrdered(List<ShortcutInfo> actualShortcuts, in assertShortcutIdsOrdered()
464 for (ShortcutInfo s : actualShortcuts) { in assertShortcutIdsOrdered()
471 public static List<ShortcutInfo> assertAllHaveIntents( in assertAllHaveIntents()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DShortcutPackage.java27 import android.content.pm.ShortcutInfo;
125 final private ArrayMap<String, ShortcutInfo> mShortcuts = new ArrayMap<>();
190 ShortcutInfo si = mShortcuts.valueAt(i); in onRestored()
191 si.clearFlags(ShortcutInfo.FLAG_SHADOW); in onRestored()
194 if (restoreBlockReason != ShortcutInfo.DISABLED_REASON_NOT_DISABLED) { in onRestored()
195 si.addFlags(ShortcutInfo.FLAG_DISABLED); in onRestored()
207 public ShortcutInfo findShortcutById(String id) { in findShortcutById()
212 ShortcutInfo si = findShortcutById(id); in isShortcutExistsAndInvisibleToPublisher()
217 ShortcutInfo si = findShortcutById(id); in isShortcutExistsAndVisibleToPublisher()
221 private void ensureNotImmutable(@Nullable ShortcutInfo shortcut, boolean ignoreInvisible) { in ensureNotImmutable()
[all …]
DShortcutBitmapSaver.java20 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 …]
DShortcutRequestPinProcessor.java27 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 …]
DShortcutParser.java25 import android.content.pm.ShortcutInfo;
64 public static List<ShortcutInfo> parseShortcuts(ShortcutService service, String packageName, in parseShortcuts()
76 List<ShortcutInfo> result = null; in parseShortcuts()
105 private static List<ShortcutInfo> parseShortcutsOneFile( in parseShortcutsOneFile()
108 List<ShortcutInfo> result, @NonNull List<ShareTargetInfo> outShareTargets) in parseShortcutsOneFile()
134 ShortcutInfo currentShortcut = null; in parseShortcutsOneFile()
161 final ShortcutInfo si = currentShortcut; in parseShortcutsOneFile()
249 final ShortcutInfo si = parseShortcutAttributes( in parseShortcutsOneFile()
369 private static ShortcutInfo parseShortcutAttributes(ShortcutService service, in parseShortcutAttributes()
413 private static ShortcutInfo createShortcutFromManifest(ShortcutService service, in createShortcutFromManifest()
[all …]
DShortcutPackageInfo.java22 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 …]
DShortcutPackageItem.java20 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()
DShortcutService.java48 import android.content.pm.ShortcutInfo;
1276 void removeIconLocked(ShortcutInfo shortcut) { in removeIconLocked()
1376 FileOutputStreamWithPath openIconFileForWrite(@UserIdInt int userId, ShortcutInfo shortcut) in openIconFileForWrite()
1401 void saveIconAndFixUpShortcutLocked(ShortcutInfo shortcut) { in saveIconAndFixUpShortcutLocked()
1423 shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_RES); in saveIconAndFixUpShortcutLocked()
1437 throw ShortcutInfo.getInvalidIconException(); in saveIconAndFixUpShortcutLocked()
1453 void injectValidateIconResPackage(ShortcutInfo shortcut, Icon icon) { in injectValidateIconResPackage()
1494 void fixUpShortcutResourceNamesAndValues(ShortcutInfo si) { in fixUpShortcutResourceNamesAndValues()
1584 private void verifyShortcutInfoPackage(String callerPackage, ShortcutInfo si) { in verifyShortcutInfoPackage()
1595 String callerPackage, List<ShortcutInfo> list) { in verifyShortcutInfoPackages()
[all …]
DShortcutLauncher.java22 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/core/java/android/content/pm/
DShortcutManager.java100 public boolean setDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in setDynamicShortcuts()
119 public List<ShortcutInfo> getDynamicShortcuts() { in getDynamicShortcuts()
138 public List<ShortcutInfo> getManifestShortcuts() { in getManifestShortcuts()
160 public boolean addDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in addDynamicShortcuts()
206 public List<ShortcutInfo> getPinnedShortcuts() { in getPinnedShortcuts()
227 public boolean updateShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in updateShortcuts()
502 public boolean requestPinShortcut(@NonNull ShortcutInfo shortcut, in requestPinShortcut()
529 public Intent createShortcutResultIntent(@NonNull ShortcutInfo shortcut) { in createShortcutResultIntent()
587 private final ShortcutInfo mShortcutInfo;
593 public ShareShortcutInfo(@NonNull ShortcutInfo shortcutInfo, in ShareShortcutInfo()
[all …]
DIPinItemRequest.aidl20 import android.content.pm.ShortcutInfo;
28 ShortcutInfo getShortcutInfo(); in getShortcutInfo()
DIShortcutService.aidl22 import android.content.pm.ShortcutInfo;
47 boolean requestPinShortcut(String packageName, in ShortcutInfo shortcut, in requestPinShortcut()
50 Intent createShortcutResultIntent(String packageName, in ShortcutInfo shortcut, int userId); in createShortcutResultIntent()
DLauncherApps.java285 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) { in onShortcutsChanged()
847 private List<ShortcutInfo> maybeUpdateDisabledMessage(List<ShortcutInfo> shortcuts) { in maybeUpdateDisabledMessage()
852 final ShortcutInfo si = shortcuts.get(i); in maybeUpdateDisabledMessage()
853 final String message = ShortcutInfo.getDisabledReasonForRestoreIssue(mContext, in maybeUpdateDisabledMessage()
878 public List<ShortcutInfo> getShortcuts(@NonNull ShortcutQuery query, in getShortcuts()
902 public List<ShortcutInfo> getShortcutInfo(@NonNull String packageName, in getShortcutInfo()
942 public int getShortcutIconResId(@NonNull ShortcutInfo shortcut) { in getShortcutIconResId()
956 final List<ShortcutInfo> shortcuts = getShortcuts(q, user); in getShortcutIconResId()
965 @NonNull ShortcutInfo shortcut) { in getShortcutIconFd()
1005 public Drawable getShortcutIconDrawable(@NonNull ShortcutInfo shortcut, int density) { in getShortcutIconDrawable()
[all …]
DShortcutInfo.java61 public final class ShortcutInfo implements Parcelable { class
409 private ShortcutInfo(Builder b) { in ShortcutInfo() method in ShortcutInfo
534 private ShortcutInfo(ShortcutInfo source, @CloneFlags int cloneFlags) { in ShortcutInfo() method in ShortcutInfo
803 public ShortcutInfo clone(@CloneFlags int cloneFlags) { in clone()
804 return new ShortcutInfo(this, cloneFlags); in clone()
812 public void ensureUpdatableWith(ShortcutInfo source, boolean isUpdating) { in ensureUpdatableWith()
841 public void copyNonNullFieldsFrom(ShortcutInfo source) { in copyNonNullFieldsFrom()
1320 public ShortcutInfo build() { in build()
1321 return new ShortcutInfo(this); in build()
2008 private ShortcutInfo(Parcel source) { in ShortcutInfo() method in ShortcutInfo
[all …]
DShortcutInfo.aidl18 parcelable ShortcutInfo;
DShortcutServiceInternal.java44 public abstract List<ShortcutInfo>
/frameworks/base/services/core/java/com/android/server/policy/
DShortcutManager.java55 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/app/prediction/
DAppTarget.java23 import android.content.pm.ShortcutInfo;
44 private final ShortcutInfo mShortcutInfo;
69 public AppTarget(@NonNull AppTargetId id, @NonNull ShortcutInfo shortcutInfo, in AppTarget()
81 ShortcutInfo shortcutInfo, String className, int rank) { in AppTarget()
92 mShortcutInfo = parcel.readTypedObject(ShortcutInfo.CREATOR); in AppTarget()
140 public ShortcutInfo getShortcutInfo() { in getShortcutInfo()
201 private ShortcutInfo mShortcutInfo;
239 public Builder(@NonNull AppTargetId id, @NonNull ShortcutInfo info) { in Builder()
267 public Builder setTarget(@NonNull ShortcutInfo info) { in setTarget()
/frameworks/base/api/
Dtest-removed.txt6 …ublic android.app.prediction.AppTarget.Builder setTarget(@NonNull android.content.pm.ShortcutInfo);

12