protected override void OnPause()
 {
     base.OnPause();
     // Note that the order matters - GLSurfaceView is paused first so that it does not try
     // to query the session. If Session is paused before GLSurfaceView, GLSurfaceView may
     // still call mSession.update() and get a SessionPausedException.
     mDisplayRotationHelper?.OnPause();
     mSurfaceView?.OnPause();
     mSession?.Pause();
 }
Ejemplo n.º 2
0
 protected override void OnPause()
 {
     base.OnPause();
     if (ContextCompat.CheckSelfPermission(this, Android.Manifest.Permission.Camera) == Android.Content.PM.Permission.Granted)
     {
         // Note that the order matters - GLSurfaceView is paused first so that it does not try
         // to query the session. If Session is paused before GLSurfaceView, GLSurfaceView may
         // still call mSession.update() and get a SessionPausedException.
         mDisplayRotationHelper.OnPause();
         mSurfaceView.OnPause();
         if (mSession != null)
         {
             mSession.Pause();
         }
     }
 }