private DeviceResponse getIsNaturalOrientation() {
   d(uiaDaemon_logcatTag, "Getting 'isNaturalOrientation'");
   this.device.waitForIdle();
   DeviceResponse deviceResponse = new DeviceResponse();
   deviceResponse.isNaturalOrientation = device.isNaturalOrientation();
   return deviceResponse;
 }
  UiAutomatorDaemonDriver(boolean waitForGuiToStabilize, int waitForWindowUpdateTimeout) {
    // The instrumentation required to run uiautomator2-daemon is
    // provided by the command: adb shell instrument <PACKAGE>/<RUNNER>
    Instrumentation instr = InstrumentationRegistry.getInstrumentation();
    if (instr == null) throw new AssertionError();

    this.context = InstrumentationRegistry.getTargetContext();
    if (context == null) throw new AssertionError();

    this.device = UiDevice.getInstance(instr);
    if (device == null) throw new AssertionError();

    this.waitForGuiToStabilize = waitForGuiToStabilize;
    this.waitForWindowUpdateTimeout = waitForWindowUpdateTimeout;
  }