CrackMe.apk
Download file
package androidx.core.view.inputmethod;
import android.content.ClipData;
import android.content.ClipDescription;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputConnectionWrapper;
import android.view.inputmethod.InputContentInfo;
import androidx.core.util.ObjectsCompat;
import androidx.core.util.Preconditions;
import androidx.core.view.ContentInfoCompat;
import androidx.core.view.ViewCompat;
public final class InputConnectionCompat {
private static final String COMMIT_CONTENT_ACTION = "androidx.core.view.inputmethod.InputConnectionCompat.COMMIT_CONTENT";
private static final String COMMIT_CONTENT_CONTENT_URI_INTEROP_KEY = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_URI";
private static final String COMMIT_CONTENT_CONTENT_URI_KEY = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_URI";
private static final String COMMIT_CONTENT_DESCRIPTION_INTEROP_KEY = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_DESCRIPTION";
private static final String COMMIT_CONTENT_DESCRIPTION_KEY = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_DESCRIPTION";
private static final String COMMIT_CONTENT_FLAGS_INTEROP_KEY = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_FLAGS";
private static final String COMMIT_CONTENT_FLAGS_KEY = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_FLAGS";
private static final String COMMIT_CONTENT_INTEROP_ACTION = "android.support.v13.view.inputmethod.InputConnectionCompat.COMMIT_CONTENT";
private static final String COMMIT_CONTENT_LINK_URI_INTEROP_KEY = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_LINK_URI";
private static final String COMMIT_CONTENT_LINK_URI_KEY = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_LINK_URI";
private static final String COMMIT_CONTENT_OPTS_INTEROP_KEY = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_OPTS";
private static final String COMMIT_CONTENT_OPTS_KEY = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_OPTS";
private static final String COMMIT_CONTENT_RESULT_INTEROP_RECEIVER_KEY = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_RESULT_RECEIVER";
private static final String COMMIT_CONTENT_RESULT_RECEIVER_KEY = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_RESULT_RECEIVER";
private static final String EXTRA_INPUT_CONTENT_INFO = "androidx.core.view.extra.INPUT_CONTENT_INFO";
public static final int INPUT_CONTENT_GRANT_READ_URI_PERMISSION = 1;
private static final String LOG_TAG = "InputConnectionCompat";
public interface OnCommitContentListener {
boolean onCommitContent(InputContentInfoCompat inputContentInfoCompat, int i, Bundle bundle);
}
/* JADX WARNING: Removed duplicated region for block: B:46:0x007d */
/* Code decompiled incorrectly, please refer to instructions dump. */
static boolean handlePerformPrivateCommand(java.lang.String r7, android.os.Bundle r8, androidx.core.view.inputmethod.InputConnectionCompat.OnCommitContentListener r9) {
/*
r0 = 0
if (r8 != 0) goto L_0x0004
return r0
L_0x0004:
java.lang.String r1 = "androidx.core.view.inputmethod.InputConnectionCompat.COMMIT_CONTENT"
boolean r1 = android.text.TextUtils.equals(r1, r7)
if (r1 == 0) goto L_0x000e
r7 = 0
goto L_0x0017
L_0x000e:
java.lang.String r1 = "android.support.v13.view.inputmethod.InputConnectionCompat.COMMIT_CONTENT"
boolean r7 = android.text.TextUtils.equals(r1, r7)
if (r7 == 0) goto L_0x0081
r7 = 1
L_0x0017:
r1 = 0
if (r7 == 0) goto L_0x001d
java.lang.String r2 = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_RESULT_RECEIVER"
goto L_0x001f
L_0x001d:
java.lang.String r2 = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_RESULT_RECEIVER"
L_0x001f:
android.os.Parcelable r2 = r8.getParcelable(r2) // Catch:{ all -> 0x0079 }
android.os.ResultReceiver r2 = (android.os.ResultReceiver) r2 // Catch:{ all -> 0x0079 }
if (r7 == 0) goto L_0x002a
java.lang.String r3 = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_URI"
goto L_0x002c
L_0x002a:
java.lang.String r3 = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_URI"
L_0x002c:
android.os.Parcelable r3 = r8.getParcelable(r3) // Catch:{ all -> 0x0077 }
android.net.Uri r3 = (android.net.Uri) r3 // Catch:{ all -> 0x0077 }
if (r7 == 0) goto L_0x0037
java.lang.String r4 = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_DESCRIPTION"
goto L_0x0039
L_0x0037:
java.lang.String r4 = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_DESCRIPTION"
L_0x0039:
android.os.Parcelable r4 = r8.getParcelable(r4) // Catch:{ all -> 0x0077 }
android.content.ClipDescription r4 = (android.content.ClipDescription) r4 // Catch:{ all -> 0x0077 }
if (r7 == 0) goto L_0x0044
java.lang.String r5 = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_LINK_URI"
goto L_0x0046
L_0x0044:
java.lang.String r5 = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_LINK_URI"
L_0x0046:
android.os.Parcelable r5 = r8.getParcelable(r5) // Catch:{ all -> 0x0077 }
android.net.Uri r5 = (android.net.Uri) r5 // Catch:{ all -> 0x0077 }
if (r7 == 0) goto L_0x0051
java.lang.String r6 = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_FLAGS"
goto L_0x0053
L_0x0051:
java.lang.String r6 = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_FLAGS"
L_0x0053:
int r6 = r8.getInt(r6) // Catch:{ all -> 0x0077 }
if (r7 == 0) goto L_0x005c
java.lang.String r7 = "android.support.v13.view.inputmethod.InputConnectionCompat.CONTENT_OPTS"
goto L_0x005e
L_0x005c:
java.lang.String r7 = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_OPTS"
L_0x005e:
android.os.Parcelable r7 = r8.getParcelable(r7) // Catch:{ all -> 0x0077 }
android.os.Bundle r7 = (android.os.Bundle) r7 // Catch:{ all -> 0x0077 }
if (r3 == 0) goto L_0x0071
if (r4 == 0) goto L_0x0071
androidx.core.view.inputmethod.InputContentInfoCompat r8 = new androidx.core.view.inputmethod.InputContentInfoCompat // Catch:{ all -> 0x0077 }
r8.<init>(r3, r4, r5) // Catch:{ all -> 0x0077 }
boolean r0 = r9.onCommitContent(r8, r6, r7) // Catch:{ all -> 0x0077 }
L_0x0071:
if (r2 == 0) goto L_0x0076
r2.send(r0, r1)
L_0x0076:
return r0
L_0x0077:
r7 = move-exception
goto L_0x007b
L_0x0079:
r7 = move-exception
r2 = r1
L_0x007b:
if (r2 == 0) goto L_0x0080
r2.send(r0, r1)
L_0x0080:
throw r7
L_0x0081:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.core.view.inputmethod.InputConnectionCompat.handlePerformPrivateCommand(java.lang.String, android.os.Bundle, androidx.core.view.inputmethod.InputConnectionCompat$OnCommitContentListener):boolean");
}
public static boolean commitContent(InputConnection inputConnection, EditorInfo editorInfo, InputContentInfoCompat inputContentInfoCompat, int i, Bundle bundle) {
boolean z;
ClipDescription description = inputContentInfoCompat.getDescription();
String[] contentMimeTypes = EditorInfoCompat.getContentMimeTypes(editorInfo);
int length = contentMimeTypes.length;
boolean z2 = false;
int i2 = 0;
while (true) {
if (i2 >= length) {
z = false;
break;
} else if (description.hasMimeType(contentMimeTypes[i2])) {
z = true;
break;
} else {
i2++;
}
}
if (!z) {
return false;
}
if (Build.VERSION.SDK_INT >= 25) {
return inputConnection.commitContent((InputContentInfo) inputContentInfoCompat.unwrap(), i, bundle);
}
int protocol = EditorInfoCompat.getProtocol(editorInfo);
if (protocol == 2) {
z2 = true;
} else if (!(protocol == 3 || protocol == 4)) {
return false;
}
Bundle bundle2 = new Bundle();
bundle2.putParcelable(z2 ? COMMIT_CONTENT_CONTENT_URI_INTEROP_KEY : COMMIT_CONTENT_CONTENT_URI_KEY, inputContentInfoCompat.getContentUri());
bundle2.putParcelable(z2 ? COMMIT_CONTENT_DESCRIPTION_INTEROP_KEY : COMMIT_CONTENT_DESCRIPTION_KEY, inputContentInfoCompat.getDescription());
bundle2.putParcelable(z2 ? COMMIT_CONTENT_LINK_URI_INTEROP_KEY : COMMIT_CONTENT_LINK_URI_KEY, inputContentInfoCompat.getLinkUri());
bundle2.putInt(z2 ? COMMIT_CONTENT_FLAGS_INTEROP_KEY : COMMIT_CONTENT_FLAGS_KEY, i);
bundle2.putParcelable(z2 ? COMMIT_CONTENT_OPTS_INTEROP_KEY : COMMIT_CONTENT_OPTS_KEY, bundle);
return inputConnection.performPrivateCommand(z2 ? COMMIT_CONTENT_INTEROP_ACTION : COMMIT_CONTENT_ACTION, bundle2);
}
@Deprecated
public static InputConnection createWrapper(InputConnection inputConnection, EditorInfo editorInfo, final OnCommitContentListener onCommitContentListener) {
ObjectsCompat.requireNonNull(inputConnection, "inputConnection must be non-null");
ObjectsCompat.requireNonNull(editorInfo, "editorInfo must be non-null");
ObjectsCompat.requireNonNull(onCommitContentListener, "onCommitContentListener must be non-null");
if (Build.VERSION.SDK_INT >= 25) {
return new InputConnectionWrapper(inputConnection, false) {
public boolean commitContent(InputContentInfo inputContentInfo, int i, Bundle bundle) {
if (onCommitContentListener.onCommitContent(InputContentInfoCompat.wrap(inputContentInfo), i, bundle)) {
return true;
}
return super.commitContent(inputContentInfo, i, bundle);
}
};
}
if (EditorInfoCompat.getContentMimeTypes(editorInfo).length == 0) {
return inputConnection;
}
return new InputConnectionWrapper(inputConnection, false) {
public boolean performPrivateCommand(String str, Bundle bundle) {
if (InputConnectionCompat.handlePerformPrivateCommand(str, bundle, onCommitContentListener)) {
return true;
}
return super.performPrivateCommand(str, bundle);
}
};
}
public static InputConnection createWrapper(View view, InputConnection inputConnection, EditorInfo editorInfo) {
return createWrapper(inputConnection, editorInfo, createOnCommitContentListenerUsingPerformReceiveContent(view));
}
private static OnCommitContentListener createOnCommitContentListenerUsingPerformReceiveContent(final View view) {
Preconditions.checkNotNull(view);
return new OnCommitContentListener() {
public boolean onCommitContent(InputContentInfoCompat inputContentInfoCompat, int i, Bundle bundle) {
if (Build.VERSION.SDK_INT >= 25 && (i & 1) != 0) {
try {
inputContentInfoCompat.requestPermission();
InputContentInfo inputContentInfo = (InputContentInfo) inputContentInfoCompat.unwrap();
bundle = bundle == null ? new Bundle() : new Bundle(bundle);
bundle.putParcelable(InputConnectionCompat.EXTRA_INPUT_CONTENT_INFO, inputContentInfo);
} catch (Exception e) {
Log.w(InputConnectionCompat.LOG_TAG, "Can't insert content from IME; requestPermission() failed", e);
return false;
}
}
if (ViewCompat.performReceiveContent(view, new ContentInfoCompat.Builder(new ClipData(inputContentInfoCompat.getDescription(), new ClipData.Item(inputContentInfoCompat.getContentUri())), 2).setLinkUri(inputContentInfoCompat.getLinkUri()).setExtras(bundle).build()) == null) {
return true;
}
return false;
}
};
}
}
Download file