Skip to content

Commit 49c15f8

Browse files
authored
fix(app, android): avoid API24-only APIs, fix Android < 7 crash from 11.3.0 (#5206)
1 parent 1510502 commit 49c15f8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

packages/app/android/src/main/java/io/invertase/firebase/common/TaskExecutorService.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,13 @@ public String getExecutorName(boolean isTransactional, String identifier) {
101101

102102
public void shutdown() {
103103
Set<String> existingExecutorNames = executors.keySet();
104-
existingExecutorNames.removeIf((executorName) -> {
105-
return executorName.startsWith(name) == false;
106-
});
107-
existingExecutorNames.forEach((executorName) -> {
108-
removeExecutor(executorName);
109-
});
104+
for (String executorName : existingExecutorNames) {
105+
if (executorName.startsWith(name) == false) {
106+
existingExecutorNames.remove(executorName);
107+
} else {
108+
removeExecutor(executorName);
109+
}
110+
}
110111
}
111112

112113
public void removeExecutor(String executorName) {

0 commit comments

Comments
 (0)