mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-19 16:59:19 +00:00
Move regex pattern initialization
If text == null, then the Pattern is not used.
This commit is contained in:
parent
48f38c4bb6
commit
91a4a74641
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue