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);
  }
  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);
    }
  }
 public void setHasShownRatingDialog(boolean hasShown) {
   appSettings.hasShownAppRatingDialog().put(hasShown);
 }