Merge "Allows pinned-only shortcuts to get cached" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6184b48e6e
@@ -3103,15 +3103,15 @@ public class ShortcutService extends IShortcutService.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (doCache) {
|
if (doCache) {
|
||||||
if (si.isDynamic() && si.isLongLived()) {
|
if (si.isLongLived()) {
|
||||||
si.addFlags(ShortcutInfo.FLAG_CACHED);
|
si.addFlags(ShortcutInfo.FLAG_CACHED);
|
||||||
if (changedShortcuts == null) {
|
if (changedShortcuts == null) {
|
||||||
changedShortcuts = new ArrayList<>(1);
|
changedShortcuts = new ArrayList<>(1);
|
||||||
}
|
}
|
||||||
changedShortcuts.add(si);
|
changedShortcuts.add(si);
|
||||||
} else {
|
} else {
|
||||||
Log.w(TAG, "Only dynamic long lived shortcuts can get cached. Ignoring"
|
Log.w(TAG, "Only long lived shortcuts can get cached. Ignoring id "
|
||||||
+ "shortcut " + si.getId());
|
+ si.getId());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ShortcutInfo removed = null;
|
ShortcutInfo removed = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user