code: public void onProximityChange(final boolean onProximity) {
          new ExecutionChain(mGvrContext).runOnMainThread(new Runnable() {
              @Override
              public void run() {
                  if (!mContentSceneViewStack.isEmpty()) {
                      mContentSceneViewStack.peek().onProximityChange(onProximity);
                  }
              }
          }).execute();
      }
docs: Callback on proximity changed. It calls {@link ContentScene#onProximityChange} for the
  currently active content scene
  @param onProximity TRUE if proximity sensor detects the headset is on the face and all
  app services should be resumed
  FALSE if proximity sensor detects the headset is off the face and all
  app services should be paused