コード例 #1
0
  public void logAppStart() {
    final long currentMillis = System.currentTimeMillis();

    appSettings.lastLaunchTime().put(currentMillis);
    appSettings.firstLaunchTime().put(appSettings.firstLaunchTime().get(currentMillis));
    appSettings.launchCount().put(appSettings.launchCount().get(0) + 1);
  }
コード例 #2
0
  public boolean shouldShowRatingDialog() {
    if (appSettings.hasShownAppRatingDialog().get(false)) {
      return false;
    } else {
      final long lastLaunchTime = appSettings.lastLaunchTime().get(Long.MAX_VALUE);
      final long firstLaunchTime = appSettings.firstLaunchTime().get(Long.MAX_VALUE);
      final int launchCount = appSettings.launchCount().get(0);

      return shouldShow(firstLaunchTime, lastLaunchTime, launchCount);
    }
  }
コード例 #3
0
 public void setHasShownRatingDialog(boolean hasShown) {
   appSettings.hasShownAppRatingDialog().put(hasShown);
 }