Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 110f1d8b authored by Pinyao Ting's avatar Pinyao Ting Committed by Android (Google) Code Review
Browse files

Merge "Restrict number of shortcuts can be added through addDynamicShortcuts" into sc-dev

parents b25ee866 3215e73e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -359,6 +359,7 @@ class ShortcutPackage extends ShortcutPackageItem {
        // Extract Icon and update the icon res ID and the bitmap path.
        s.saveIconAndFixUpShortcutLocked(newShortcut);
        s.fixUpShortcutResourceNamesAndValues(newShortcut);
        ensureShortcutCountBeforePush();
        saveShortcut(newShortcut);
    }

@@ -405,7 +406,6 @@ class ShortcutPackage extends ShortcutPackageItem {
            @NonNull List<ShortcutInfo> changedShortcuts) {
        Preconditions.checkArgument(newShortcut.isEnabled(),
                "pushDynamicShortcuts() cannot publish disabled shortcuts");
        ensureShortcutCountBeforePush();

        newShortcut.addFlags(ShortcutInfo.FLAG_DYNAMIC);