BehaviourPreferenceFragment.java
5.45 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
package com.bitstrips.imoji.behaviour;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.support.v4.preference.PreferenceFragment;
import android.widget.Toast;
import com.bitstrips.imoji.ImojiApplication;
import com.bitstrips.imoji.abv3.AvatarBuilderActivityMode;
import com.bitstrips.imoji.abv3.AvatarBuilderActivityV3;
import com.bitstrips.imoji.api.BitmojiApi;
import com.bitstrips.imoji.identity.AvatarManager;
import com.bitstrips.imoji.manager.StickerPacksManager;
import com.bitstrips.imoji.receivers.GboardAppIndexingUpdateReceiver;
import com.bitstrips.imoji.receivers.GboardDevAppIndexingUpdateReceiver;
import com.bitstrips.imoji.util.PreferenceUtils;
import javax.inject.Inject;
import retrofit.RetrofitError;
public class BehaviourPreferenceFragment
extends PreferenceFragment
{
@Inject
PreferenceUtils a;
@Inject
StickerPacksManager b;
@Inject
BitmojiApi c;
@Inject
AvatarManager d;
public void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
((ImojiApplication)getContext().getApplicationContext()).inject(this);
getPreferenceManager().setSharedPreferencesName(getString(2131231182));
getPreferenceManager().setSharedPreferencesMode(0);
addPreferencesFromResource(2131099650);
addPreferencesFromResource(2131099649);
addPreferencesFromResource(2131099651);
addPreferencesFromResource(2131099654);
addPreferencesFromResource(2131099658);
getPreferenceScreen().findPreference(getString(2131231268)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
{
public final boolean onPreferenceClick(Preference paramAnonymousPreference)
{
boolean bool = false;
if (!BehaviourPreferenceFragment.a(BehaviourPreferenceFragment.this))
{
Toast.makeText(BehaviourPreferenceFragment.this.getContext(), "Need to be logged in.", 0).show();
bool = true;
}
return bool;
}
});
getPreferenceScreen().findPreference(getString(2131231158)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
{
public final boolean onPreferenceClick(Preference paramAnonymousPreference)
{
paramAnonymousPreference = new Intent(BehaviourPreferenceFragment.this.getContext(), AvatarBuilderActivityV3.class);
paramAnonymousPreference.putExtra("EXTRA_TEST_MODE", true);
paramAnonymousPreference.putExtra("EXTRA_AVATAR_BUILDER_MODE", AvatarBuilderActivityMode.CREATE);
BehaviourPreferenceFragment.this.startActivity(paramAnonymousPreference);
return true;
}
});
paramBundle = getPreferenceScreen().findPreference(getString(2131231174));
if (this.d.getLegacyAvatarId() != null) {
paramBundle.setTitle("AvatarId: " + this.d.getLegacyAvatarId());
}
for (;;)
{
getPreferenceScreen().findPreference(getString(2131231220)).setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
{
public final boolean onPreferenceChange(Preference paramAnonymousPreference, Object paramAnonymousObject)
{
BehaviourPreferenceFragment.this.b.clear();
return true;
}
});
getPreferenceScreen().findPreference(getString(2131231341)).setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
{
public final boolean onPreferenceChange(Preference paramAnonymousPreference, Object paramAnonymousObject)
{
BehaviourPreferenceFragment.this.b.clear();
return true;
}
});
getPreferenceScreen().findPreference(getString(2131231228)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
{
public final boolean onPreferenceClick(Preference paramAnonymousPreference)
{
new GboardAppIndexingUpdateReceiver().onReceive(BehaviourPreferenceFragment.this.getContext(), new Intent());
return true;
}
});
getPreferenceScreen().findPreference(getString(2131231227)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
{
public final boolean onPreferenceClick(Preference paramAnonymousPreference)
{
new GboardDevAppIndexingUpdateReceiver().onReceive(BehaviourPreferenceFragment.this.getContext(), new Intent());
return true;
}
});
getPreferenceScreen().findPreference(getString(2131231335)).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener()
{
public final boolean onPreferenceClick(Preference paramAnonymousPreference)
{
new Thread(new Runnable()
{
public final void run()
{
try
{
BehaviourPreferenceFragment.this.c.getUser401();
return;
}
catch (RetrofitError localRetrofitError) {}
}
}).start();
return true;
}
});
return;
paramBundle.setTitle("No Avatar Id Found");
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/behaviour/BehaviourPreferenceFragment.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/