CrackMe.apk
Download file
package androidx.core.view;
import android.os.Build;
import android.os.CancellationSignal;
import android.view.View;
import android.view.Window;
import android.view.WindowInsetsAnimationControlListener;
import android.view.WindowInsetsAnimationController;
import android.view.WindowInsetsController;
import android.view.animation.Interpolator;
import android.view.inputmethod.InputMethodManager;
import androidx.collection.SimpleArrayMap;
import com.google.android.exoplayer2.C;
public final class WindowInsetsControllerCompat {
public static final int BEHAVIOR_SHOW_BARS_BY_SWIPE = 1;
public static final int BEHAVIOR_SHOW_BARS_BY_TOUCH = 0;
public static final int BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE = 2;
private final Impl mImpl;
public interface OnControllableInsetsChangedListener {
void onControllableInsetsChanged(WindowInsetsControllerCompat windowInsetsControllerCompat, int i);
}
private WindowInsetsControllerCompat(WindowInsetsController windowInsetsController) {
if (Build.VERSION.SDK_INT >= 30) {
this.mImpl = new Impl30(windowInsetsController, this);
} else {
this.mImpl = new Impl();
}
}
public WindowInsetsControllerCompat(Window window, View view) {
if (Build.VERSION.SDK_INT >= 30) {
this.mImpl = new Impl30(window, this);
} else if (Build.VERSION.SDK_INT >= 26) {
this.mImpl = new Impl26(window, view);
} else if (Build.VERSION.SDK_INT >= 23) {
this.mImpl = new Impl23(window, view);
} else if (Build.VERSION.SDK_INT >= 20) {
this.mImpl = new Impl20(window, view);
} else {
this.mImpl = new Impl();
}
}
public static WindowInsetsControllerCompat toWindowInsetsControllerCompat(WindowInsetsController windowInsetsController) {
return new WindowInsetsControllerCompat(windowInsetsController);
}
public void show(int i) {
this.mImpl.show(i);
}
public void hide(int i) {
this.mImpl.hide(i);
}
public boolean isAppearanceLightStatusBars() {
return this.mImpl.isAppearanceLightStatusBars();
}
public void setAppearanceLightStatusBars(boolean z) {
this.mImpl.setAppearanceLightStatusBars(z);
}
public boolean isAppearanceLightNavigationBars() {
return this.mImpl.isAppearanceLightNavigationBars();
}
public void setAppearanceLightNavigationBars(boolean z) {
this.mImpl.setAppearanceLightNavigationBars(z);
}
public void controlWindowInsetsAnimation(int i, long j, Interpolator interpolator, CancellationSignal cancellationSignal, WindowInsetsAnimationControlListenerCompat windowInsetsAnimationControlListenerCompat) {
this.mImpl.controlWindowInsetsAnimation(i, j, interpolator, cancellationSignal, windowInsetsAnimationControlListenerCompat);
}
public void setSystemBarsBehavior(int i) {
this.mImpl.setSystemBarsBehavior(i);
}
public int getSystemBarsBehavior() {
return this.mImpl.getSystemBarsBehavior();
}
public void addOnControllableInsetsChangedListener(OnControllableInsetsChangedListener onControllableInsetsChangedListener) {
this.mImpl.addOnControllableInsetsChangedListener(onControllableInsetsChangedListener);
}
public void removeOnControllableInsetsChangedListener(OnControllableInsetsChangedListener onControllableInsetsChangedListener) {
this.mImpl.removeOnControllableInsetsChangedListener(onControllableInsetsChangedListener);
}
private static class Impl {
/* access modifiers changed from: package-private */
public void addOnControllableInsetsChangedListener(OnControllableInsetsChangedListener onControllableInsetsChangedListener) {
}
/* access modifiers changed from: package-private */
public void controlWindowInsetsAnimation(int i, long j, Interpolator interpolator, CancellationSignal cancellationSignal, WindowInsetsAnimationControlListenerCompat windowInsetsAnimationControlListenerCompat) {
}
/* access modifiers changed from: package-private */
public int getSystemBarsBehavior() {
return 0;
}
/* access modifiers changed from: package-private */
public void hide(int i) {
}
public boolean isAppearanceLightNavigationBars() {
return false;
}
public boolean isAppearanceLightStatusBars() {
return false;
}
/* access modifiers changed from: package-private */
public void removeOnControllableInsetsChangedListener(OnControllableInsetsChangedListener onControllableInsetsChangedListener) {
}
public void setAppearanceLightNavigationBars(boolean z) {
}
public void setAppearanceLightStatusBars(boolean z) {
}
/* access modifiers changed from: package-private */
public void setSystemBarsBehavior(int i) {
}
/* access modifiers changed from: package-private */
public void show(int i) {
}
Impl() {
}
}
private static class Impl20 extends Impl {
private final View mView;
protected final Window mWindow;
/* access modifiers changed from: package-private */
public void addOnControllableInsetsChangedListener(OnControllableInsetsChangedListener onControllableInsetsChangedListener) {
}
/* access modifiers changed from: package-private */
public void controlWindowInsetsAnimation(int i, long j, Interpolator interpolator, CancellationSignal cancellationSignal, WindowInsetsAnimationControlListenerCompat windowInsetsAnimationControlListenerCompat) {
}
/* access modifiers changed from: package-private */
public int getSystemBarsBehavior() {
return 0;
}
/* access modifiers changed from: package-private */
public void removeOnControllableInsetsChangedListener(OnControllableInsetsChangedListener onControllableInsetsChangedListener) {
}
Impl20(Window window, View view) {
this.mWindow = window;
this.mView = view;
}
/* access modifiers changed from: package-private */
public void show(int i) {
for (int i2 = 1; i2 <= 256; i2 <<= 1) {
if ((i & i2) != 0) {
showForType(i2);
}
}
}
private void showForType(int i) {
if (i == 1) {
unsetSystemUiFlag(4);
unsetWindowFlag(1024);
} else if (i == 2) {
unsetSystemUiFlag(2);
} else if (i == 8) {
final View view = this.mView;
if (view == null || (!view.isInEditMode() && !view.onCheckIsTextEditor())) {
view = this.mWindow.getCurrentFocus();
} else {
view.requestFocus();
}
if (view == null) {
view = this.mWindow.findViewById(16908290);
}
if (view != null && view.hasWindowFocus()) {
view.post(new Runnable() {
public void run() {
((InputMethodManager) view.getContext().getSystemService("input_method")).showSoftInput(view, 0);
}
});
}
}
}
/* access modifiers changed from: package-private */
public void hide(int i) {
for (int i2 = 1; i2 <= 256; i2 <<= 1) {
if ((i & i2) != 0) {
hideForType(i2);
}
}
}
private void hideForType(int i) {
if (i == 1) {
setSystemUiFlag(4);
} else if (i == 2) {
setSystemUiFlag(2);
} else if (i == 8) {
((InputMethodManager) this.mWindow.getContext().getSystemService("input_method")).hideSoftInputFromWindow(this.mWindow.getDecorView().getWindowToken(), 0);
}
}
/* access modifiers changed from: protected */
public void setSystemUiFlag(int i) {
View decorView = this.mWindow.getDecorView();
decorView.setSystemUiVisibility(i | decorView.getSystemUiVisibility());
}
/* access modifiers changed from: protected */
public void unsetSystemUiFlag(int i) {
View decorView = this.mWindow.getDecorView();
decorView.setSystemUiVisibility((~i) & decorView.getSystemUiVisibility());
}
/* access modifiers changed from: protected */
public void setWindowFlag(int i) {
this.mWindow.addFlags(i);
}
/* access modifiers changed from: protected */
public void unsetWindowFlag(int i) {
this.mWindow.clearFlags(i);
}
/* access modifiers changed from: package-private */
public void setSystemBarsBehavior(int i) {
if (i == 0) {
unsetSystemUiFlag(6144);
} else if (i == 1) {
unsetSystemUiFlag(4096);
setSystemUiFlag(2048);
} else if (i == 2) {
unsetSystemUiFlag(2048);
setSystemUiFlag(4096);
}
}
}
private static class Impl23 extends Impl20 {
Impl23(Window window, View view) {
super(window, view);
}
public boolean isAppearanceLightStatusBars() {
return (this.mWindow.getDecorView().getSystemUiVisibility() & 8192) != 0;
}
public void setAppearanceLightStatusBars(boolean z) {
if (z) {
unsetWindowFlag(67108864);
setWindowFlag(Integer.MIN_VALUE);
setSystemUiFlag(8192);
return;
}
unsetSystemUiFlag(8192);
}
}
private static class Impl26 extends Impl23 {
Impl26(Window window, View view) {
super(window, view);
}
public boolean isAppearanceLightNavigationBars() {
return (this.mWindow.getDecorView().getSystemUiVisibility() & 16) != 0;
}
public void setAppearanceLightNavigationBars(boolean z) {
if (z) {
unsetWindowFlag(C.BUFFER_FLAG_FIRST_SAMPLE);
setWindowFlag(Integer.MIN_VALUE);
setSystemUiFlag(16);
return;
}
unsetSystemUiFlag(16);
}
}
private static class Impl30 extends Impl {
final WindowInsetsControllerCompat mCompatController;
final WindowInsetsController mInsetsController;
private final SimpleArrayMap<OnControllableInsetsChangedListener, WindowInsetsController.OnControllableInsetsChangedListener> mListeners;
protected Window mWindow;
Impl30(Window window, WindowInsetsControllerCompat windowInsetsControllerCompat) {
this(window.getInsetsController(), windowInsetsControllerCompat);
this.mWindow = window;
}
Impl30(WindowInsetsController windowInsetsController, WindowInsetsControllerCompat windowInsetsControllerCompat) {
this.mListeners = new SimpleArrayMap<>();
this.mInsetsController = windowInsetsController;
this.mCompatController = windowInsetsControllerCompat;
}
/* access modifiers changed from: package-private */
public void show(int i) {
this.mInsetsController.show(i);
}
/* access modifiers changed from: package-private */
public void hide(int i) {
this.mInsetsController.hide(i);
}
public boolean isAppearanceLightStatusBars() {
return (this.mInsetsController.getSystemBarsAppearance() & 8) != 0;
}
public void setAppearanceLightStatusBars(boolean z) {
if (z) {
if (this.mWindow != null) {
unsetSystemUiFlag(8192);
}
this.mInsetsController.setSystemBarsAppearance(8, 8);
return;
}
this.mInsetsController.setSystemBarsAppearance(0, 8);
}
public boolean isAppearanceLightNavigationBars() {
return (this.mInsetsController.getSystemBarsAppearance() & 16) != 0;
}
public void setAppearanceLightNavigationBars(boolean z) {
if (z) {
this.mInsetsController.setSystemBarsAppearance(16, 16);
} else {
this.mInsetsController.setSystemBarsAppearance(0, 16);
}
}
/* access modifiers changed from: package-private */
public void controlWindowInsetsAnimation(int i, long j, Interpolator interpolator, CancellationSignal cancellationSignal, final WindowInsetsAnimationControlListenerCompat windowInsetsAnimationControlListenerCompat) {
this.mInsetsController.controlWindowInsetsAnimation(i, j, interpolator, cancellationSignal, new WindowInsetsAnimationControlListener() {
private WindowInsetsAnimationControllerCompat mCompatAnimController = null;
public void onReady(WindowInsetsAnimationController windowInsetsAnimationController, int i) {
WindowInsetsAnimationControllerCompat windowInsetsAnimationControllerCompat = new WindowInsetsAnimationControllerCompat(windowInsetsAnimationController);
this.mCompatAnimController = windowInsetsAnimationControllerCompat;
windowInsetsAnimationControlListenerCompat.onReady(windowInsetsAnimationControllerCompat, i);
}
public void onFinished(WindowInsetsAnimationController windowInsetsAnimationController) {
windowInsetsAnimationControlListenerCompat.onFinished(this.mCompatAnimController);
}
public void onCancelled(WindowInsetsAnimationController windowInsetsAnimationController) {
windowInsetsAnimationControlListenerCompat.onCancelled(windowInsetsAnimationController == null ? null : this.mCompatAnimController);
}
});
}
/* access modifiers changed from: package-private */
public void setSystemBarsBehavior(int i) {
this.mInsetsController.setSystemBarsBehavior(i);
}
/* access modifiers changed from: package-private */
public int getSystemBarsBehavior() {
return this.mInsetsController.getSystemBarsBehavior();
}
/* access modifiers changed from: package-private */
public void addOnControllableInsetsChangedListener(final OnControllableInsetsChangedListener onControllableInsetsChangedListener) {
if (!this.mListeners.containsKey(onControllableInsetsChangedListener)) {
AnonymousClass2 r0 = new WindowInsetsController.OnControllableInsetsChangedListener() {
public void onControllableInsetsChanged(WindowInsetsController windowInsetsController, int i) {
if (Impl30.this.mInsetsController == windowInsetsController) {
onControllableInsetsChangedListener.onControllableInsetsChanged(Impl30.this.mCompatController, i);
}
}
};
this.mListeners.put(onControllableInsetsChangedListener, r0);
this.mInsetsController.addOnControllableInsetsChangedListener(r0);
}
}
/* access modifiers changed from: package-private */
public void removeOnControllableInsetsChangedListener(OnControllableInsetsChangedListener onControllableInsetsChangedListener) {
WindowInsetsController.OnControllableInsetsChangedListener remove = this.mListeners.remove(onControllableInsetsChangedListener);
if (remove != null) {
this.mInsetsController.removeOnControllableInsetsChangedListener(remove);
}
}
/* access modifiers changed from: protected */
public void unsetSystemUiFlag(int i) {
View decorView = this.mWindow.getDecorView();
decorView.setSystemUiVisibility((~i) & decorView.getSystemUiVisibility());
}
}
}
Download file