mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-19 08:51:10 +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) {
|
||||
Pattern regex = Pattern.compile("FLAG_[A-Z_]+");
|
||||
if (text == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int flags = 0;
|
||||
Pattern regex = Pattern.compile("FLAG_[A-Z_]+");
|
||||
Matcher m = regex.matcher(text);
|
||||
while (m.find()) {
|
||||
String flagString = m.group();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue