MCPcopy Create free account
hub / github.com/XCSoar/XCSoar / run

Method run

android/src/InputThread.java:88–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 }
87
88 @Override public void run() {
89 byte[] buffer = new byte[BUFFER_SIZE];
90
91 InputStream is2 = is;
92 while (is2 != null) {
93 int n;
94 try {
95 n = is2.read(buffer, 0, buffer.length);
96 } catch (IOException e) {
97 if (is != null)
98 Log.e(TAG, "Failed to read from " + name, e);
99
100 closeInternal();
101 break;
102 }
103
104 if (n < 0)
105 break;
106
107 is2 = is;
108 if (is2 == null)
109 // close() was called
110 break;
111
112 InputListener listener2 = listener;
113 if (listener2 != null)
114 listener2.dataReceived(buffer, n);
115 }
116 }
117}

Callers

nothing calls this directly

Calls 2

closeInternalMethod · 0.95
dataReceivedMethod · 0.95

Tested by

no test coverage detected