mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-29 13:28:13 +00:00
Move regex pattern initialization
If text == null, then the Pattern is not used.
This commit is contained in:
parent
48f38c4bb6
commit
91a4a74641
@ -95,12 +95,12 @@ public final class DisplayManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int parseDisplayFlags(String text) {
|
private static int parseDisplayFlags(String text) {
|
||||||
Pattern regex = Pattern.compile("FLAG_[A-Z_]+");
|
|
||||||
if (text == null) {
|
if (text == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
Pattern regex = Pattern.compile("FLAG_[A-Z_]+");
|
||||||
Matcher m = regex.matcher(text);
|
Matcher m = regex.matcher(text);
|
||||||
while (m.find()) {
|
while (m.find()) {
|
||||||
String flagString = m.group();
|
String flagString = m.group();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user