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

Commit 514979dd authored by Anushree Ganjam's avatar Anushree Ganjam
Browse files

Revert "Add "incrementEventCountBy" function to OnboardingPrefs."

Revert submission 18500283-dismissEduCard

Reason for revert: Reverting because of build failures.
Reverted Changes:
I727cefb70:Save the value to sharedPreference When edu card i...
I180ab3bd6:Add "incrementEventCountBy" function to Onboarding...

Change-Id: Ia39781c78776a629d4678c78dd4ca75f49abbb6d
parent 0d345e5e
Loading
Loading
Loading
Loading
+0 −15
Original line number Original line Diff line number Diff line
@@ -140,19 +140,4 @@ public class OnboardingPrefs<T extends ActivityContext> {
        mSharedPrefs.edit().putInt(eventKey, count).apply();
        mSharedPrefs.edit().putInt(eventKey, count).apply();
        return hasReachedMaxCount(count, eventKey);
        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);
    }
}
}