- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
191 lines
5.8 KiB
Java
191 lines
5.8 KiB
Java
package androidx.core.view;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.view.WindowInsetsAnimationController;
|
|
import androidx.annotation.FloatRange;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.core.graphics.Insets;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class WindowInsetsAnimationControllerCompat {
|
|
private final Impl mImpl;
|
|
|
|
@RequiresApi(30)
|
|
public WindowInsetsAnimationControllerCompat(@NonNull WindowInsetsAnimationController windowInsetsAnimationController) {
|
|
this.mImpl = new Impl30(windowInsetsAnimationController);
|
|
}
|
|
|
|
@NonNull
|
|
public Insets getHiddenStateInsets() {
|
|
return this.mImpl.getHiddenStateInsets();
|
|
}
|
|
|
|
@NonNull
|
|
public Insets getShownStateInsets() {
|
|
return this.mImpl.getShownStateInsets();
|
|
}
|
|
|
|
@NonNull
|
|
public Insets getCurrentInsets() {
|
|
return this.mImpl.getCurrentInsets();
|
|
}
|
|
|
|
@FloatRange(from = 0.0d, to = 1.0d)
|
|
public float getCurrentFraction() {
|
|
return this.mImpl.getCurrentFraction();
|
|
}
|
|
|
|
public float getCurrentAlpha() {
|
|
return this.mImpl.getCurrentAlpha();
|
|
}
|
|
|
|
public int getTypes() {
|
|
return this.mImpl.getTypes();
|
|
}
|
|
|
|
public void setInsetsAndAlpha(@Nullable Insets insets, @FloatRange(from = 0.0d, to = 1.0d) float f, @FloatRange(from = 0.0d, to = 1.0d) float f2) {
|
|
this.mImpl.setInsetsAndAlpha(insets, f, f2);
|
|
}
|
|
|
|
public void finish(boolean z) {
|
|
this.mImpl.finish(z);
|
|
}
|
|
|
|
public boolean isReady() {
|
|
return (isFinished() || isCancelled()) ? false : true;
|
|
}
|
|
|
|
public boolean isFinished() {
|
|
return this.mImpl.isFinished();
|
|
}
|
|
|
|
public boolean isCancelled() {
|
|
return this.mImpl.isCancelled();
|
|
}
|
|
|
|
public static class Impl {
|
|
public void finish(boolean z) {
|
|
}
|
|
|
|
public float getCurrentAlpha() {
|
|
return 0.0f;
|
|
}
|
|
|
|
@FloatRange(from = 0.0d, to = 1.0d)
|
|
public float getCurrentFraction() {
|
|
return 0.0f;
|
|
}
|
|
|
|
public int getTypes() {
|
|
return 0;
|
|
}
|
|
|
|
public boolean isCancelled() {
|
|
return true;
|
|
}
|
|
|
|
public boolean isFinished() {
|
|
return false;
|
|
}
|
|
|
|
public void setInsetsAndAlpha(@Nullable Insets insets, @FloatRange(from = 0.0d, to = 1.0d) float f, @FloatRange(from = 0.0d, to = 1.0d) float f2) {
|
|
}
|
|
|
|
@NonNull
|
|
public Insets getHiddenStateInsets() {
|
|
return Insets.NONE;
|
|
}
|
|
|
|
@NonNull
|
|
public Insets getShownStateInsets() {
|
|
return Insets.NONE;
|
|
}
|
|
|
|
@NonNull
|
|
public Insets getCurrentInsets() {
|
|
return Insets.NONE;
|
|
}
|
|
}
|
|
|
|
@RequiresApi(30)
|
|
public static class Impl30 extends Impl {
|
|
private final WindowInsetsAnimationController mController;
|
|
|
|
public Impl30(@NonNull WindowInsetsAnimationController windowInsetsAnimationController) {
|
|
this.mController = windowInsetsAnimationController;
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
@NonNull
|
|
public Insets getHiddenStateInsets() {
|
|
android.graphics.Insets hiddenStateInsets;
|
|
hiddenStateInsets = this.mController.getHiddenStateInsets();
|
|
return Insets.toCompatInsets(hiddenStateInsets);
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
@NonNull
|
|
public Insets getShownStateInsets() {
|
|
android.graphics.Insets shownStateInsets;
|
|
shownStateInsets = this.mController.getShownStateInsets();
|
|
return Insets.toCompatInsets(shownStateInsets);
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
@NonNull
|
|
public Insets getCurrentInsets() {
|
|
android.graphics.Insets currentInsets;
|
|
currentInsets = this.mController.getCurrentInsets();
|
|
return Insets.toCompatInsets(currentInsets);
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
public float getCurrentFraction() {
|
|
float currentFraction;
|
|
currentFraction = this.mController.getCurrentFraction();
|
|
return currentFraction;
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
public float getCurrentAlpha() {
|
|
float currentAlpha;
|
|
currentAlpha = this.mController.getCurrentAlpha();
|
|
return currentAlpha;
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
@SuppressLint({"WrongConstant"})
|
|
public int getTypes() {
|
|
int types;
|
|
types = this.mController.getTypes();
|
|
return types;
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
public void setInsetsAndAlpha(@Nullable Insets insets, float f, float f2) {
|
|
this.mController.setInsetsAndAlpha(insets == null ? null : insets.toPlatformInsets(), f, f2);
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
public void finish(boolean z) {
|
|
this.mController.finish(z);
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
public boolean isFinished() {
|
|
boolean isFinished;
|
|
isFinished = this.mController.isFinished();
|
|
return isFinished;
|
|
}
|
|
|
|
@Override // androidx.core.view.WindowInsetsAnimationControllerCompat.Impl
|
|
public boolean isCancelled() {
|
|
boolean isCancelled;
|
|
isCancelled = this.mController.isCancelled();
|
|
return isCancelled;
|
|
}
|
|
}
|
|
}
|