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

Commit 13df7c43 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Adds helper methods in SearchUiManager and OnboardingPrefs." into...

Merge "Adds helper methods in SearchUiManager and OnboardingPrefs." into tm-dev am: dd053e79 am: 6b390b8c

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18631233



Change-Id: Ib62c619c43e54b11d794a2222e31aeca2ac9f722
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e048af30 6b390b8c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -68,4 +68,9 @@ public interface SearchUiManager {

    /** Refresh the currently displayed list of results. */
    default void refreshResults() {}

    /** Returns whether search is in zero state. */
    default boolean inZeroState() {
        return false;
    }
}
+2 −7
Original line number Diff line number Diff line
@@ -142,16 +142,11 @@ public class OnboardingPrefs<T extends ActivityContext> {
    }

    /**
     * Add "incCountBy" to the given event count, if we haven't already reached the max count.
     * Sets the event count to the given value.
     *
     * @return Whether we have now reached the max count.
     */
    public boolean incrementEventCountBy(int incCountBy, @EventCountKey String eventKey) {
        int count = getCount(eventKey);
        if (hasReachedMaxCount(count, eventKey)) {
            return true;
        }
        count += incCountBy;
    public boolean setEventCount(int count, @EventCountKey String eventKey) {
        mSharedPrefs.edit().putInt(eventKey, count).apply();
        return hasReachedMaxCount(count, eventKey);
    }