ImojiModule.java
8.5 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
package com.bitstrips.imoji;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build.VERSION;
import com.bitstrips.imoji.abv3.AvatarBuilderActivityV3;
import com.bitstrips.imoji.abv3.AvatarBuilderFragment;
import com.bitstrips.imoji.abv3.camera.AvatarBuilderCameraFragment;
import com.bitstrips.imoji.abv3.category.AvatarCategoryContainerView;
import com.bitstrips.imoji.abv3.option.AvatarOptionThumbnailViewHolder;
import com.bitstrips.imoji.abv3.style.AvatarStyleFragment;
import com.bitstrips.imoji.analytics.BitstripsAnalyticsService;
import com.bitstrips.imoji.analytics.KeyboardAnalyticsService;
import com.bitstrips.imoji.analytics.LegacyAnalyticsService;
import com.bitstrips.imoji.api.BitmojiApi;
import com.bitstrips.imoji.api.BitmojiApiResponseInterceptor;
import com.bitstrips.imoji.behaviour.BehaviourHelper;
import com.bitstrips.imoji.behaviour.BehaviourPreferenceFragment;
import com.bitstrips.imoji.behaviour.SecretBehaviourActivity;
import com.bitstrips.imoji.browser.ImojiBrowserActivity;
import com.bitstrips.imoji.browser.fragments.ImojiBrowserFragment;
import com.bitstrips.imoji.browser.fragments.ShareImageDialogFragment;
import com.bitstrips.imoji.deserializers.AvatarInfoDeserializer;
import com.bitstrips.imoji.experiments.Experiments;
import com.bitstrips.imoji.firebase.AppIndexingJobService;
import com.bitstrips.imoji.firebase.AppIndexingLegacyWrapperService;
import com.bitstrips.imoji.firebase.AppIndexingService;
import com.bitstrips.imoji.keyboard.BitmojiKeyboard;
import com.bitstrips.imoji.keyboard.BitmojisView;
import com.bitstrips.imoji.keyboard.BitmojisViewTags;
import com.bitstrips.imoji.manager.StickerPacksManager;
import com.bitstrips.imoji.models.AvatarInfo;
import com.bitstrips.imoji.models.StickerPacks;
import com.bitstrips.imoji.monouser.oauth2.OAuth2Manager;
import com.bitstrips.imoji.onboarding.gboard.GboardOnboardingFinishFragment;
import com.bitstrips.imoji.onboarding.gboard.GboardOnboardingInstructionsFragment;
import com.bitstrips.imoji.onboarding.gboard.GboardOnboardingIntroFragment;
import com.bitstrips.imoji.onboarding.gboard.GboardOnboardingLowStorageFragment;
import com.bitstrips.imoji.receivers.BaseAppIndexingUpdateReceiver;
import com.bitstrips.imoji.receivers.FirebaseAppIndexingUpdateReceiver;
import com.bitstrips.imoji.receivers.GboardAppIndexingUpdateReceiver;
import com.bitstrips.imoji.receivers.GboardDevAppIndexingUpdateReceiver;
import com.bitstrips.imoji.receivers.LocaleChangedReceiver;
import com.bitstrips.imoji.receivers.SnapchatAppIndexingUpdateReceiver;
import com.bitstrips.imoji.receivers.SnapchatDebugAppIndexingUpdateReceiver;
import com.bitstrips.imoji.receivers.SnapchatMasterAppIndexingUpdateReceiver;
import com.bitstrips.imoji.search.SearchIndex;
import com.bitstrips.imoji.ui.BSLoginActivity;
import com.bitstrips.imoji.ui.BSPasswordRecoveryActivity;
import com.bitstrips.imoji.ui.ImojiWebViewActivity;
import com.bitstrips.imoji.ui.LoginActivity;
import com.bitstrips.imoji.ui.SettingsFragment;
import com.bitstrips.imoji.ui.activities.ConnectSnapchatActivity;
import com.bitstrips.imoji.ui.activities.DeepLinkActivity;
import com.bitstrips.imoji.ui.activities.SignUpActivity;
import com.bitstrips.imoji.ui.activities.TermsChangedActivity;
import com.bitstrips.imoji.ui.fragments.BirthdaySignUpFragment;
import com.bitstrips.imoji.ui.fragments.FavouriteFragment;
import com.bitstrips.imoji.ui.fragments.SearchContainerFragment;
import com.bitstrips.imoji.ui.fragments.SearchResultFragment;
import com.bitstrips.imoji.ui.views.AccountsEndpointPickerDialog;
import com.bitstrips.imoji.ui.views.EndpointPickerDialog;
import com.bitstrips.imoji.util.PreferenceUtils;
import com.bitstrips.imoji.util.WebUtils;
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.squareup.okhttp.Cache;
import com.squareup.okhttp.OkHttpClient;
import dagger.Module;
import dagger.Provides;
import java.util.List;
import javax.inject.Named;
import javax.inject.Singleton;
import retrofit.Endpoint;
import retrofit.RequestInterceptor;
import retrofit.RequestInterceptor.RequestFacade;
import retrofit.converter.GsonConverter;
@Module(injects={ImojiApplication.class, LoginActivity.class, ImojiBrowserActivity.class, ImojiWebViewActivity.class, SignUpActivity.class, BSPasswordRecoveryActivity.class, BSLoginActivity.class, AvatarBuilderActivityV3.class, TermsChangedActivity.class, ConnectSnapchatActivity.class, SecretBehaviourActivity.class, DeepLinkActivity.class, ImojiBrowserFragment.class, BehaviourPreferenceFragment.class, SettingsFragment.class, GboardOnboardingIntroFragment.class, GboardOnboardingInstructionsFragment.class, GboardOnboardingFinishFragment.class, GboardOnboardingLowStorageFragment.class, AvatarStyleFragment.class, BirthdaySignUpFragment.class, ShareImageDialogFragment.class, FavouriteFragment.class, SearchResultFragment.class, SearchContainerFragment.class, BitmojiKeyboard.class, AvatarBuilderFragment.class, AvatarBuilderCameraFragment.class, AppIndexingLegacyWrapperService.class, AppIndexingService.class, AppIndexingJobService.class, BaseAppIndexingUpdateReceiver.class, FirebaseAppIndexingUpdateReceiver.class, GboardAppIndexingUpdateReceiver.class, GboardDevAppIndexingUpdateReceiver.class, SnapchatAppIndexingUpdateReceiver.class, SnapchatMasterAppIndexingUpdateReceiver.class, SnapchatDebugAppIndexingUpdateReceiver.class, LocaleChangedReceiver.class, BitmojisView.class, BitmojisViewTags.class, EndpointPickerDialog.class, AccountsEndpointPickerDialog.class, AvatarOptionThumbnailViewHolder.class, AvatarCategoryContainerView.class})
public class ImojiModule
{
Application a;
public ImojiModule(Application paramApplication)
{
this.a = paramApplication;
}
@Provides
@Singleton
static BitstripsAnalyticsService a(BitmojiApi paramBitmojiApi, PreferenceUtils paramPreferenceUtils, @Named("persisted") SharedPreferences paramSharedPreferences, Context paramContext, BehaviourHelper paramBehaviourHelper, Experiments paramExperiments)
{
paramBitmojiApi = new BitstripsAnalyticsService(paramBitmojiApi, paramPreferenceUtils, paramSharedPreferences, paramContext, paramBehaviourHelper, paramExperiments);
paramBitmojiApi.init();
return paramBitmojiApi;
}
@Provides
static LegacyAnalyticsService a(BitstripsAnalyticsService paramBitstripsAnalyticsService)
{
return paramBitstripsAnalyticsService;
}
@Provides
@Singleton
static SearchIndex a(StickerPacksManager paramStickerPacksManager)
{
SearchIndex localSearchIndex = new SearchIndex();
StickerPacks localStickerPacks = paramStickerPacksManager.getStickerPacks();
paramStickerPacksManager.addOnStickerPacksChangedListener(localSearchIndex);
if (localStickerPacks != null) {
localSearchIndex.index(localStickerPacks);
}
return localSearchIndex;
}
@Provides
@Singleton
static Gson a()
{
return new Gson();
}
@Provides
@Singleton
static Cache a(Context paramContext)
{
return new Cache(paramContext.getCacheDir(), 1048576L);
}
@Provides
static OkHttpClient a(BitmojiApiResponseInterceptor paramBitmojiApiResponseInterceptor)
{
OkHttpClient localOkHttpClient = new OkHttpClient();
localOkHttpClient.interceptors().add(paramBitmojiApiResponseInterceptor);
return localOkHttpClient;
}
@Provides
@Singleton
static GsonConverter a(PreferenceUtils paramPreferenceUtils)
{
return new GsonConverter(new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.IDENTITY).registerTypeAdapter(AvatarInfo.class, new AvatarInfoDeserializer(paramPreferenceUtils)).create());
}
@Provides
@Singleton
static KeyboardAnalyticsService b(BitmojiApi paramBitmojiApi, PreferenceUtils paramPreferenceUtils, @Named("persisted") SharedPreferences paramSharedPreferences, Context paramContext, BehaviourHelper paramBehaviourHelper, Experiments paramExperiments)
{
paramBitmojiApi = new KeyboardAnalyticsService(paramBitmojiApi, paramPreferenceUtils, paramSharedPreferences, paramContext, paramBehaviourHelper, paramExperiments);
paramBitmojiApi.init();
return paramBitmojiApi;
}
@Provides
@Named("sdkVersion")
static Integer b()
{
return Integer.valueOf(Build.VERSION.SDK_INT);
}
@Provides
@Named("avatarId")
static String b(PreferenceUtils paramPreferenceUtils)
{
return paramPreferenceUtils.getString(2131231175, null);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/ImojiModule.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/