InstabugActivityDelegate.java
4.67 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
package com.instabug.library;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build.VERSION;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.GestureDetectorCompat;
import android.view.MotionEvent;
import com.instabug.library.interaction.InstabugSwipeDelegate;
import com.instabug.library.interaction.InstabugSwipeDelegate.GestureConfig;
import com.instabug.library.interaction.InstabugSwipeDelegate.GestureListener;
import com.instabug.library.interaction.InstabugSwipeDelegate.a;
import com.instabug.library.util.TouchEventDispatcher;
import rz;
public class InstabugActivityDelegate
implements InstabugSwipeDelegate.a
{
private final Activity mActivity;
private GestureDetectorCompat mDetector;
private InstabugSwipeDelegate mSwipeDelegate;
private TouchEventDispatcher mTouchEventDispatcher;
public InstabugActivityDelegate(Activity paramActivity)
{
this.mActivity = paramActivity;
this.mTouchEventDispatcher = new TouchEventDispatcher(Instabug.iG().a());
if (Build.VERSION.SDK_INT >= 11) {
this.mActivity.getFragmentManager().addOnBackStackChangedListener(new a((byte)0));
}
if ((this.mActivity instanceof FragmentActivity)) {
((FragmentActivity)this.mActivity).getSupportFragmentManager().addOnBackStackChangedListener(new b((byte)0));
}
}
public void dispatchTouchEvent(MotionEvent paramMotionEvent)
{
if (this.mSwipeDelegate != null) {
this.mSwipeDelegate.onTouchEvent(paramMotionEvent);
}
if (InstabugFeaturesManager.getInstance().getFeatureState(Feature.TRACK_USER_STEPS) == Feature.State.ENABLED) {
this.mTouchEventDispatcher.dispatchTouchEvent(this.mActivity, paramMotionEvent);
}
}
public void onDestroy()
{
Instabug.notifyActivityDestroyed(this.mActivity);
}
public void onInstabugGestureEvent(MotionEvent paramMotionEvent)
{
this.mDetector.onTouchEvent(paramMotionEvent);
}
public void onPause()
{
this.mSwipeDelegate = null;
this.mDetector = null;
if (Build.VERSION.SDK_INT < 14) {
Instabug.notifyActivityPaused(this.mActivity);
}
}
public void onResume()
{
Instabug.access$300(Instabug.iG().a);
Activity localActivity;
InstabugSwipeDelegate localInstabugSwipeDelegate;
if (rz.j().i() == IBGInvocationEvent.IBGInvocationEventTwoFingersSwipeLeft)
{
this.mSwipeDelegate = new InstabugSwipeDelegate(this, InstabugSwipeDelegate.GestureConfig.TwoSwipeLeft);
localActivity = this.mActivity;
localInstabugSwipeDelegate = this.mSwipeDelegate;
localInstabugSwipeDelegate.getClass();
}
for (this.mDetector = new GestureDetectorCompat(localActivity, new InstabugSwipeDelegate.GestureListener(localInstabugSwipeDelegate));; this.mDetector = null)
{
if (Build.VERSION.SDK_INT < 14) {
Instabug.notifyActivityResumed(this.mActivity);
}
return;
this.mSwipeDelegate = null;
}
}
public void onStart()
{
if (Build.VERSION.SDK_INT < 14) {
Instabug.notifyActivityStarted(this.mActivity);
}
}
public void onStop()
{
if (Build.VERSION.SDK_INT < 14) {
Instabug.notifyActivityStopped(this.mActivity);
}
}
@TargetApi(11)
final class a
implements android.app.FragmentManager.OnBackStackChangedListener
{
private a() {}
public final void onBackStackChanged()
{
int i = InstabugActivityDelegate.this.mActivity.getFragmentManager().getBackStackEntryCount();
if (i > 0)
{
android.app.FragmentManager.BackStackEntry localBackStackEntry = InstabugActivityDelegate.this.mActivity.getFragmentManager().getBackStackEntryAt(i - 1);
if (Build.VERSION.SDK_INT >= 14) {
Instabug.iG().a().a(localBackStackEntry.getName(), 2567);
}
return;
}
Instabug.iG().a().a("", 2577);
}
}
final class b
implements android.support.v4.app.FragmentManager.OnBackStackChangedListener
{
private b() {}
public final void onBackStackChanged()
{
int i = ((FragmentActivity)InstabugActivityDelegate.this.mActivity).getSupportFragmentManager().getBackStackEntryCount();
if (i > 0)
{
android.support.v4.app.FragmentManager.BackStackEntry localBackStackEntry = ((FragmentActivity)InstabugActivityDelegate.this.mActivity).getSupportFragmentManager().getBackStackEntryAt(i - 1);
Instabug.iG().a().a(localBackStackEntry.getName(), 2567);
return;
}
Instabug.iG().a().a("", 2577);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/InstabugActivityDelegate.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/