Merge "Allows pinned-only shortcuts to get cached" into rvc-dev am: 6184b48e6e

Change-Id: Ifd9099232b660a0bf6c35141ab0cfef20dd28b47
This commit is contained in:
Mehdi Alizadeh
2020-05-20 21:00:02 +00:00
committed by Automerger Merge Worker

View File

@@ -3103,15 +3103,15 @@ public class ShortcutService extends IShortcutService.Stub {
}
if (doCache) {
if (si.isDynamic() && si.isLongLived()) {
if (si.isLongLived()) {
si.addFlags(ShortcutInfo.FLAG_CACHED);
if (changedShortcuts == null) {
changedShortcuts = new ArrayList<>(1);
}
changedShortcuts.add(si);
} else {
Log.w(TAG, "Only dynamic long lived shortcuts can get cached. Ignoring"
+ "shortcut " + si.getId());
Log.w(TAG, "Only long lived shortcuts can get cached. Ignoring id "
+ si.getId());
}
} else {
ShortcutInfo removed = null;