mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 09:57:16 +01:00
61 lines
3.5 KiB
Java
61 lines
3.5 KiB
Java
package androidx.compose.foundation;
|
|
|
|
import android.graphics.Rect;
|
|
import android.view.SurfaceHolder;
|
|
import expo.modules.interfaces.permissions.PermissionsResponse;
|
|
import kotlin.Metadata;
|
|
import kotlinx.coroutines.CoroutineScope;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\b\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0002\u0018\u00002\u00020\u00012\u00020\u0002B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J(\u0010\u000f\u001a\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u00072\u0006\u0010\u0014\u001a\u00020\u00072\u0006\u0010\u0015\u001a\u00020\u0007H\u0016J\u0010\u0010\u0016\u001a\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u0012H\u0016J\u0010\u0010\u0017\u001a\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u0012H\u0016R\u001a\u0010\u0006\u001a\u00020\u0007X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\b\u0010\t\"\u0004\b\n\u0010\u000bR\u001a\u0010\f\u001a\u00020\u0007X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\r\u0010\t\"\u0004\b\u000e\u0010\u000b¨\u0006\u0018"}, d2 = {"Landroidx/compose/foundation/AndroidExternalSurfaceState;", "Landroidx/compose/foundation/BaseAndroidExternalSurfaceState;", "Landroid/view/SurfaceHolder$Callback;", PermissionsResponse.SCOPE_KEY, "Lkotlinx/coroutines/CoroutineScope;", "(Lkotlinx/coroutines/CoroutineScope;)V", "lastHeight", "", "getLastHeight", "()I", "setLastHeight", "(I)V", "lastWidth", "getLastWidth", "setLastWidth", "surfaceChanged", "", "holder", "Landroid/view/SurfaceHolder;", "format", "width", "height", "surfaceCreated", "surfaceDestroyed", "foundation_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
final class AndroidExternalSurfaceState extends BaseAndroidExternalSurfaceState implements SurfaceHolder.Callback {
|
|
private int lastHeight;
|
|
private int lastWidth;
|
|
|
|
public AndroidExternalSurfaceState(@NotNull CoroutineScope coroutineScope) {
|
|
super(coroutineScope);
|
|
this.lastWidth = -1;
|
|
this.lastHeight = -1;
|
|
}
|
|
|
|
public final int getLastHeight() {
|
|
return this.lastHeight;
|
|
}
|
|
|
|
public final int getLastWidth() {
|
|
return this.lastWidth;
|
|
}
|
|
|
|
public final void setLastHeight(int i) {
|
|
this.lastHeight = i;
|
|
}
|
|
|
|
public final void setLastWidth(int i) {
|
|
this.lastWidth = i;
|
|
}
|
|
|
|
@Override // android.view.SurfaceHolder.Callback
|
|
public void surfaceChanged(@NotNull SurfaceHolder holder, int format, int width, int height) {
|
|
if (this.lastWidth == width && this.lastHeight == height) {
|
|
return;
|
|
}
|
|
this.lastWidth = width;
|
|
this.lastHeight = height;
|
|
dispatchSurfaceChanged(holder.getSurface(), width, height);
|
|
}
|
|
|
|
@Override // android.view.SurfaceHolder.Callback
|
|
public void surfaceCreated(@NotNull SurfaceHolder holder) {
|
|
Rect surfaceFrame = holder.getSurfaceFrame();
|
|
this.lastWidth = surfaceFrame.width();
|
|
this.lastHeight = surfaceFrame.height();
|
|
dispatchSurfaceCreated(holder.getSurface(), this.lastWidth, this.lastHeight);
|
|
}
|
|
|
|
@Override // android.view.SurfaceHolder.Callback
|
|
public void surfaceDestroyed(@NotNull SurfaceHolder holder) {
|
|
dispatchSurfaceDestroyed(holder.getSurface());
|
|
}
|
|
}
|