code: boolean requestLandscapeLock() {
      int requestedOrientation = activity.getRequestedOrientation();
  
      if (requestedOrientation == SCREEN_ORIENTATION_SENSOR_LANDSCAPE) {
        // We're already locked.
        return false;
      }
  
      activity.setRequestedOrientation(SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
  
      // We've requested a lock, but there will only be an orientation change
      // if we're not already landscape.
      return isPortrait();
    }
docs: Returns true if we've requested a lock and are expecting an orientation change
  as a result.