@Override
  public Response safeHandle(HttpRequest request) throws JSONException {
    SelendroidLogger.info("Get screen state");

    TouchScreen screen = getSelendroidDriver(request).getTouch();
    float brightness = screen.getBrightness();

    int percentage = (int) (brightness * 100);

    return new SelendroidResponse(getSessionId(request), percentage);
  }
Determine whether the screen of the device is on or off.
selendroid-server/src/main/java/io/selendroid/server/handler/GetScreenState.java