CrackMe.apk
Download file
package com.google.android.material.internal;
import android.content.Context;
import android.graphics.PorterDuff;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewParent;
import android.view.inputmethod.InputMethodManager;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class ViewUtils {
public interface OnApplyWindowInsetsListener {
WindowInsetsCompat onApplyWindowInsets(View view, WindowInsetsCompat windowInsetsCompat, RelativePadding relativePadding);
}
private ViewUtils() {
}
public static PorterDuff.Mode parseTintMode(int i, PorterDuff.Mode mode) {
if (i == 3) {
return PorterDuff.Mode.SRC_OVER;
}
if (i == 5) {
return PorterDuff.Mode.SRC_IN;
}
if (i == 9) {
return PorterDuff.Mode.SRC_ATOP;
}
switch (i) {
case 14:
return PorterDuff.Mode.MULTIPLY;
case 15:
return PorterDuff.Mode.SCREEN;
case 16:
return PorterDuff.Mode.ADD;
default:
return mode;
}
}
public static boolean isLayoutRtl(View view) {
return ViewCompat.getLayoutDirection(view) == 1;
}
public static float dpToPx(Context context, int i) {
return TypedValue.applyDimension(1, (float) i, context.getResources().getDisplayMetrics());
}
public static void requestFocusAndShowKeyboard(final View view) {
view.requestFocus();
view.post(new Runnable() {
public void run() {
((InputMethodManager) view.getContext().getSystemService("input_method")).showSoftInput(view, 1);
}
});
}
public static class RelativePadding {
public int bottom;
public int end;
public int start;
public int top;
public RelativePadding(int i, int i2, int i3, int i4) {
this.start = i;
this.top = i2;
this.end = i3;
this.bottom = i4;
}
public RelativePadding(RelativePadding relativePadding) {
this.start = relativePadding.start;
this.top = relativePadding.top;
this.end = relativePadding.end;
this.bottom = relativePadding.bottom;
}
public void applyToView(View view) {
ViewCompat.setPaddingRelative(view, this.start, this.top, this.end, this.bottom);
}
}
public static void doOnApplyWindowInsets(View view, final OnApplyWindowInsetsListener onApplyWindowInsetsListener) {
final RelativePadding relativePadding = new RelativePadding(ViewCompat.getPaddingStart(view), view.getPaddingTop(), ViewCompat.getPaddingEnd(view), view.getPaddingBottom());
ViewCompat.setOnApplyWindowInsetsListener(view, new androidx.core.view.OnApplyWindowInsetsListener() {
public WindowInsetsCompat onApplyWindowInsets(View view, WindowInsetsCompat windowInsetsCompat) {
return onApplyWindowInsetsListener.onApplyWindowInsets(view, windowInsetsCompat, new RelativePadding(relativePadding));
}
});
requestApplyInsetsWhenAttached(view);
}
public static void requestApplyInsetsWhenAttached(View view) {
if (ViewCompat.isAttachedToWindow(view)) {
ViewCompat.requestApplyInsets(view);
} else {
view.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
public void onViewDetachedFromWindow(View view) {
}
public void onViewAttachedToWindow(View view) {
view.removeOnAttachStateChangeListener(this);
ViewCompat.requestApplyInsets(view);
}
});
}
}
public static float getParentAbsoluteElevation(View view) {
float f = 0.0f;
for (ViewParent parent = view.getParent(); parent instanceof View; parent = parent.getParent()) {
f += ViewCompat.getElevation((View) parent);
}
return f;
}
}
Download file