PreferenceUtils.java
5.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
package com.arellomobile.android.push.utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import com.arellomobile.android.push.preference.SoundType;
import com.arellomobile.android.push.preference.VibrateType;
public class PreferenceUtils
{
public static String getApplicationId(Context paramContext)
{
return paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getString("dm_pwapp", "");
}
public static String getBaseUrl(Context paramContext)
{
return paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getString("pw_base_url", "");
}
public static boolean getEnableLED(Context paramContext)
{
return paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getBoolean("dm_ledon", false);
}
public static boolean getForceRegister(Context paramContext)
{
return paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getBoolean("pw_forceregister", false);
}
public static long getLastRegistration(Context paramContext)
{
return paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getLong("last_registration_change", 0L);
}
public static boolean getLightScreenOnNotification(Context paramContext)
{
return paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getBoolean("dm_lightson", false);
}
public static int getMessageId(Context paramContext)
{
return paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getInt("dm_messageid", 1001);
}
public static boolean getMultiMode(Context paramContext)
{
return paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getBoolean("dm_multimode", false);
}
public static String getProjectId(Context paramContext)
{
return paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getString("dm_sender_id", "");
}
public static SoundType getSoundType(Context paramContext)
{
return SoundType.fromInt(Integer.valueOf(paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getInt("dm_soundtype", 0)).intValue());
}
public static VibrateType getVibrateType(Context paramContext)
{
return VibrateType.fromInt(Integer.valueOf(paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).getInt("dm_vibratetype", 0)).intValue());
}
public static void resetLastRegistration(Context paramContext)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.remove("last_registration_change");
paramContext.commit();
}
public static void setApplicationId(Context paramContext, String paramString)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putString("dm_pwapp", paramString);
paramContext.commit();
}
public static void setBaseUrl(Context paramContext, String paramString)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putString("pw_base_url", paramString);
paramContext.commit();
}
public static void setEnableLED(Context paramContext, boolean paramBoolean)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putBoolean("dm_ledon", paramBoolean);
paramContext.commit();
}
public static void setForceRegister(Context paramContext, boolean paramBoolean)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putBoolean("pw_forceregister", paramBoolean);
paramContext.commit();
}
public static void setLastRegistration(Context paramContext, long paramLong)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putLong("last_registration_change", paramLong);
paramContext.commit();
}
public static void setLightScreenOnNotification(Context paramContext, boolean paramBoolean)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putBoolean("dm_lightson", paramBoolean);
paramContext.commit();
}
public static void setMessageId(Context paramContext, int paramInt)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putInt("dm_messageid", paramInt);
paramContext.commit();
}
public static void setMultiMode(Context paramContext, boolean paramBoolean)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putBoolean("dm_multimode", paramBoolean);
paramContext.commit();
}
public static void setProjectId(Context paramContext, String paramString)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putString("dm_sender_id", paramString);
paramContext.commit();
}
public static void setSoundType(Context paramContext, SoundType paramSoundType)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putInt("dm_soundtype", paramSoundType.getValue());
paramContext.commit();
}
public static void setVibrateType(Context paramContext, VibrateType paramVibrateType)
{
paramContext = paramContext.getSharedPreferences("com.pushwoosh.pushnotifications", 0).edit();
paramContext.putInt("dm_vibratetype", paramVibrateType.getValue());
paramContext.commit();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/arellomobile/android/push/utils/PreferenceUtils.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/