BaseOnboardingFragment.java
3.58 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
package com.bitstrips.imoji.onboarding.gboard;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import com.bitstrips.imoji.ImojiApplication;
import com.bitstrips.imoji.analytics.Action;
import com.bitstrips.imoji.analytics.Category;
import com.bitstrips.imoji.analytics.LegacyAnalyticsService;
import com.bitstrips.imoji.analytics.performance.AnalyticsLabelKey;
import com.bitstrips.imoji.util.PreferenceUtils;
import com.crashlytics.android.Crashlytics;
import java.util.HashMap;
import javax.inject.Inject;
public class BaseOnboardingFragment
extends Fragment
{
@Inject
PreferenceUtils a;
@Inject
LegacyAnalyticsService b;
private boolean c = false;
private boolean d = false;
protected static Bundle createArguments(GboardOnboardingSource paramGboardOnboardingSource)
{
Bundle localBundle = new Bundle();
localBundle.putSerializable("source", paramGboardOnboardingSource);
return localBundle;
}
protected boolean didSaveInstanceState()
{
return this.d;
}
protected void dismiss()
{
if (this.d)
{
Crashlytics.logException(new IllegalStateException("Performing action after onSaveInstanceState!"));
return;
}
this.c = true;
getFragmentManager().popBackStack(null, 1);
}
protected void finish()
{
GboardOnboardingSource localGboardOnboardingSource = getSource();
HashMap localHashMap = new HashMap(1);
localHashMap.put(AnalyticsLabelKey.GBOARD_ONBOARDING_SOURCE, localGboardOnboardingSource.toString());
this.b.sendEvent(Category.GBOARD_ONBOARDING, Action.GBOARD_ONBOARDING_FINISH, localHashMap);
this.a.putBoolean(2131231240, true);
}
protected GboardOnboardingSource getSource()
{
return (GboardOnboardingSource)getArguments().getSerializable("source");
}
public void onCreate(@Nullable Bundle paramBundle)
{
super.onCreate(paramBundle);
((ImojiApplication)getContext().getApplicationContext()).inject(this);
}
public Animation onCreateAnimation(int paramInt1, boolean paramBoolean, int paramInt2)
{
if (this.c) {
return AnimationUtils.loadAnimation(getContext(), 2130968611);
}
return super.onCreateAnimation(paramInt1, paramBoolean, paramInt2);
}
public void onResume()
{
super.onResume();
this.d = false;
}
public void onSaveInstanceState(Bundle paramBundle)
{
super.onSaveInstanceState(paramBundle);
this.d = true;
}
protected void sendLowStorageEvent()
{
HashMap localHashMap = new HashMap(1);
localHashMap.put(AnalyticsLabelKey.GBOARD_ONBOARDING_SOURCE, getSource().toString());
this.b.sendEvent(Category.GBOARD_ONBOARDING, Action.GBOARD_ONBOARDING_LOW_STORAGE, localHashMap);
}
protected void skip(String paramString)
{
GboardOnboardingSource localGboardOnboardingSource = getSource();
HashMap localHashMap = new HashMap(2);
localHashMap.put(AnalyticsLabelKey.GBOARD_ONBOARDING_SKIP_STEP, paramString);
localHashMap.put(AnalyticsLabelKey.GBOARD_ONBOARDING_SOURCE, localGboardOnboardingSource.toString());
this.b.sendEvent(Category.GBOARD_ONBOARDING, Action.GBOARD_ONBOARDING_SKIP, localHashMap);
this.a.putBoolean(2131231240, true);
dismiss();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/onboarding/gboard/BaseOnboardingFragment.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/