Loading core/java/android/os/DropBoxManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,12 @@ public class DropBoxManager { try { is = getInputStream(); byte[] buf = new byte[maxBytes]; return new String(buf, 0, Math.max(0, is.read(buf))); int readBytes = 0; int n = 0; while (n >= 0 && (readBytes += n) < maxBytes) { n = is.read(buf, readBytes, maxBytes - readBytes); } return new String(buf, 0, readBytes); } catch (IOException e) { return null; } finally { Loading Loading
core/java/android/os/DropBoxManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,12 @@ public class DropBoxManager { try { is = getInputStream(); byte[] buf = new byte[maxBytes]; return new String(buf, 0, Math.max(0, is.read(buf))); int readBytes = 0; int n = 0; while (n >= 0 && (readBytes += n) < maxBytes) { n = is.read(buf, readBytes, maxBytes - readBytes); } return new String(buf, 0, readBytes); } catch (IOException e) { return null; } finally { Loading