···1919import android.view.View;
2020import android.view.WindowManager;
21212222+import androidx.annotation.GuardedBy;
2223import androidx.annotation.Keep;
2324import androidx.annotation.NonNull;
2425import androidx.annotation.Nullable;
···3132@Keep
3233public class MonadoView extends SurfaceView implements SurfaceHolder.Callback, SurfaceHolder.Callback2 {
3334 private static final String TAG = "MonadoView";
3535+3436 @SuppressWarnings("deprecation")
3537 private static final int sysUiVisFlags = 0
3638 // Give us a stable view of content insets
···4244 | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
4345 // we want sticky immersive
4446 | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
4747+4848+ @NonNull
4549 private final Context context;
4646- /// Guards currentSurfaceHolder
4747- private final Object currentSurfaceHolderSync = new Object();
5050+4851 /// The activity we've connected to.
4952 @Nullable
5050- private final
5151- Activity activity;
5353+ private final Activity activity;
5454+5555+ @Nullable
5256 private final Method viewSetSysUiVis;
5757+5858+ private final Object currentSurfaceHolderSync = new Object();
5959+5360 public int width = -1;
5461 public int height = -1;
5562 public int format = -1;
6363+5664 private NativeCounterpart nativeCounterpart;
5757- /// Guarded by currentSurfaceHolderSync
6565+6666+ @GuardedBy("currentSurfaceHolderSync")
6767+ @Nullable
5868 private SurfaceHolder currentSurfaceHolder = null;
59696070 public MonadoView(Context context) {
···97107 /**
98108 * Construct and start attaching a MonadoView to a client application.
99109 *
100100- * @param activity The activity to attach to.
110110+ * @param activity The activity to attach to.
111111+ * @param nativePointer The native android_custom_surface pointer, cast to a long.
101112 * @return The MonadoView instance created and asynchronously attached.
102113 */
103114 @NonNull