Merge "Revert "Add "incrementEventCountBy" function to OnboardingPrefs."" into tm-dev am: 6a4ea4c849
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18568158 Change-Id: I89bd700f3fdbc31efc5d0ebb4b05135e23e50bc2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user