Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e280765a authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Print error log if fail to connect to UiAutomator"

parents 29989c14 7a10226e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2324,10 +2324,13 @@ public class Instrumentation {
                mUiAutomation.connect(flags);
                return mUiAutomation;
            }
            final long startUptime = SystemClock.uptimeMillis();
            try {
                mUiAutomation.connectWithTimeout(flags, CONNECT_TIMEOUT_MILLIS);
                return mUiAutomation;
            } catch (TimeoutException e) {
                final long waited = SystemClock.uptimeMillis() - startUptime;
                Log.e(TAG, "Unable to connect to UiAutomation. Waited for " + waited + " ms", e);
                mUiAutomation.destroy();
                mUiAutomation = null;
            }