FullAvatarUpgradeUtils.java 1.75 KB
package com.bitstrips.imoji.onboarding.upgrade;

import com.bitstrips.imoji.abv3.AvatarBuilderGender;
import com.bitstrips.imoji.util.PreferenceUtils;
import java.util.Calendar;
import java.util.Date;
import java.util.concurrent.TimeUnit;

public final class FullAvatarUpgradeUtils
{
  public static AvatarBuilderGender getAvatarBuilderGender(PreferenceUtils paramPreferenceUtils)
  {
    return AvatarBuilderGender.fromValue(paramPreferenceUtils.getInt(2131231172, -1).intValue());
  }
  
  public static int getTimesShown(PreferenceUtils paramPreferenceUtils)
  {
    return paramPreferenceUtils.getInt(2131231337, 0).intValue();
  }
  
  public static boolean isOverDateLimitSinceShown(PreferenceUtils paramPreferenceUtils)
  {
    paramPreferenceUtils = new Date(paramPreferenceUtils.getLong(2131231338, 0L).longValue());
    Date localDate = Calendar.getInstance().getTime();
    return TimeUnit.MILLISECONDS.toDays(localDate.getTime() - paramPreferenceUtils.getTime()) >= 1L;
  }
  
  public static boolean isUnderTimesShownLimit(PreferenceUtils paramPreferenceUtils)
  {
    boolean bool = false;
    if (paramPreferenceUtils.getInt(2131231337, 0).intValue() < 3) {
      bool = true;
    }
    return bool;
  }
  
  public static void setDateShown(PreferenceUtils paramPreferenceUtils)
  {
    paramPreferenceUtils.putLong(2131231338, Calendar.getInstance().getTime().getTime());
  }
  
  public static void setTimesShown(PreferenceUtils paramPreferenceUtils)
  {
    paramPreferenceUtils.putInt(2131231337, paramPreferenceUtils.getInt(2131231337, 0).intValue() + 1);
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/onboarding/upgrade/FullAvatarUpgradeUtils.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */