react-native-blob-util 0.19.2 → 0.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -44,6 +44,13 @@ if (isNewArchitectureEnabled()) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
android {
|
|
47
|
+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
48
|
+
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
|
|
49
|
+
namespace "com.ReactNativeBlobUtil"
|
|
50
|
+
buildFeatures {
|
|
51
|
+
buildConfig true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
47
54
|
compileSdkVersion safeExtGet('compileSdkVersion', 30)
|
|
48
55
|
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
|
|
49
56
|
defaultConfig {
|
|
@@ -161,4 +168,4 @@ afterEvaluate { project ->
|
|
|
161
168
|
}
|
|
162
169
|
}
|
|
163
170
|
}
|
|
164
|
-
}
|
|
171
|
+
}
|
|
@@ -73,9 +73,10 @@ public class ReactNativeBlobUtilStream {
|
|
|
73
73
|
InputStreamReader isr = new InputStreamReader(fs, Charset.forName("UTF-8"));
|
|
74
74
|
BufferedReader reader = new BufferedReader(isr, chunkSize);
|
|
75
75
|
char[] buffer = new char[chunkSize];
|
|
76
|
+
int numBytesRead;
|
|
76
77
|
// read chunks of the string
|
|
77
|
-
while (reader.read(buffer, 0, chunkSize) != -1) {
|
|
78
|
-
String chunk = new String(buffer);
|
|
78
|
+
while ((numBytesRead = reader.read(buffer, 0, chunkSize)) != -1) {
|
|
79
|
+
String chunk = new String(buffer, 0, numBytesRead);
|
|
79
80
|
emitStreamEvent(streamId, "data", chunk);
|
|
80
81
|
if (tick > 0)
|
|
81
82
|
SystemClock.sleep(tick);
|
package/package.json
CHANGED