Home
last modified time | relevance | path

Searched refs:shortcutInfo (Results 1 – 25 of 31) sorted by relevance

12

/packages/apps/Launcher3/src/com/android/launcher3/model/data/
DWorkspaceItemInfo.java127 public WorkspaceItemInfo(ShortcutInfo shortcutInfo, Context context) { in WorkspaceItemInfo() argument
128 user = shortcutInfo.getUserHandle(); in WorkspaceItemInfo()
130 updateFromDeepShortcutInfo(shortcutInfo, context); in WorkspaceItemInfo()
169 public void updateFromDeepShortcutInfo(@NonNull final ShortcutInfo shortcutInfo, in updateFromDeepShortcutInfo() argument
172 intent = ShortcutKey.makeIntent(shortcutInfo); in updateFromDeepShortcutInfo()
173 title = shortcutInfo.getShortLabel(); in updateFromDeepShortcutInfo()
175 CharSequence label = shortcutInfo.getLongLabel(); in updateFromDeepShortcutInfo()
177 label = shortcutInfo.getShortLabel(); in updateFromDeepShortcutInfo()
180 if (shortcutInfo.isEnabled()) { in updateFromDeepShortcutInfo()
185 disabledMessage = shortcutInfo.getDisabledMessage(); in updateFromDeepShortcutInfo()
[all …]
/packages/apps/Dialer/java/com/android/dialer/shortcuts/
DPinnedShortcuts.java98 for (ShortcutInfo shortcutInfo : shortcutManager.getPinnedShortcuts()) { in refresh()
99 if (shortcutInfo.isDeclaredInManifest()) { in refresh()
103 if (shortcutInfo.isDynamic()) { in refresh()
111 if (shortcutInfo.getIntent() != null) { in refresh()
112 action = shortcutInfo.getIntent().getAction(); in refresh()
118 String lookupKey = DialerShortcut.getLookupKeyFromShortcutInfo(shortcutInfo); in refresh()
119 Uri lookupUri = DialerShortcut.getLookupUriFromShortcutInfo(shortcutInfo); in refresh()
126 delta.shortcutIdsToDisable.add(shortcutInfo.getId()); in refresh()
141 if (shortcut.needsUpdate(shortcutInfo)) { in refresh()
143 delta.shortcutsToUpdateById.put(shortcutInfo.getId(), shortcut); in refresh()
DDialerShortcut.java82 static String getDisplayNameFromShortcutInfo(ShortcutInfo shortcutInfo) { in getDisplayNameFromShortcutInfo() argument
83 return shortcutInfo.getShortLabel().toString(); in getDisplayNameFromShortcutInfo()
104 static String getLookupKeyFromShortcutInfo(@NonNull ShortcutInfo shortcutInfo) { in getLookupKeyFromShortcutInfo() argument
105 return shortcutInfo.getId(); // Lookup keys are used for shortcut IDs. in getLookupKeyFromShortcutInfo()
117 static Uri getLookupUriFromShortcutInfo(@NonNull ShortcutInfo shortcutInfo) { in getLookupUriFromShortcutInfo() argument
119 shortcutInfo.getIntent().getLongExtra(ShortcutInfoFactory.EXTRA_CONTACT_ID, -1); in getLookupUriFromShortcutInfo()
121 throw new IllegalStateException("No contact ID found for shortcut: " + shortcutInfo.getId()); in getLookupUriFromShortcutInfo()
123 String lookupKey = getLookupKeyFromShortcutInfo(shortcutInfo); in getLookupUriFromShortcutInfo()
DIconFactory.java72 public Icon create(@NonNull ShortcutInfo shortcutInfo) { in create() argument
75 DialerShortcut.getLookupUriFromShortcutInfo(shortcutInfo), in create()
76 DialerShortcut.getDisplayNameFromShortcutInfo(shortcutInfo), in create()
77 DialerShortcut.getLookupKeyFromShortcutInfo(shortcutInfo)); in create()
DShortcutInfoFactory.java69 ShortcutInfo.Builder shortcutInfo = in buildShortcutInfos() local
77 shortcutInfo.setRank(shortcut.getRank()); in buildShortcutInfos()
79 shortcuts.add(shortcutInfo.build()); in buildShortcutInfos()
/packages/apps/Launcher3/src/com/android/launcher3/model/
DItemInstallQueue.java254 @Nullable ShortcutInfo shortcutInfo; field in ItemInstallQueue.PendingInstallShortcutInfo
274 shortcutInfo = info; in PendingInstallShortcutInfo()
324 WorkspaceItemInfo itemInfo = new WorkspaceItemInfo(shortcutInfo, context); in getItemInfo()
326 .getShortcutIcon(itemInfo, shortcutInfo); in getItemInfo()
327 return Pair.create(itemInfo, shortcutInfo); in getItemInfo()
355 boolean shortcutInfoMatches = shortcutInfo == null in equals()
356 ? other.shortcutInfo == null in equals()
357 : other.shortcutInfo != null in equals()
358 && shortcutInfo.getId().equals(other.shortcutInfo.getId()) in equals()
359 && shortcutInfo.getPackage().equals(other.shortcutInfo.getPackage()); in equals()
/packages/apps/Launcher3/src/com/android/launcher3/icons/
DShortcutCachingLogic.java86 public long getLastUpdatedTime(@Nullable ShortcutInfo shortcutInfo, in getLastUpdatedTime() argument
88 if (shortcutInfo == null) { in getLastUpdatedTime()
91 return Math.max(shortcutInfo.getLastChangedTimestamp(), info.lastUpdateTime); in getLastUpdatedTime()
103 public static Drawable getIcon(Context context, ShortcutInfo shortcutInfo, int density) { in getIcon() argument
109 .getShortcutIconDrawable(shortcutInfo, density); in getIcon()
DIconCache.java256 public BitmapInfo getShortcutInfoBadge(ShortcutInfo shortcutInfo) { in getShortcutInfoBadge() argument
257 ComponentName cn = shortcutInfo.getActivity(); in getShortcutInfoBadge()
261 appInfo.user = shortcutInfo.getUserHandle(); in getShortcutInfoBadge()
269 String pkg = shortcutInfo.getPackage(); in getShortcutInfoBadge()
270 String override = shortcutInfo.getExtras() == null ? null in getShortcutInfoBadge()
271 : shortcutInfo.getExtras().getString(EXTRA_SHORTCUT_BADGE_OVERRIDE_PACKAGE); in getShortcutInfoBadge()
274 .isTrustedPackage(pkg, shortcutInfo.getUserHandle())) { in getShortcutInfoBadge()
277 PackageItemInfo pkgInfo = new PackageItemInfo(pkg, shortcutInfo.getUserHandle()); in getShortcutInfoBadge()
/packages/modules/IntentResolver/java/src/com/android/intentresolver/shortcuts/
DShortcutToChooserTargetConverter.java73 ShortcutInfo shortcutInfo = matchingShortcuts.get(i).getShortcutInfo(); in convertToChooserTarget() local
82 int rankIndex = scoreList.indexOf(shortcutInfo.getRank()); in convertToChooserTarget()
87 extras.putString(Intent.EXTRA_SHORTCUT_ID, shortcutInfo.getId()); in convertToChooserTarget()
90 shortcutInfo.getLabel(), in convertToChooserTarget()
100 directShareShortcutInfoCache.put(chooserTarget, shortcutInfo); in convertToChooserTarget()
DShortcutLoader.kt174 val shortcutInfo = appTarget.shortcutInfo in <lambda>() constant
177 if (shortcutInfo != null && className != null && pm.isPackageEnabled(packageName)) { in <lambda>()
179 ShareShortcutInfo(shortcutInfo, ComponentName(packageName, className)) in <lambda>()
/packages/modules/IntentResolver/java/src/com/android/intentresolver/chooser/
DSelectableTargetInfo.java111 @Nullable ShortcutInfo shortcutInfo, in newSelectableTargetInfo() argument
123 shortcutInfo, in newSelectableTargetInfo()
148 @Nullable ShortcutInfo shortcutInfo, in newSelectableTargetInfo() argument
161 shortcutInfo, in newSelectableTargetInfo()
176 @Nullable ShortcutInfo shortcutInfo, in SelectableTargetInfo() argument
183 mShortcutInfo = shortcutInfo; in SelectableTargetInfo()
191 mIsPinned = (shortcutInfo != null) && shortcutInfo.isPinned(); in SelectableTargetInfo()
/packages/modules/IntentResolver/java/tests/src/com/android/intentresolver/chooser/
DTargetInfoTest.kt91 val shortcutInfo = createShortcutInfo("id", ResolverDataProvider.createComponentName(3), 3) in testNewSelectableTargetInfo() constant
104 shortcutInfo, in testNewSelectableTargetInfo()
112 assertThat(targetInfo.directShareShortcutId).isEqualTo(shortcutInfo.id) in testNewSelectableTargetInfo()
113 assertThat(targetInfo.directShareShortcutInfo).isSameInstanceAs(shortcutInfo) in testNewSelectableTargetInfo()
123 val shortcutInfo = createShortcutInfo("id", ResolverDataProvider.createComponentName(2), 3) in test_SelectableTargetInfo_componentName_no_source_info() constant
144 shortcutInfo, in test_SelectableTargetInfo_componentName_no_source_info()
165 val shortcutInfo = createShortcutInfo("id", ResolverDataProvider.createComponentName(3), 3) in testSelectableTargetInfo_noSourceIntentMatchingProposedRefinement() constant
178 shortcutInfo, in testSelectableTargetInfo_noSourceIntentMatchingProposedRefinement()
/packages/modules/IntentResolver/java/tests/src/com/android/intentresolver/
DTestHelpers.kt55 internal fun createAppTarget(shortcutInfo: ShortcutInfo) = in createAppTarget()
57 AppTargetId(shortcutInfo.id), in createAppTarget()
58 shortcutInfo, in createAppTarget()
59 shortcutInfo.activity?.className ?: error("missing activity info") in createAppTarget()
/packages/apps/Launcher3/src/com/android/launcher3/shortcuts/
DShortcutKey.java45 public static ShortcutKey fromInfo(ShortcutInfo shortcutInfo) { in fromInfo() argument
46 return new ShortcutKey(shortcutInfo.getPackage(), shortcutInfo.getUserHandle(), in fromInfo()
47 shortcutInfo.getId()); in fromInfo()
/packages/modules/IntentResolver/java/src/com/android/intentresolver/
DShortcutSelectionLogic.java101 ShortcutInfo shortcutInfo = isShortcutResult ? directShareToShortcutInfos.get(target) in addServiceResults() local
103 if ((shortcutInfo != null) && shortcutInfo.isPinned()) { in addServiceResults()
125 shortcutInfo, in addServiceResults()
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/
DAddItemActivity.java279 PinShortcutRequestActivityInfo shortcutInfo = in setupShortcut() local
281 mWidgetCell.getWidgetView().setTag(new PendingAddShortcutInfo(shortcutInfo)); in setupShortcut()
283 () -> new WidgetItem(shortcutInfo, mApp.getIconCache(), getPackageManager())); in setupShortcut()
340 ShortcutInfo shortcutInfo = mRequest.getShortcutInfo(); in onPlaceAutomaticallyClick() local
341 ItemInstallQueue.INSTANCE.get(this).queueItem(shortcutInfo); in onPlaceAutomaticallyClick()
344 CharSequence label = shortcutInfo.getLongLabel(); in onPlaceAutomaticallyClick()
346 label = shortcutInfo.getShortLabel(); in onPlaceAutomaticallyClick()
/packages/apps/Contacts/src/com/android/contacts/
DShortcutIntentBuilder.java287 final ShortcutInfo shortcutInfo = dynamicShortcuts.getQuickContactShortcutInfo( in createContactShortcutIntent() local
289 if (shortcutInfo != null) { in createContactShortcutIntent()
290 intent = sm.createShortcutResultIntent(shortcutInfo); in createContactShortcutIntent()
349 final ShortcutInfo shortcutInfo = dynamicShortcuts.getActionShortcutInfo( in createPhoneNumberShortcutIntent() local
351 if (shortcutInfo != null) { in createPhoneNumberShortcutIntent()
352 intent = sm.createShortcutResultIntent(shortcutInfo); in createPhoneNumberShortcutIntent()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DSplitSelectStateController.java346 final ShortcutInfo shortcutInfo = getShortcutInfo(intent, user); in launchIntentOrShortcut() local
347 if (shortcutInfo != null) { in launchIntentOrShortcut()
348 mSystemUiProxy.startShortcutAndTask(shortcutInfo, in launchIntentOrShortcut()
362 final ShortcutInfo shortcutInfo = getShortcutInfo(intent, user); in launchIntentOrShortcutLegacy() local
363 if (shortcutInfo != null) { in launchIntentOrShortcutLegacy()
364 mSystemUiProxy.startShortcutAndTaskWithLegacyTransition(shortcutInfo, in launchIntentOrShortcutLegacy()
/packages/apps/Launcher3/tests/src/com/android/launcher3/testcomponent/
DCustomShortcutConfigActivity.java51 ShortcutInfo shortcutInfo = in createShortcutResultIntent() local
54 return sm.createShortcutResultIntent(shortcutInfo); in createShortcutResultIntent()
/packages/apps/Settings/src/com/android/settings/accessibility/
DLaunchAccessibilityActivityPreferenceFragment.java163 AccessibilityShortcutInfo shortcutInfo = infos.get(i); in getAccessibilityShortcutInfo() local
164 ActivityInfo activityInfo = shortcutInfo.getActivityInfo(); in getAccessibilityShortcutInfo()
167 return shortcutInfo; in getAccessibilityShortcutInfo()
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/model/
DAppEventProducer.java201 ShortcutInfo shortcutInfo = null; in toAppTarget() local
220 shortcutInfo = opt.get(); in toAppTarget()
246 if (shortcutInfo != null) { in toAppTarget()
247 return new AppTarget.Builder(new AppTargetId(id), shortcutInfo).build(); in toAppTarget()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
DImageActionsApi.java128 public void shareImage(RectF rectF, ShortcutInfo shortcutInfo, AppTarget appTarget) { in shareImage() argument
129 ImageActionUtils.shareImage(mContext, mBitmapSupplier, rectF, shortcutInfo, appTarget, TAG); in shareImage()
DSystemUiProxy.java629 public void startShortcutAndTask(ShortcutInfo shortcutInfo, Bundle options1, int taskId, in startShortcutAndTask() argument
634 mSplitScreen.startShortcutAndTask(shortcutInfo, options1, taskId, options2, in startShortcutAndTask()
672 public void startShortcutAndTaskWithLegacyTransition(ShortcutInfo shortcutInfo, Bundle options1, in startShortcutAndTaskWithLegacyTransition() argument
677 mSplitScreen.startShortcutAndTaskWithLegacyTransition(shortcutInfo, options1, in startShortcutAndTaskWithLegacyTransition()
/packages/modules/IntentResolver/java/tests/src/com/android/intentresolver/shortcuts/
DShortcutToChooserTargetConverterTest.kt51 val appTargets = shortcuts.map { createAppTarget(it.shortcutInfo) } in <lambda>()
151 val si = shortcuts[expectedOrder[i]].shortcutInfo in <lambda>()
/packages/apps/Contacts/tests/src/com/android/contacts/
DDynamicShortcutsTests.java355 private ShortcutInfo makeDynamic(ShortcutInfo shortcutInfo) throws Exception {
358 addFlagsMethod.invoke(shortcutInfo, 1);
359 return shortcutInfo;

12