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

Commit d89f7046 authored by Cherry Ng's avatar Cherry Ng Committed by Automerger Merge Worker
Browse files

Merge "Revert "Add "incrementEventCountBy" function to OnboardingPrefs."" into...

Merge "Revert "Add "incrementEventCountBy" function to OnboardingPrefs."" into tm-dev am: 6a4ea4c8 am: f05363a7

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



Change-Id: I2c64a8cb9bd2397b74b2d99aee65838a2b70df3d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 4c48d574 f05363a7
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -140,19 +140,4 @@ public class OnboardingPrefs<T extends ActivityContext> {
        mSharedPrefs.edit().putInt(eventKey, count).apply();
        return hasReachedMaxCount(count, eventKey);
    }

    /**
     * Add "incCountBy" to the given event count, if we haven't already reached the max count.
     *
     * @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;
        mSharedPrefs.edit().putInt(eventKey, count).apply();
        return hasReachedMaxCount(count, eventKey);
    }
}