sync camera

This commit is contained in:
brenoepic 2022-04-30 21:01:34 -03:00
parent 34327ea3dd
commit 8a75cf6c73

View File

@ -360,7 +360,7 @@ public final class Emulator {
return badgeImager; return badgeImager;
} }
public static CameraClient getCameraClient() { public static synchronized CameraClient getCameraClient() {
return cameraClient; return cameraClient;
} }
@ -384,17 +384,14 @@ public final class Emulator {
int totalSeconds = 0; int totalSeconds = 0;
Matcher m = Pattern.compile("(([0-9]*) (second|minute|hour|day|week|month|year))").matcher(timeString); Matcher m = Pattern.compile("(([0-9]*) (second|minute|hour|day|week|month|year))").matcher(timeString);
Map<String,Integer> map = new HashMap<String,Integer>() { Map<String,Integer> map = new HashMap<String,Integer>();
{ map.put("second", 1);
put("second", 1); map.put("minute", 60);
put("minute", 60); map.put("hour", 3600);
put("hour", 3600); map.put("day", 86400);
put("day", 86400); map.put("week", 604800);
put("week", 604800); map.put("month", 2628000);
put("month", 2628000); map.put("year", 31536000);
put("year", 31536000);
}
};
while (m.find()) { while (m.find()) {
try { try {
@ -415,17 +412,14 @@ public final class Emulator {
c.setTime(date); c.setTime(date);
Matcher m = Pattern.compile("(([0-9]*) (second|minute|hour|day|week|month|year))").matcher(timeString); Matcher m = Pattern.compile("(([0-9]*) (second|minute|hour|day|week|month|year))").matcher(timeString);
Map<String, Integer> map = new HashMap<String, Integer>() { Map<String, Integer> map = new HashMap<String, Integer>();
{ map.put("second", Calendar.SECOND);
put("second", Calendar.SECOND); map.put("minute", Calendar.MINUTE);
put("minute", Calendar.MINUTE); map.put("hour", Calendar.HOUR);
put("hour", Calendar.HOUR); map.put("day", Calendar.DAY_OF_MONTH);
put("day", Calendar.DAY_OF_MONTH); map.put("week", Calendar.WEEK_OF_MONTH);
put("week", Calendar.WEEK_OF_MONTH); map.put("month", Calendar.MONTH);
put("month", Calendar.MONTH); map.put("year", Calendar.YEAR);
put("year", Calendar.YEAR);
}
};
while (m.find()) { while (m.find()) {
try { try {