GboardFakeEditText.java
2.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
package com.bitstrips.imoji.onboarding.gboard;
import android.content.Context;
import android.os.Bundle;
import android.support.v13.view.inputmethod.EditorInfoCompat;
import android.support.v13.view.inputmethod.InputConnectionCompat;
import android.support.v13.view.inputmethod.InputConnectionCompat.OnCommitContentListener;
import android.support.v13.view.inputmethod.InputContentInfoCompat;
import android.support.v7.widget.AppCompatEditText;
import android.text.InputFilter;
import android.text.Spanned;
import android.util.AttributeSet;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
public class GboardFakeEditText
extends AppCompatEditText
implements InputFilter
{
private static final String[] a = { "image/png", "image/webp" };
private OnImageEnterredListener b;
public GboardFakeEditText(Context paramContext)
{
this(paramContext, null);
}
public GboardFakeEditText(Context paramContext, AttributeSet paramAttributeSet)
{
this(paramContext, paramAttributeSet, 16842862);
}
public GboardFakeEditText(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
setFilters(new InputFilter[] { this });
}
public CharSequence filter(CharSequence paramCharSequence, int paramInt1, int paramInt2, Spanned paramSpanned, int paramInt3, int paramInt4)
{
return "";
}
public InputConnection onCreateInputConnection(EditorInfo paramEditorInfo)
{
InputConnection localInputConnection = super.onCreateInputConnection(paramEditorInfo);
EditorInfoCompat.setContentMimeTypes(paramEditorInfo, a);
InputConnectionCompat.createWrapper(localInputConnection, paramEditorInfo, new InputConnectionCompat.OnCommitContentListener()
{
public final boolean onCommitContent(InputContentInfoCompat paramAnonymousInputContentInfoCompat, int paramAnonymousInt, Bundle paramAnonymousBundle)
{
if (GboardFakeEditText.a(GboardFakeEditText.this) != null) {
GboardFakeEditText.a(GboardFakeEditText.this).onImageEnterred();
}
return true;
}
});
}
public void setOnImageEnterredListener(OnImageEnterredListener paramOnImageEnterredListener)
{
this.b = paramOnImageEnterredListener;
}
public static abstract interface OnImageEnterredListener
{
public abstract void onImageEnterred();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/onboarding/gboard/GboardFakeEditText.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/