Home
last modified time | relevance | path

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

1234

/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.java67 import android.content.pm.ShortcutInfo;
326 void injectValidateIconResPackage(ShortcutInfo shortcut, Icon icon) { in injectValidateIconResPackage()
503 public boolean setDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in setDynamicShortcuts()
510 public boolean addDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in addDynamicShortcuts()
516 public boolean updateShortcuts(List<ShortcutInfo> shortcutInfoList) { in updateShortcuts()
969 entryName = ShortcutInfo.getResourceEntryName(entryName); in setUpAppResources()
1330 protected void lookupAndFillInResourceNames(ShortcutInfo si) { in lookupAndFillInResourceNames()
1430 protected ShortcutInfo makeShortcutIdOnly(String id) { in makeShortcutIdOnly()
1431 return new ShortcutInfo.Builder(mClientContext, id).build(); in makeShortcutIdOnly()
1437 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;
289 final ShortcutInfo si1 = makeShortcut( in testSetDynamicShortcuts()
298 final ShortcutInfo si2 = makeShortcut( in testSetDynamicShortcuts()
305 final ShortcutInfo si3 = makeShortcut( in testSetDynamicShortcuts()
353 final ShortcutInfo si1 = makeShortcut("shortcut1"); in testAddDynamicShortcuts()
354 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 …]
/frameworks/base/services/tests/shortcutmanagerutils/src/com/android/server/pm/shortcutmanagertest/
DShortcutManagerTestUtils.java42 import android.content.pm.ShortcutInfo;
392 public static List<ShortcutInfo> filter(List<ShortcutInfo> list, Predicate<ShortcutInfo> p) { in filter()
393 final ArrayList<ShortcutInfo> ret = new ArrayList<>(list); in filter()
398 public static List<ShortcutInfo> filterByActivity(List<ShortcutInfo> list, in filterByActivity()
405 public static List<ShortcutInfo> changedSince(List<ShortcutInfo> list, long time) { in changedSince()
448 public static List<ShortcutInfo> assertShortcutIds(List<ShortcutInfo> actualShortcuts, in assertShortcutIds()
452 for (ShortcutInfo s : actualShortcuts) { in assertShortcutIds()
461 public static List<ShortcutInfo> assertShortcutIdsOrdered(List<ShortcutInfo> actualShortcuts, in assertShortcutIdsOrdered()
465 for (ShortcutInfo s : actualShortcuts) { in assertShortcutIdsOrdered()
472 public static List<ShortcutInfo> assertAllHaveIntents( in assertAllHaveIntents()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DShortcutPackage.java27 import android.content.pm.ShortcutInfo;
137 final private ArrayMap<String, ShortcutInfo> mShortcuts = new ArrayMap<>();
202 ShortcutInfo si = mShortcuts.valueAt(i); in onRestored()
203 si.clearFlags(ShortcutInfo.FLAG_SHADOW); in onRestored()
206 if (restoreBlockReason != ShortcutInfo.DISABLED_REASON_NOT_DISABLED) { in onRestored()
207 si.addFlags(ShortcutInfo.FLAG_DISABLED); in onRestored()
219 public ShortcutInfo findShortcutById(String id) { in findShortcutById()
224 ShortcutInfo si = findShortcutById(id); in isShortcutExistsAndInvisibleToPublisher()
229 ShortcutInfo si = findShortcutById(id); in isShortcutExistsAndVisibleToPublisher()
233 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()
153 shortcut.clearFlags(ShortcutInfo.FLAG_HAS_ICON_FILE | in removeIcon()
154 ShortcutInfo.FLAG_ADAPTIVE_BITMAP | ShortcutInfo.FLAG_HAS_ICON_RES | in removeIcon()
155 ShortcutInfo.FLAG_ICON_FILE_PENDING_SAVE | ShortcutInfo.FLAG_HAS_ICON_URI); in removeIcon()
158 public void saveBitmapLocked(ShortcutInfo shortcut, in saveBitmapLocked()
201 ShortcutInfo.FLAG_HAS_ICON_FILE | ShortcutInfo.FLAG_ICON_FILE_PENDING_SAVE); in saveBitmapLocked()
[all …]
DShortcutRequestPinProcessor.java27 import android.content.pm.ShortcutInfo;
70 public ShortcutInfo getShortcutInfo() { in getShortcutInfo()
176 public final ShortcutInfo shortcutOriginal;
182 public final ShortcutInfo shortcutForLauncher;
189 ShortcutInfo shortcutOriginal, ShortcutInfo shortcutForLauncher, in PinShortcutRequestInner()
201 public ShortcutInfo getShortcutInfo() { in getShortcutInfo()
231 public boolean requestPinItemLocked(ShortcutInfo inShortcut, AppWidgetProviderInfo inAppWidget, in requestPinItemLocked()
275 public Intent createShortcutResultIntent(@NonNull ShortcutInfo inShortcut, int userId) { in createShortcutResultIntent()
298 private PinItemRequest requestPinShortcutLocked(ShortcutInfo inShortcut, in requestPinShortcutLocked()
303 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 …]
DShortcutService.java51 import android.content.pm.ShortcutInfo;
1303 void removeIconLocked(ShortcutInfo shortcut) { in removeIconLocked()
1403 FileOutputStreamWithPath openIconFileForWrite(@UserIdInt int userId, ShortcutInfo shortcut) in openIconFileForWrite()
1428 void saveIconAndFixUpShortcutLocked(ShortcutInfo shortcut) { in saveIconAndFixUpShortcutLocked()
1450 shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_RES); in saveIconAndFixUpShortcutLocked()
1455 shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_URI); in saveIconAndFixUpShortcutLocked()
1459 shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_URI in saveIconAndFixUpShortcutLocked()
1460 | ShortcutInfo.FLAG_ADAPTIVE_BITMAP); in saveIconAndFixUpShortcutLocked()
1473 throw ShortcutInfo.getInvalidIconException(); in saveIconAndFixUpShortcutLocked()
1489 void injectValidateIconResPackage(ShortcutInfo shortcut, Icon icon) { in injectValidateIconResPackage()
[all …]
DShortcutPackageItem.java20 import android.content.pm.ShortcutInfo;
118 long currentVersionCode = ShortcutInfo.VERSION_CODE_UNKNOWN; in attemptToRestoreIfNeededAndSave()
123 restoreBlockReason = ShortcutInfo.DISABLED_REASON_SIGNATURE_MISMATCH; in attemptToRestoreIfNeededAndSave()
133 ShortcutInfo.getDisabledReasonDebugString(restoreBlockReason), in attemptToRestoreIfNeededAndSave()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DShortcutHelperTest.java31 import android.content.pm.ShortcutInfo;
79 ShortcutInfo mShortcutInfo;
214 List<ShortcutInfo> shortcutInfos = new ArrayList<>(); in testListenerNotifiedOnShortcutRemoved()
232 ArrayList<ShortcutInfo> shortcuts = new ArrayList<>(); in testGetValidShortcutInfo_nullShortcut()
243 ShortcutInfo si = mock(ShortcutInfo.class); in testGetValidShortcutInfo_notLongLived()
249 ArrayList<ShortcutInfo> shortcuts = new ArrayList<>(); in testGetValidShortcutInfo_notLongLived()
261 ShortcutInfo si = mock(ShortcutInfo.class); in testGetValidShortcutInfo_notSharingShortcut()
267 ArrayList<ShortcutInfo> shortcuts = new ArrayList<>(); in testGetValidShortcutInfo_notSharingShortcut()
278 ShortcutInfo si = mock(ShortcutInfo.class); in testGetValidShortcutInfo_notEnabled()
284 ArrayList<ShortcutInfo> shortcuts = new ArrayList<>(); in testGetValidShortcutInfo_notEnabled()
[all …]
/frameworks/base/core/java/android/content/pm/
DShortcutManager.java142 public boolean setDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in setDynamicShortcuts()
161 public List<ShortcutInfo> getDynamicShortcuts() { in getDynamicShortcuts()
180 public List<ShortcutInfo> getManifestShortcuts() { in getManifestShortcuts()
208 public List<ShortcutInfo> getShortcuts(@ShortcutMatchFlags int matchFlags) { in getShortcuts()
230 public boolean addDynamicShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in addDynamicShortcuts()
290 public List<ShortcutInfo> getPinnedShortcuts() { in getPinnedShortcuts()
311 public boolean updateShortcuts(@NonNull List<ShortcutInfo> shortcutInfoList) { in updateShortcuts()
586 public boolean requestPinShortcut(@NonNull ShortcutInfo shortcut, in requestPinShortcut()
613 public Intent createShortcutResultIntent(@NonNull ShortcutInfo shortcut) { in createShortcutResultIntent()
671 private final ShortcutInfo mShortcutInfo;
[all …]
DIShortcutChangeCallback.aidl20 import android.content.pm.ShortcutInfo;
32 void onShortcutsAddedOrUpdated(String packageName, in List<ShortcutInfo> shortcuts, in onShortcutsAddedOrUpdated()
35 void onShortcutsRemoved(String packageName, in List<ShortcutInfo> shortcuts, in onShortcutsRemoved()
DIShortcutService.aidl22 import android.content.pm.ShortcutInfo;
41 boolean requestPinShortcut(String packageName, in ShortcutInfo shortcut, in requestPinShortcut()
44 Intent createShortcutResultIntent(String packageName, in ShortcutInfo shortcut, int userId); in createShortcutResultIntent()
80 void pushDynamicShortcut(String packageName, in ShortcutInfo shortcut, int userId); in pushDynamicShortcut()
DIPinItemRequest.aidl20 import android.content.pm.ShortcutInfo;
28 ShortcutInfo getShortcutInfo(); in getShortcutInfo()
DLauncherApps.java324 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) { in onShortcutsChanged()
544 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) {} in onShortcutsAddedOrUpdated()
563 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) {} in onShortcutsRemoved()
581 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) { in onShortcutsAddedOrUpdated()
597 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) { in onShortcutsRemoved()
1029 private List<ShortcutInfo> maybeUpdateDisabledMessage(List<ShortcutInfo> shortcuts) { in maybeUpdateDisabledMessage()
1034 final ShortcutInfo si = shortcuts.get(i); in maybeUpdateDisabledMessage()
1035 final String message = ShortcutInfo.getDisabledReasonForRestoreIssue(mContext, in maybeUpdateDisabledMessage()
1060 public List<ShortcutInfo> getShortcuts(@NonNull ShortcutQuery query, in getShortcuts()
1083 public List<ShortcutInfo> getShortcutInfo(@NonNull String packageName, in getShortcutInfo()
[all …]
/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/services/tests/servicestests/src/com/android/server/people/data/
DDataManagerTest.java60 import android.content.pm.ShortcutInfo;
294 ShortcutInfo shortcut = buildShortcutInfo(TEST_PKG_NAME, USER_ID_PRIMARY, TEST_SHORTCUT_ID, in testReportAppTargetEvent_directSharing()
316 ShortcutInfo shortcut = buildShortcutInfo(TEST_PKG_NAME, USER_ID_PRIMARY, TEST_SHORTCUT_ID, in testReportAppTargetEvent_directSharing_createConversation()
364 ShortcutInfo shortcut = buildShortcutInfo(TEST_PKG_NAME, USER_ID_PRIMARY, TEST_SHORTCUT_ID, in testContactsChanged()
388 ShortcutInfo shortcut = buildShortcutInfo(TEST_PKG_NAME, USER_ID_PRIMARY, TEST_SHORTCUT_ID, in testNotificationPosted()
406 ShortcutInfo shortcut = buildShortcutInfo(TEST_PKG_NAME, USER_ID_PRIMARY, TEST_SHORTCUT_ID, in testNotificationOpened()
408 shortcut.setCached(ShortcutInfo.FLAG_CACHED_NOTIFICATIONS); in testNotificationOpened()
423 eq(ShortcutInfo.FLAG_CACHED_NOTIFICATIONS)); in testNotificationOpened()
430 ShortcutInfo shortcut = buildShortcutInfo(TEST_PKG_NAME, USER_ID_PRIMARY, TEST_SHORTCUT_ID, in testNotificationDismissed()
438 shortcut.setCached(ShortcutInfo.FLAG_CACHED_NOTIFICATIONS); in testNotificationDismissed()
[all …]
DConversationInfoTest.java25 import android.content.pm.ShortcutInfo;
49 .setShortcutFlags(ShortcutInfo.FLAG_LONG_LIVED in testBuild()
50 | ShortcutInfo.FLAG_CACHED_NOTIFICATIONS) in testBuild()
106 .setShortcutFlags(ShortcutInfo.FLAG_LONG_LIVED) in testBuildFromAnotherConversationInfo()
/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/core/java/android/service/notification/
DConversationChannelWrapper.java20 import android.content.pm.ShortcutInfo;
35 private ShortcutInfo mShortcutInfo;
45 mShortcutInfo = in.readParcelable(ShortcutInfo.class.getClassLoader()); in ConversationChannelWrapper()
104 public ShortcutInfo getShortcutInfo() { in getShortcutInfo()
108 public void setShortcutInfo(ShortcutInfo shortcutInfo) { in setShortcutInfo()
/frameworks/base/services/core/java/com/android/server/notification/
DShortcutHelper.java26 import android.content.pm.ShortcutInfo;
101 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) {
166 ShortcutInfo shortcutInfo, ShortcutServiceInternal mShortcutServiceInternal, in isConversationShortcut()
183 ShortcutInfo getValidShortcutInfo(String shortcutId, String packageName, UserHandle user) { in getValidShortcutInfo()
197 List<ShortcutInfo> shortcuts = mLauncherAppsService.getShortcuts(query, user); in getValidShortcutInfo()
198 ShortcutInfo info = shortcuts != null && shortcuts.size() > 0 in getValidShortcutInfo()
213 void cacheShortcut(ShortcutInfo shortcutInfo, UserHandle user) { in cacheShortcut()
217 shortcutInfo.getUserId(), ShortcutInfo.FLAG_CACHED_NOTIFICATIONS); in cacheShortcut()

1234