Implement ranking for shortcuts.
- Manifest shortcuts are closest to the original icon, in rank order, followed by dynamic shortcuts in rank order. - Also prevent pinned shortcuts from showing in container if they aren't also dynamic (only manifest and dynamic show in container). Bug: 29822383 Bug: 29946657 Change-Id: I5cdb2ef3700daedca01987f64c245beb3f4aa5ee
This commit is contained in:
@@ -81,11 +81,13 @@ public class DeepShortcutManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the shortcuts associated with the given package and user.
|
||||
* Gets all the manifest and dynamic shortcuts associated with the given package and user,
|
||||
* to be displayed in the shortcuts container on long press.
|
||||
*/
|
||||
public List<ShortcutInfoCompat> queryForAllAppShortcuts(ComponentName activity,
|
||||
public List<ShortcutInfoCompat> queryForShortcutsContainer(ComponentName activity,
|
||||
List<String> ids, UserHandleCompat user) {
|
||||
return query(FLAG_GET_ALL, activity.getPackageName(), activity, ids, user);
|
||||
return query(FLAG_MATCH_MANIFEST | FLAG_MATCH_DYNAMIC,
|
||||
activity.getPackageName(), activity, ids, user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user