package com.unity3d.player;

import android.app.Activity;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

/* loaded from: /storage/emulated/0/Documents/jadec/sources/com.UBI.A90.WW/dex-files/2.dex */
abstract class c implements SurfaceHolder.Callback {
    private final Activity a = (Activity) t.a.a();
    private final int b = 3;
    private SurfaceView c;

    /* JADX INFO: Access modifiers changed from: package-private */
    public c(int i) {
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void a() {
        this.a.runOnUiThread(new Runnable() { // from class: com.unity3d.player.c.1
            @Override // java.lang.Runnable
            public final void run() {
                if (c.this.c == null) {
                    c.this.c = new SurfaceView(t.a.a());
                    c.this.c.getHolder().setType(c.this.b);
                    c.this.c.getHolder().addCallback(c.this);
                    t.a.b(c.this.c);
                    c.this.c.setVisibility(0);
                }
            }
        });
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public final void b() {
        this.a.runOnUiThread(new Runnable() { // from class: com.unity3d.player.c.2
            @Override // java.lang.Runnable
            public final void run() {
                if (c.this.c != null) {
                    t.a.c(c.this.c);
                }
                c.this.c = null;
            }
        });
    }

    @Override // android.view.SurfaceHolder.Callback
    public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i2, int i3) {
    }

    @Override // android.view.SurfaceHolder.Callback
    public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
    }
}
