RateMePreferencesHelper.smali
.class public Lhurriyet/mobil/android/hurriyet/features/rateme/RateMePreferencesHelper;
.super Ljava/lang/Object;
.source "RateMePreferencesHelper.java"
# static fields
.field private static final KEY_ALLOWED_TIME:Ljava/lang/String; = "KEY_ALLOWED_TIME"
.field private static final KEY_ALLOWED_VERSION:Ljava/lang/String; = "KEY_ALLOWED_VERSION"
.field private static final KEY_DELAY_TIME_VALUE:Ljava/lang/String; = "KEY_DELAY_TIME_VALUE"
.field private static final KEY_IS_ENABLED:Ljava/lang/String; = "KEY_IS_ENABLED"
.field private static final KEY_IS_USER_RATED:Ljava/lang/String; = "KEY_IS_USER_RATED"
.field private static final KEY_PV_THRESHOLD:Ljava/lang/String; = "KEY_PV_THRESHOLD"
.field private static final KEY_REFUSE_THRESHOLD:Ljava/lang/String; = "KEY_REFUSE_THRESHOLD"
.field private static final KEY_SKIP_RATE_ME_FIRST:Ljava/lang/String; = "KEY_SKIP_RATE_ME_FIRST"
.field private static final KEY_TOTAL_REFUSE:Ljava/lang/String; = "KEY_TOTAL_REFUSE"
.field private static final KEY_TOTAL_VISIBILITY:Ljava/lang/String; = "KEY_TOTAL_VISIBILITY"
.field private static final KEY_VISIBILITY_THRESHOLD:Ljava/lang/String; = "KEY_VISIBILITY_THRESHOLD"
# direct methods
.method public constructor <init>()V
.registers 1
.line 15
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getIfSkipRateMeFirst()Z
.registers 3
.line 133
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_SKIP_RATE_ME_FIRST"
.line 134
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result v0
return v0
.end method
.method public static getIfUserRated()Z
.registers 3
.line 117
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_IS_USER_RATED"
.line 118
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result v0
return v0
.end method
.method public static getLauncherPvThreshold()I
.registers 3
.line 40
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_session"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_PV_THRESHOLD"
const/4 v2, 0x7
.line 41
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
.method public static getRateMeAllowedTime()J
.registers 4
.line 103
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_ALLOWED_TIME"
const-wide/16 v2, 0x0
.line 104
invoke-interface {v0, v1, v2, v3}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
move-result-wide v0
return-wide v0
.end method
.method public static getRateMeAllowedVersion()I
.registers 4
.line 90
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getPackageInfo()Landroid/content/pm/PackageInfo;
move-result-object v0
.line 91
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v1
const-string v2, "pref_device"
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v1
if-nez v0, :cond_12
goto :goto_14
.line 92
:cond_12
iget v3, v0, Landroid/content/pm/PackageInfo;->versionCode:I
:goto_14
const-string v0, "KEY_ALLOWED_VERSION"
invoke-interface {v1, v0, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
.method public static getRateMeDelayTimeValue()I
.registers 3
.line 55
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_DELAY_TIME_VALUE"
const/4 v2, 0x7
.line 56
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
.method public static getRefuseThreshold()I
.registers 3
.line 45
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_session"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_REFUSE_THRESHOLD"
const/4 v2, 0x2
.line 46
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
.method public static getTotalRefuseCount()I
.registers 3
.line 66
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_TOTAL_REFUSE"
.line 67
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
.method public static getTotalVisibilityCount()I
.registers 3
.line 78
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_TOTAL_VISIBILITY"
.line 79
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
.method public static getVisibilityThreshold()I
.registers 3
.line 50
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_session"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_VISIBILITY_THRESHOLD"
const/4 v2, 0x3
.line 51
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
.method public static isEnabled()Z
.registers 3
.line 60
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_session"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_IS_ENABLED"
const/4 v2, 0x1
.line 61
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result v0
return v0
.end method
.method public static setConfigurations(IIIIZ)V
.registers 8
.line 31
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_session"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
.line 32
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v1
const-string v2, "KEY_PV_THRESHOLD"
invoke-interface {v1, v2, p0}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
.line 33
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const-string v1, "KEY_REFUSE_THRESHOLD"
invoke-interface {p0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
.line 34
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const-string p1, "KEY_VISIBILITY_THRESHOLD"
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
.line 35
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const-string p1, "KEY_DELAY_TIME_VALUE"
invoke-interface {p0, p1, p3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
.line 36
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const-string p1, "KEY_IS_ENABLED"
invoke-interface {p0, p1, p4}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
return-void
.end method
.method public static setRateMeAllowedTimeIncreasingBy(II)V
.registers 6
.line 108
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
.line 109
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
move-result-object v1
.line 110
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
invoke-virtual {v1, v2, v3}, Ljava/util/Calendar;->setTimeInMillis(J)V
.line 111
invoke-virtual {v1, p0, p1}, Ljava/util/Calendar;->add(II)V
.line 112
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-virtual {v1}, Ljava/util/Calendar;->getTimeInMillis()J
move-result-wide v0
const-string p1, "KEY_ALLOWED_TIME"
invoke-interface {p0, p1, v0, v1}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
return-void
.end method
.method public static setRateMeAllowedVersionIncreasingBy(I)V
.registers 5
.line 96
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getPackageInfo()Landroid/content/pm/PackageInfo;
move-result-object v0
.line 97
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v1
const-string v2, "pref_device"
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v1
.line 98
invoke-interface {v1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v1
if-nez v0, :cond_16
goto :goto_1a
:cond_16
iget v0, v0, Landroid/content/pm/PackageInfo;->versionCode:I
add-int v3, v0, p0
:goto_1a
const-string p0, "KEY_ALLOWED_VERSION"
invoke-interface {v1, p0, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
return-void
.end method
.method public static setSkipRateMeFirst(Z)V
.registers 4
.line 128
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
.line 129
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
const-string v1, "KEY_SKIP_RATE_ME_FIRST"
invoke-interface {v0, v1, p0}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
return-void
.end method
.method public static setTotalRefuseIncreasingByOne()V
.registers 3
.line 71
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_TOTAL_REFUSE"
.line 72
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v2
add-int/lit8 v2, v2, 0x1
.line 73
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V
return-void
.end method
.method public static setTotalVisibilityIncreasingByOne()V
.registers 3
.line 83
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "KEY_TOTAL_VISIBILITY"
.line 84
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v2
add-int/lit8 v2, v2, 0x1
.line 85
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V
return-void
.end method
.method public static setUserHasRated(Z)V
.registers 4
.line 122
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v0
const-string v1, "pref_device"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
.line 123
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
const-string v1, "KEY_IS_USER_RATED"
invoke-interface {v0, v1, p0}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
return-void
.end method