o.java
4.78 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
package com.instabug.library;
import android.content.Intent;
import android.net.Uri;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;
import com.instabug.library.internal.d.a;
import com.instabug.library.internal.d.a.h;
import com.instabug.library.util.InstabugSDKLogger;
import com.instabug.library.util.k;
import com.instabug.library.util.l;
import java.io.File;
import rz.b;
public class o
extends Fragment
implements View.OnClickListener
{
public static o a(boolean paramBoolean)
{
o localo = new o();
Bundle localBundle = new Bundle();
localBundle.putBoolean("hide_audio", paramBoolean);
localo.setArguments(localBundle);
return localo;
}
public void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent)
{
super.onActivityResult(paramInt1, paramInt2, paramIntent);
switch (paramInt1)
{
default:
return;
}
if ((paramInt2 == -1) && (paramIntent != null))
{
paramIntent = paramIntent.getData();
paramIntent = a.a(getActivity(), paramIntent);
v.a().a(getActivity(), Uri.fromFile(new File(paramIntent)));
getActivity().onBackPressed();
}
for (;;)
{
v.a().a(false);
return;
if (paramInt2 == 0) {
getActivity().onBackPressed();
}
}
}
public void onClick(View paramView)
{
int i = paramView.getId();
if (i == R.id.instabug_btn_add_image)
{
v.a().a(true);
k.a(this, "android.permission.WRITE_EXTERNAL_STORAGE", 1, new Runnable()new Runnable
{
public final void run()
{
o.a(o.this);
}
}, new Runnable()
{
public final void run()
{
InstabugSDKLogger.i(o.this, "Permission granted");
o.a(o.this);
}
});
}
do
{
return;
if (i == R.id.instabug_btn_take_screenshot)
{
v.a().a(true);
h.a(v.a().b());
Instabug.setSDKState(rz.b.c);
getActivity().finish();
return;
}
} while (i != R.id.instabug_btn_add_audio);
getFragmentManager().popBackStack();
paramView = new File(a.a(getActivity()), "audioMessage_" + String.valueOf(System.currentTimeMillis()) + ".mp4");
FragmentTransaction localFragmentTransaction = getFragmentManager().beginTransaction();
getActivity().findViewById(R.id.instabug_fragment_blackout).setVisibility(0);
localFragmentTransaction.setCustomAnimations(R.anim.instabug_anim_options_sheet_enter, R.anim.instabug_anim_options_sheet_exit).add(R.id.instabug_bottomsheet_container, f.a(paramView.getAbsolutePath()), "record_audio").addToBackStack("Record Audio").commit();
}
@Nullable
public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
{
paramLayoutInflater = paramLayoutInflater.inflate(R.layout.instabug_lyt_new_attachment, paramViewGroup, false);
((TextView)paramLayoutInflater.findViewById(R.id.instabug_btn_add_image_text)).setText(l.a(IBGCustomTextPlaceHolder.Key.ADD_IMAGE_FROM_GALLERY, getString(R.string.instabug_str_add_photo)));
((TextView)paramLayoutInflater.findViewById(R.id.instabug_btn_add_screenshot_text)).setText(l.a(IBGCustomTextPlaceHolder.Key.ADD_EXTRA_SCREENSHOT, getString(R.string.instabug_str_take_screenshot)));
((TextView)paramLayoutInflater.findViewById(R.id.instabug_btn_add_audio_text)).setText(l.a(IBGCustomTextPlaceHolder.Key.ADD_VOICE_MESSAGE, getString(R.string.instabug_str_record_audio)));
paramLayoutInflater.findViewById(R.id.instabug_btn_add_image).setOnClickListener(this);
paramLayoutInflater.findViewById(R.id.instabug_btn_take_screenshot).setOnClickListener(this);
paramLayoutInflater.findViewById(R.id.instabug_btn_add_audio).setOnClickListener(this);
if ((Build.VERSION.SDK_INT < 23) && (!k.a(getActivity(), "android.permission.RECORD_AUDIO"))) {
Instabug.setShouldAudioRecordingOptionAppear(false);
}
if (!Instabug.shouldAudioRecordingOptionAppear()) {
paramLayoutInflater.findViewById(R.id.instabug_btn_add_audio).setVisibility(8);
}
if ((getArguments() != null) && (getArguments().getBoolean("hide_audio", true))) {
paramLayoutInflater.findViewById(R.id.instabug_btn_add_audio).setVisibility(8);
}
return paramLayoutInflater;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/o.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/