Skip to content

Commit bb30456

Browse files
gengjiawenfacebook-github-bot
authored andcommitted
Fix compatibility issue for android 16 device.Fixes facebook#22294 (facebook#22295)
Summary: Fix compatibility issue for android 16 device. Related issue facebook#22295. pass all current ci. none [GENERAL] [ANDROID] [Fixed] - Fix compatibility issue for android 16 device Pull Request resolved: facebook#22295 Differential Revision: D13084152 Pulled By: hramos fbshipit-source-id: 42459ddc6f84f870affdda5ba19bcd8bb27b56d7
1 parent 123d3f3 commit bb30456

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import java.io.BufferedReader;
99
import java.io.InputStreamReader;
10+
import java.nio.charset.Charset;
1011
import java.nio.charset.StandardCharsets;
1112
import java.util.Locale;
1213

@@ -84,7 +85,7 @@ private static synchronized String getMetroHostPropValue() {
8485
Runtime.getRuntime().exec(new String[] {"/system/bin/getprop", METRO_HOST_PROP_NAME});
8586
reader =
8687
new BufferedReader(
87-
new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8));
88+
new InputStreamReader(process.getInputStream(), Charset.forName("UTF-8")));
8889

8990
String lastLine = "";
9091
String line;

0 commit comments

Comments
 (0)