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

Commit bdb5a45f authored by Daichi Hirono's avatar Daichi Hirono Committed by Android (Google) Code Review
Browse files

Merge "Break while loop when the thread interuppted."

parents e824f828 2bdb388d
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ final class RootScanner {
        public void run() {
            Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
            int pollingCount = 0;
            while (!Thread.interrupted()) {
            while (true) {
                boolean changed = false;

                // Update devices.
@@ -147,8 +147,7 @@ final class RootScanner {
                    Thread.sleep(pollingCount > SHORT_POLLING_TIMES ?
                        LONG_POLLING_INTERVAL : SHORT_POLLING_INTERVAL);
                } catch (InterruptedException exp) {
                    // The while condition handles the interrupted flag.
                    continue;
                    break;
                }
            }
        }