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

Commit 6a4ea4c8 authored by Cherry Ng's avatar Cherry Ng Committed by Android (Google) Code Review
Browse files

Merge "Revert "Add "incrementEventCountBy" function to OnboardingPrefs."" into tm-dev

parents 6112a28b 514979dd
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);
    }
}