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

Commit 3d2ff4c2 authored by Mehdi Alizadeh's avatar Mehdi Alizadeh
Browse files

Change ShortcutInfo.Builder.setLongLived to take a boolean

Bug: 126179815
Test: atest com.android.server.pm.ShortcutManagerTest2
Change-Id: Ibc59aa3698275068c17565b66c957d84bb4a8c4b
parent 387c7cb1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12016,7 +12016,7 @@ package android.content.pm {
    method @NonNull public android.content.pm.ShortcutInfo.Builder setIntents(@NonNull android.content.Intent[]);
    method @NonNull public android.content.pm.ShortcutInfo.Builder setLocusId(@NonNull android.content.LocusId);
    method @NonNull public android.content.pm.ShortcutInfo.Builder setLongLabel(@NonNull CharSequence);
    method @NonNull public android.content.pm.ShortcutInfo.Builder setLongLived();
    method @NonNull public android.content.pm.ShortcutInfo.Builder setLongLived(boolean);
    method @NonNull public android.content.pm.ShortcutInfo.Builder setPerson(@NonNull android.app.Person);
    method @NonNull public android.content.pm.ShortcutInfo.Builder setPersons(@NonNull android.app.Person[]);
    method @NonNull public android.content.pm.ShortcutInfo.Builder setRank(int);
+2 −2
Original line number Diff line number Diff line
@@ -1270,8 +1270,8 @@ public final class ShortcutInfo implements Parcelable {
         * system services even after it has been unpublished as a dynamic shortcut.
         */
        @NonNull
        public Builder setLongLived() {
            mIsLongLived = true;
        public Builder setLongLived(boolean londLived) {
            mIsLongLived = londLived;
            return this;
        }

+2 −2
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ public class ShortcutManagerTest2 extends BaseShortcutManagerTest {
                .setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"))
                .setRank(123)
                .setPerson(makePerson("person", "personKey", "personUri"))
                .setLongLived()
                .setLongLived(true)
                .setExtras(pb)
                .build();
        si.addFlags(ShortcutInfo.FLAG_PINNED);
@@ -352,7 +352,7 @@ public class ShortcutManagerTest2 extends BaseShortcutManagerTest {
                .setIntent(makeIntent("action", ShortcutActivity.class, "key", "val"))
                .setRank(123)
                .setPerson(makePerson("person", "personKey", "personUri"))
                .setLongLived()
                .setLongLived(true)
                .setExtras(pb)
                .build();
        sorig.addFlags(ShortcutInfo.FLAG_PINNED);