Allow ShortcutPackage#findAll to return cached shortcuts.
Previously cached shortcuts are filtered from the result when it isn't
pinned, which prevents them from being used by other system services.
Bug: 175051424
Test: atest com.android.server.pm.ShortcutManagerTest1
com.android.server.pm.ShortcutManagerTest2
com.android.server.pm.ShortcutManagerTest3
com.android.server.pm.ShortcutManagerTest4
com.android.server.pm.ShortcutManagerTest5
com.android.server.pm.ShortcutManagerTest6
com.android.server.pm.ShortcutManagerTest7
com.android.server.pm.ShortcutManagerTest8
com.android.server.pm.ShortcutManagerTest9
com.android.server.pm.ShortcutManagerTest10
com.android.server.pm.ShortcutManagerTest11
Change-Id: I59b9f867da6291f98ed1d05899fcc9080f47455e
This commit is contained in:
@@ -737,7 +737,7 @@ class ShortcutPackage extends ShortcutPackageItem {
|
||||
|| ((pinnedByCallerSet != null) && pinnedByCallerSet.contains(si.getId()));
|
||||
|
||||
if (!getPinnedByAnyLauncher) {
|
||||
if (si.isFloating()) {
|
||||
if (si.isFloating() && !si.isCached()) {
|
||||
if (!isPinnedByCaller) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user