summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pinyao Ting <pinyaoting@google.com> 2023-09-27 02:05:35 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-09-27 02:05:35 +0000
commit1d43ff794cf543c99f4535f03f8e69b4a6c98392 (patch)
tree93a16e8c5602b0b5fa252ac701144c866f26124b
parentbc9059ae54a38bcc39887e29421863f7badd0dfc (diff)
parent5498e00728975718c7fb7ffd3af732c5b9211e45 (diff)
Merge "Restrict number of shortcuts can be added through addDynamicShortcuts" into sc-dev am: 110f1d8b26 am: ab7d63a77e am: fb370205d3 am: ebab9abbd8 am: 5498e00728
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23623415 Change-Id: If2ec1f0ccc61a5d86a818d514be9de94cb549632 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--services/core/java/com/android/server/pm/ShortcutPackage.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/ShortcutPackage.java b/services/core/java/com/android/server/pm/ShortcutPackage.java
index 921233132931..5a662d9f3139 100644
--- a/services/core/java/com/android/server/pm/ShortcutPackage.java
+++ b/services/core/java/com/android/server/pm/ShortcutPackage.java
@@ -376,6 +376,7 @@ class ShortcutPackage extends ShortcutPackageItem {
// Extract Icon and update the icon res ID and the bitmap path.
s.saveIconAndFixUpShortcutLocked(this, newShortcut);
s.fixUpShortcutResourceNamesAndValues(newShortcut);
+ ensureShortcutCountBeforePush();
saveShortcut(newShortcut);
}
@@ -430,7 +431,6 @@ class ShortcutPackage extends ShortcutPackageItem {
@NonNull List<ShortcutInfo> changedShortcuts) {
Preconditions.checkArgument(newShortcut.isEnabled(),
"pushDynamicShortcuts() cannot publish disabled shortcuts");
- ensureShortcutCountBeforePush();
newShortcut.addFlags(ShortcutInfo.FLAG_DYNAMIC);