Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
package com.google.firebase.concurrent;
import android.os.Process;
import android.os.StrictMode;
import java.util.Locale;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicLong;
/* loaded from: classes3.dex */
public class CustomThreadFactory implements ThreadFactory {
public static final ThreadFactory DEFAULT = Executors.defaultThreadFactory();
public final String namePrefix;
public final StrictMode.ThreadPolicy policy;
public final int priority;
public final AtomicLong threadCount = new AtomicLong();
public CustomThreadFactory(String str, int i, StrictMode.ThreadPolicy threadPolicy) {
this.namePrefix = str;
this.priority = i;
this.policy = threadPolicy;
}
@Override // java.util.concurrent.ThreadFactory
public Thread newThread(final Runnable runnable) {
Thread newThread = DEFAULT.newThread(new Runnable() { // from class: com.google.firebase.concurrent.CustomThreadFactory$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
CustomThreadFactory.this.lambda$newThread$0(runnable);
}
});
newThread.setName(String.format(Locale.ROOT, "%s Thread #%d", this.namePrefix, Long.valueOf(this.threadCount.getAndIncrement())));
return newThread;
}
public final /* synthetic */ void lambda$newThread$0(Runnable runnable) {
Process.setThreadPriority(this.priority);
StrictMode.ThreadPolicy threadPolicy = this.policy;
if (threadPolicy != null) {
StrictMode.setThreadPolicy(threadPolicy);
}
runnable.run();
}
}

View File

@@ -0,0 +1,243 @@
package com.google.firebase.concurrent;
import com.google.firebase.concurrent.DelegatingScheduledFuture;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
/* loaded from: classes3.dex */
public class DelegatingScheduledExecutorService implements ScheduledExecutorService {
public final ExecutorService delegate;
public final ScheduledExecutorService scheduler;
public DelegatingScheduledExecutorService(ExecutorService executorService, ScheduledExecutorService scheduledExecutorService) {
this.delegate = executorService;
this.scheduler = scheduledExecutorService;
}
@Override // java.util.concurrent.ExecutorService
public void shutdown() {
throw new UnsupportedOperationException("Shutting down is not allowed.");
}
@Override // java.util.concurrent.ExecutorService
public List shutdownNow() {
throw new UnsupportedOperationException("Shutting down is not allowed.");
}
@Override // java.util.concurrent.ExecutorService
public boolean isShutdown() {
return this.delegate.isShutdown();
}
@Override // java.util.concurrent.ExecutorService
public boolean isTerminated() {
return this.delegate.isTerminated();
}
@Override // java.util.concurrent.ExecutorService
public boolean awaitTermination(long j, TimeUnit timeUnit) {
return this.delegate.awaitTermination(j, timeUnit);
}
@Override // java.util.concurrent.ExecutorService
public Future submit(Callable callable) {
return this.delegate.submit(callable);
}
@Override // java.util.concurrent.ExecutorService
public Future submit(Runnable runnable, Object obj) {
return this.delegate.submit(runnable, obj);
}
@Override // java.util.concurrent.ExecutorService
public Future submit(Runnable runnable) {
return this.delegate.submit(runnable);
}
@Override // java.util.concurrent.ExecutorService
public List invokeAll(Collection collection) {
return this.delegate.invokeAll(collection);
}
@Override // java.util.concurrent.ExecutorService
public List invokeAll(Collection collection, long j, TimeUnit timeUnit) {
return this.delegate.invokeAll(collection, j, timeUnit);
}
@Override // java.util.concurrent.ExecutorService
public Object invokeAny(Collection collection) {
return this.delegate.invokeAny(collection);
}
@Override // java.util.concurrent.ExecutorService
public Object invokeAny(Collection collection, long j, TimeUnit timeUnit) {
return this.delegate.invokeAny(collection, j, timeUnit);
}
@Override // java.util.concurrent.Executor
public void execute(Runnable runnable) {
this.delegate.execute(runnable);
}
@Override // java.util.concurrent.ScheduledExecutorService
public ScheduledFuture schedule(final Runnable runnable, final long j, final TimeUnit timeUnit) {
return new DelegatingScheduledFuture(new DelegatingScheduledFuture.Resolver() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda1
@Override // com.google.firebase.concurrent.DelegatingScheduledFuture.Resolver
public final ScheduledFuture addCompleter(DelegatingScheduledFuture.Completer completer) {
ScheduledFuture lambda$schedule$2;
lambda$schedule$2 = DelegatingScheduledExecutorService.this.lambda$schedule$2(runnable, j, timeUnit, completer);
return lambda$schedule$2;
}
});
}
public final /* synthetic */ ScheduledFuture lambda$schedule$2(final Runnable runnable, long j, TimeUnit timeUnit, final DelegatingScheduledFuture.Completer completer) {
return this.scheduler.schedule(new Runnable() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda6
@Override // java.lang.Runnable
public final void run() {
DelegatingScheduledExecutorService.this.lambda$schedule$1(runnable, completer);
}
}, j, timeUnit);
}
public final /* synthetic */ void lambda$schedule$1(final Runnable runnable, final DelegatingScheduledFuture.Completer completer) {
this.delegate.execute(new Runnable() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda10
@Override // java.lang.Runnable
public final void run() {
DelegatingScheduledExecutorService.lambda$schedule$0(runnable, completer);
}
});
}
public static /* synthetic */ void lambda$schedule$0(Runnable runnable, DelegatingScheduledFuture.Completer completer) {
try {
runnable.run();
completer.set(null);
} catch (Exception e) {
completer.setException(e);
}
}
@Override // java.util.concurrent.ScheduledExecutorService
public ScheduledFuture schedule(final Callable callable, final long j, final TimeUnit timeUnit) {
return new DelegatingScheduledFuture(new DelegatingScheduledFuture.Resolver() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda0
@Override // com.google.firebase.concurrent.DelegatingScheduledFuture.Resolver
public final ScheduledFuture addCompleter(DelegatingScheduledFuture.Completer completer) {
ScheduledFuture lambda$schedule$5;
lambda$schedule$5 = DelegatingScheduledExecutorService.this.lambda$schedule$5(callable, j, timeUnit, completer);
return lambda$schedule$5;
}
});
}
public final /* synthetic */ ScheduledFuture lambda$schedule$5(final Callable callable, long j, TimeUnit timeUnit, final DelegatingScheduledFuture.Completer completer) {
return this.scheduler.schedule(new Callable() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda7
@Override // java.util.concurrent.Callable
public final Object call() {
Future lambda$schedule$4;
lambda$schedule$4 = DelegatingScheduledExecutorService.this.lambda$schedule$4(callable, completer);
return lambda$schedule$4;
}
}, j, timeUnit);
}
public final /* synthetic */ Future lambda$schedule$4(final Callable callable, final DelegatingScheduledFuture.Completer completer) {
return this.delegate.submit(new Runnable() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda8
@Override // java.lang.Runnable
public final void run() {
DelegatingScheduledExecutorService.lambda$schedule$3(callable, completer);
}
});
}
public static /* synthetic */ void lambda$schedule$3(Callable callable, DelegatingScheduledFuture.Completer completer) {
try {
completer.set(callable.call());
} catch (Exception e) {
completer.setException(e);
}
}
@Override // java.util.concurrent.ScheduledExecutorService
public ScheduledFuture scheduleAtFixedRate(final Runnable runnable, final long j, final long j2, final TimeUnit timeUnit) {
return new DelegatingScheduledFuture(new DelegatingScheduledFuture.Resolver() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda3
@Override // com.google.firebase.concurrent.DelegatingScheduledFuture.Resolver
public final ScheduledFuture addCompleter(DelegatingScheduledFuture.Completer completer) {
ScheduledFuture lambda$scheduleAtFixedRate$8;
lambda$scheduleAtFixedRate$8 = DelegatingScheduledExecutorService.this.lambda$scheduleAtFixedRate$8(runnable, j, j2, timeUnit, completer);
return lambda$scheduleAtFixedRate$8;
}
});
}
public final /* synthetic */ ScheduledFuture lambda$scheduleAtFixedRate$8(final Runnable runnable, long j, long j2, TimeUnit timeUnit, final DelegatingScheduledFuture.Completer completer) {
return this.scheduler.scheduleAtFixedRate(new Runnable() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
DelegatingScheduledExecutorService.this.lambda$scheduleAtFixedRate$7(runnable, completer);
}
}, j, j2, timeUnit);
}
public final /* synthetic */ void lambda$scheduleAtFixedRate$7(final Runnable runnable, final DelegatingScheduledFuture.Completer completer) {
this.delegate.execute(new Runnable() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda9
@Override // java.lang.Runnable
public final void run() {
DelegatingScheduledExecutorService.lambda$scheduleAtFixedRate$6(runnable, completer);
}
});
}
public static /* synthetic */ void lambda$scheduleAtFixedRate$6(Runnable runnable, DelegatingScheduledFuture.Completer completer) {
try {
runnable.run();
} catch (Exception e) {
completer.setException(e);
throw e;
}
}
@Override // java.util.concurrent.ScheduledExecutorService
public ScheduledFuture scheduleWithFixedDelay(final Runnable runnable, final long j, final long j2, final TimeUnit timeUnit) {
return new DelegatingScheduledFuture(new DelegatingScheduledFuture.Resolver() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda2
@Override // com.google.firebase.concurrent.DelegatingScheduledFuture.Resolver
public final ScheduledFuture addCompleter(DelegatingScheduledFuture.Completer completer) {
ScheduledFuture lambda$scheduleWithFixedDelay$11;
lambda$scheduleWithFixedDelay$11 = DelegatingScheduledExecutorService.this.lambda$scheduleWithFixedDelay$11(runnable, j, j2, timeUnit, completer);
return lambda$scheduleWithFixedDelay$11;
}
});
}
public final /* synthetic */ ScheduledFuture lambda$scheduleWithFixedDelay$11(final Runnable runnable, long j, long j2, TimeUnit timeUnit, final DelegatingScheduledFuture.Completer completer) {
return this.scheduler.scheduleWithFixedDelay(new Runnable() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
DelegatingScheduledExecutorService.this.lambda$scheduleWithFixedDelay$10(runnable, completer);
}
}, j, j2, timeUnit);
}
public final /* synthetic */ void lambda$scheduleWithFixedDelay$10(final Runnable runnable, final DelegatingScheduledFuture.Completer completer) {
this.delegate.execute(new Runnable() { // from class: com.google.firebase.concurrent.DelegatingScheduledExecutorService$$ExternalSyntheticLambda11
@Override // java.lang.Runnable
public final void run() {
DelegatingScheduledExecutorService.lambda$scheduleWithFixedDelay$9(runnable, completer);
}
});
}
public static /* synthetic */ void lambda$scheduleWithFixedDelay$9(Runnable runnable, DelegatingScheduledFuture.Completer completer) {
try {
runnable.run();
} catch (Exception e) {
completer.setException(e);
}
}
}

View File

@@ -0,0 +1,50 @@
package com.google.firebase.concurrent;
import androidx.concurrent.futures.AbstractResolvableFuture;
import java.util.concurrent.Delayed;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
/* loaded from: classes3.dex */
public class DelegatingScheduledFuture extends AbstractResolvableFuture implements ScheduledFuture {
public final ScheduledFuture upstreamFuture;
public interface Completer {
void set(Object obj);
void setException(Throwable th);
}
public interface Resolver {
ScheduledFuture addCompleter(Completer completer);
}
public DelegatingScheduledFuture(Resolver resolver) {
this.upstreamFuture = resolver.addCompleter(new Completer() { // from class: com.google.firebase.concurrent.DelegatingScheduledFuture.1
@Override // com.google.firebase.concurrent.DelegatingScheduledFuture.Completer
public void set(Object obj) {
DelegatingScheduledFuture.this.set(obj);
}
@Override // com.google.firebase.concurrent.DelegatingScheduledFuture.Completer
public void setException(Throwable th) {
DelegatingScheduledFuture.this.setException(th);
}
});
}
@Override // androidx.concurrent.futures.AbstractResolvableFuture
public void afterDone() {
this.upstreamFuture.cancel(wasInterrupted());
}
@Override // java.util.concurrent.Delayed
public long getDelay(TimeUnit timeUnit) {
return this.upstreamFuture.getDelay(timeUnit);
}
@Override // java.lang.Comparable
public int compareTo(Delayed delayed) {
return this.upstreamFuture.compareTo(delayed);
}
}

View File

@@ -0,0 +1,147 @@
package com.google.firebase.concurrent;
import android.annotation.SuppressLint;
import android.os.StrictMode;
import com.google.firebase.annotations.concurrent.Background;
import com.google.firebase.annotations.concurrent.Blocking;
import com.google.firebase.annotations.concurrent.Lightweight;
import com.google.firebase.annotations.concurrent.UiThread;
import com.google.firebase.components.Component;
import com.google.firebase.components.ComponentContainer;
import com.google.firebase.components.ComponentFactory;
import com.google.firebase.components.ComponentRegistrar;
import com.google.firebase.components.Lazy;
import com.google.firebase.components.Qualified;
import com.google.firebase.inject.Provider;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
@SuppressLint({"ThreadPoolCreation"})
/* loaded from: classes3.dex */
public class ExecutorsRegistrar implements ComponentRegistrar {
public static final Lazy BG_EXECUTOR = new Lazy(new Provider() { // from class: com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda0
@Override // com.google.firebase.inject.Provider
public final Object get() {
ScheduledExecutorService lambda$static$0;
lambda$static$0 = ExecutorsRegistrar.lambda$static$0();
return lambda$static$0;
}
});
public static final Lazy LITE_EXECUTOR = new Lazy(new Provider() { // from class: com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda1
@Override // com.google.firebase.inject.Provider
public final Object get() {
ScheduledExecutorService lambda$static$1;
lambda$static$1 = ExecutorsRegistrar.lambda$static$1();
return lambda$static$1;
}
});
public static final Lazy BLOCKING_EXECUTOR = new Lazy(new Provider() { // from class: com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda2
@Override // com.google.firebase.inject.Provider
public final Object get() {
ScheduledExecutorService lambda$static$2;
lambda$static$2 = ExecutorsRegistrar.lambda$static$2();
return lambda$static$2;
}
});
public static final Lazy SCHEDULER = new Lazy(new Provider() { // from class: com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda3
@Override // com.google.firebase.inject.Provider
public final Object get() {
ScheduledExecutorService lambda$static$3;
lambda$static$3 = ExecutorsRegistrar.lambda$static$3();
return lambda$static$3;
}
});
public static /* synthetic */ ScheduledExecutorService lambda$static$0() {
return scheduled(Executors.newFixedThreadPool(4, factory("Firebase Background", 10, bgPolicy())));
}
public static /* synthetic */ ScheduledExecutorService lambda$static$1() {
return scheduled(Executors.newFixedThreadPool(Math.max(2, Runtime.getRuntime().availableProcessors()), factory("Firebase Lite", 0, litePolicy())));
}
public static /* synthetic */ ScheduledExecutorService lambda$static$2() {
return scheduled(Executors.newCachedThreadPool(factory("Firebase Blocking", 11)));
}
public static /* synthetic */ ScheduledExecutorService lambda$static$3() {
return Executors.newSingleThreadScheduledExecutor(factory("Firebase Scheduler", 0));
}
@Override // com.google.firebase.components.ComponentRegistrar
public List getComponents() {
return Arrays.asList(Component.builder(Qualified.qualified(Background.class, ScheduledExecutorService.class), Qualified.qualified(Background.class, ExecutorService.class), Qualified.qualified(Background.class, Executor.class)).factory(new ComponentFactory() { // from class: com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda4
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
ScheduledExecutorService lambda$getComponents$4;
lambda$getComponents$4 = ExecutorsRegistrar.lambda$getComponents$4(componentContainer);
return lambda$getComponents$4;
}
}).build(), Component.builder(Qualified.qualified(Blocking.class, ScheduledExecutorService.class), Qualified.qualified(Blocking.class, ExecutorService.class), Qualified.qualified(Blocking.class, Executor.class)).factory(new ComponentFactory() { // from class: com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda5
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
ScheduledExecutorService lambda$getComponents$5;
lambda$getComponents$5 = ExecutorsRegistrar.lambda$getComponents$5(componentContainer);
return lambda$getComponents$5;
}
}).build(), Component.builder(Qualified.qualified(Lightweight.class, ScheduledExecutorService.class), Qualified.qualified(Lightweight.class, ExecutorService.class), Qualified.qualified(Lightweight.class, Executor.class)).factory(new ComponentFactory() { // from class: com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda6
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
ScheduledExecutorService lambda$getComponents$6;
lambda$getComponents$6 = ExecutorsRegistrar.lambda$getComponents$6(componentContainer);
return lambda$getComponents$6;
}
}).build(), Component.builder(Qualified.qualified(UiThread.class, Executor.class)).factory(new ComponentFactory() { // from class: com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda7
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
Executor lambda$getComponents$7;
lambda$getComponents$7 = ExecutorsRegistrar.lambda$getComponents$7(componentContainer);
return lambda$getComponents$7;
}
}).build());
}
public static /* synthetic */ ScheduledExecutorService lambda$getComponents$4(ComponentContainer componentContainer) {
return (ScheduledExecutorService) BG_EXECUTOR.get();
}
public static /* synthetic */ ScheduledExecutorService lambda$getComponents$5(ComponentContainer componentContainer) {
return (ScheduledExecutorService) BLOCKING_EXECUTOR.get();
}
public static /* synthetic */ ScheduledExecutorService lambda$getComponents$6(ComponentContainer componentContainer) {
return (ScheduledExecutorService) LITE_EXECUTOR.get();
}
public static /* synthetic */ Executor lambda$getComponents$7(ComponentContainer componentContainer) {
return UiExecutor.INSTANCE;
}
public static ScheduledExecutorService scheduled(ExecutorService executorService) {
return new DelegatingScheduledExecutorService(executorService, (ScheduledExecutorService) SCHEDULER.get());
}
public static ThreadFactory factory(String str, int i) {
return new CustomThreadFactory(str, i, null);
}
public static ThreadFactory factory(String str, int i, StrictMode.ThreadPolicy threadPolicy) {
return new CustomThreadFactory(str, i, threadPolicy);
}
public static StrictMode.ThreadPolicy bgPolicy() {
StrictMode.ThreadPolicy.Builder detectNetwork = new StrictMode.ThreadPolicy.Builder().detectNetwork();
detectNetwork.detectResourceMismatches();
detectNetwork.detectUnbufferedIo();
return detectNetwork.penaltyLog().build();
}
public static StrictMode.ThreadPolicy litePolicy() {
return new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build();
}
}

View File

@@ -0,0 +1,23 @@
package com.google.firebase.concurrent;
import java.util.concurrent.Executor;
/* loaded from: classes3.dex */
public abstract class FirebaseExecutors {
public static Executor newSequentialExecutor(Executor executor) {
return new SequentialExecutor(executor);
}
public static Executor directExecutor() {
return DirectExecutor.INSTANCE;
}
public enum DirectExecutor implements Executor {
INSTANCE;
@Override // java.util.concurrent.Executor
public void execute(Runnable runnable) {
runnable.run();
}
}
}

View File

@@ -0,0 +1,299 @@
package com.google.firebase.concurrent;
import com.google.android.gms.common.internal.Preconditions;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.concurrent.Executor;
import java.util.logging.Logger;
/* loaded from: classes3.dex */
public final class SequentialExecutor implements Executor {
public static final Logger log = Logger.getLogger(SequentialExecutor.class.getName());
public final Executor executor;
public final Deque queue = new ArrayDeque();
public WorkerRunningState workerRunningState = WorkerRunningState.IDLE;
public long workerRunCount = 0;
public final QueueWorker worker = new QueueWorker();
public enum WorkerRunningState {
IDLE,
QUEUING,
QUEUED,
RUNNING
}
public static /* synthetic */ long access$308(SequentialExecutor sequentialExecutor) {
long j = sequentialExecutor.workerRunCount;
sequentialExecutor.workerRunCount = 1 + j;
return j;
}
public SequentialExecutor(Executor executor) {
this.executor = (Executor) Preconditions.checkNotNull(executor);
}
/* JADX WARN: Removed duplicated region for block: B:45:0x0066 A[ADDED_TO_REGION] */
@Override // java.util.concurrent.Executor
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void execute(final java.lang.Runnable r8) {
/*
r7 = this;
com.google.android.gms.common.internal.Preconditions.checkNotNull(r8)
java.util.Deque r0 = r7.queue
monitor-enter(r0)
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r1 = r7.workerRunningState // Catch: java.lang.Throwable -> L6d
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r2 = com.google.firebase.concurrent.SequentialExecutor.WorkerRunningState.RUNNING // Catch: java.lang.Throwable -> L6d
if (r1 == r2) goto L6f
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r2 = com.google.firebase.concurrent.SequentialExecutor.WorkerRunningState.QUEUED // Catch: java.lang.Throwable -> L6d
if (r1 != r2) goto L11
goto L6f
L11:
long r3 = r7.workerRunCount // Catch: java.lang.Throwable -> L6d
com.google.firebase.concurrent.SequentialExecutor$1 r1 = new com.google.firebase.concurrent.SequentialExecutor$1 // Catch: java.lang.Throwable -> L6d
r1.<init>() // Catch: java.lang.Throwable -> L6d
java.util.Deque r8 = r7.queue // Catch: java.lang.Throwable -> L6d
r8.add(r1) // Catch: java.lang.Throwable -> L6d
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r8 = com.google.firebase.concurrent.SequentialExecutor.WorkerRunningState.QUEUING // Catch: java.lang.Throwable -> L6d
r7.workerRunningState = r8 // Catch: java.lang.Throwable -> L6d
monitor-exit(r0) // Catch: java.lang.Throwable -> L6d
java.util.concurrent.Executor r0 = r7.executor // Catch: java.lang.Error -> L44 java.lang.RuntimeException -> L46
com.google.firebase.concurrent.SequentialExecutor$QueueWorker r5 = r7.worker // Catch: java.lang.Error -> L44 java.lang.RuntimeException -> L46
r0.execute(r5) // Catch: java.lang.Error -> L44 java.lang.RuntimeException -> L46
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r0 = r7.workerRunningState
if (r0 == r8) goto L2e
return
L2e:
java.util.Deque r0 = r7.queue
monitor-enter(r0)
long r5 = r7.workerRunCount // Catch: java.lang.Throwable -> L3e
int r1 = (r5 > r3 ? 1 : (r5 == r3 ? 0 : -1))
if (r1 != 0) goto L40
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r1 = r7.workerRunningState // Catch: java.lang.Throwable -> L3e
if (r1 != r8) goto L40
r7.workerRunningState = r2 // Catch: java.lang.Throwable -> L3e
goto L40
L3e:
r8 = move-exception
goto L42
L40:
monitor-exit(r0) // Catch: java.lang.Throwable -> L3e
return
L42:
monitor-exit(r0) // Catch: java.lang.Throwable -> L3e
throw r8
L44:
r8 = move-exception
goto L47
L46:
r8 = move-exception
L47:
java.util.Deque r2 = r7.queue
monitor-enter(r2)
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r0 = r7.workerRunningState // Catch: java.lang.Throwable -> L55
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r3 = com.google.firebase.concurrent.SequentialExecutor.WorkerRunningState.IDLE // Catch: java.lang.Throwable -> L55
if (r0 == r3) goto L57
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r3 = com.google.firebase.concurrent.SequentialExecutor.WorkerRunningState.QUEUING // Catch: java.lang.Throwable -> L55
if (r0 != r3) goto L61
goto L57
L55:
r8 = move-exception
goto L6b
L57:
java.util.Deque r0 = r7.queue // Catch: java.lang.Throwable -> L55
boolean r0 = r0.removeLastOccurrence(r1) // Catch: java.lang.Throwable -> L55
if (r0 == 0) goto L61
r0 = 1
goto L62
L61:
r0 = 0
L62:
boolean r1 = r8 instanceof java.util.concurrent.RejectedExecutionException // Catch: java.lang.Throwable -> L55
if (r1 == 0) goto L6a
if (r0 != 0) goto L6a
monitor-exit(r2) // Catch: java.lang.Throwable -> L55
return
L6a:
throw r8 // Catch: java.lang.Throwable -> L55
L6b:
monitor-exit(r2) // Catch: java.lang.Throwable -> L55
throw r8
L6d:
r8 = move-exception
goto L76
L6f:
java.util.Deque r1 = r7.queue // Catch: java.lang.Throwable -> L6d
r1.add(r8) // Catch: java.lang.Throwable -> L6d
monitor-exit(r0) // Catch: java.lang.Throwable -> L6d
return
L76:
monitor-exit(r0) // Catch: java.lang.Throwable -> L6d
throw r8
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.concurrent.SequentialExecutor.execute(java.lang.Runnable):void");
}
public final class QueueWorker implements Runnable {
public Runnable task;
public QueueWorker() {
}
@Override // java.lang.Runnable
public void run() {
try {
workOnQueue();
} catch (Error e) {
synchronized (SequentialExecutor.this.queue) {
SequentialExecutor.this.workerRunningState = WorkerRunningState.IDLE;
throw e;
}
}
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x0054, code lost:
r1 = r1 | java.lang.Thread.interrupted();
r2 = null;
*/
/* JADX WARN: Code restructure failed: missing block: B:12:0x0056, code lost:
r8.task.run();
*/
/* JADX WARN: Code restructure failed: missing block: B:16:0x0060, code lost:
r0 = move-exception;
*/
/* JADX WARN: Code restructure failed: missing block: B:17:0x0080, code lost:
r8.task = null;
*/
/* JADX WARN: Code restructure failed: missing block: B:18:0x0082, code lost:
throw r0;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x0062, code lost:
r3 = move-exception;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x0063, code lost:
com.google.firebase.concurrent.SequentialExecutor.log.log(java.util.logging.Level.SEVERE, "Exception while executing runnable " + r8.task, (java.lang.Throwable) r3);
*/
/* JADX WARN: Code restructure failed: missing block: B:28:0x004e, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:29:?, code lost:
return;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void workOnQueue() {
/*
r8 = this;
r0 = 0
r1 = r0
L2:
com.google.firebase.concurrent.SequentialExecutor r2 = com.google.firebase.concurrent.SequentialExecutor.this // Catch: java.lang.Throwable -> L5e
java.util.Deque r2 = com.google.firebase.concurrent.SequentialExecutor.access$100(r2) // Catch: java.lang.Throwable -> L5e
monitor-enter(r2) // Catch: java.lang.Throwable -> L5e
if (r0 != 0) goto L2d
com.google.firebase.concurrent.SequentialExecutor r0 = com.google.firebase.concurrent.SequentialExecutor.this // Catch: java.lang.Throwable -> L20
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r0 = com.google.firebase.concurrent.SequentialExecutor.access$200(r0) // Catch: java.lang.Throwable -> L20
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r3 = com.google.firebase.concurrent.SequentialExecutor.WorkerRunningState.RUNNING // Catch: java.lang.Throwable -> L20
if (r0 != r3) goto L22
monitor-exit(r2) // Catch: java.lang.Throwable -> L20
if (r1 == 0) goto L1f
java.lang.Thread r0 = java.lang.Thread.currentThread()
r0.interrupt()
L1f:
return
L20:
r0 = move-exception
goto L83
L22:
com.google.firebase.concurrent.SequentialExecutor r0 = com.google.firebase.concurrent.SequentialExecutor.this // Catch: java.lang.Throwable -> L20
com.google.firebase.concurrent.SequentialExecutor.access$308(r0) // Catch: java.lang.Throwable -> L20
com.google.firebase.concurrent.SequentialExecutor r0 = com.google.firebase.concurrent.SequentialExecutor.this // Catch: java.lang.Throwable -> L20
com.google.firebase.concurrent.SequentialExecutor.access$202(r0, r3) // Catch: java.lang.Throwable -> L20
r0 = 1
L2d:
com.google.firebase.concurrent.SequentialExecutor r3 = com.google.firebase.concurrent.SequentialExecutor.this // Catch: java.lang.Throwable -> L20
java.util.Deque r3 = com.google.firebase.concurrent.SequentialExecutor.access$100(r3) // Catch: java.lang.Throwable -> L20
java.lang.Object r3 = r3.poll() // Catch: java.lang.Throwable -> L20
java.lang.Runnable r3 = (java.lang.Runnable) r3 // Catch: java.lang.Throwable -> L20
r8.task = r3 // Catch: java.lang.Throwable -> L20
if (r3 != 0) goto L4f
com.google.firebase.concurrent.SequentialExecutor r0 = com.google.firebase.concurrent.SequentialExecutor.this // Catch: java.lang.Throwable -> L20
com.google.firebase.concurrent.SequentialExecutor$WorkerRunningState r3 = com.google.firebase.concurrent.SequentialExecutor.WorkerRunningState.IDLE // Catch: java.lang.Throwable -> L20
com.google.firebase.concurrent.SequentialExecutor.access$202(r0, r3) // Catch: java.lang.Throwable -> L20
monitor-exit(r2) // Catch: java.lang.Throwable -> L20
if (r1 == 0) goto L4e
java.lang.Thread r0 = java.lang.Thread.currentThread()
r0.interrupt()
L4e:
return
L4f:
monitor-exit(r2) // Catch: java.lang.Throwable -> L20
boolean r2 = java.lang.Thread.interrupted() // Catch: java.lang.Throwable -> L5e
r1 = r1 | r2
r2 = 0
java.lang.Runnable r3 = r8.task // Catch: java.lang.Throwable -> L60 java.lang.RuntimeException -> L62
r3.run() // Catch: java.lang.Throwable -> L60 java.lang.RuntimeException -> L62
L5b:
r8.task = r2 // Catch: java.lang.Throwable -> L5e
goto L2
L5e:
r0 = move-exception
goto L85
L60:
r0 = move-exception
goto L80
L62:
r3 = move-exception
java.util.logging.Logger r4 = com.google.firebase.concurrent.SequentialExecutor.access$400() // Catch: java.lang.Throwable -> L60
java.util.logging.Level r5 = java.util.logging.Level.SEVERE // Catch: java.lang.Throwable -> L60
java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> L60
r6.<init>() // Catch: java.lang.Throwable -> L60
java.lang.String r7 = "Exception while executing runnable "
r6.append(r7) // Catch: java.lang.Throwable -> L60
java.lang.Runnable r7 = r8.task // Catch: java.lang.Throwable -> L60
r6.append(r7) // Catch: java.lang.Throwable -> L60
java.lang.String r6 = r6.toString() // Catch: java.lang.Throwable -> L60
r4.log(r5, r6, r3) // Catch: java.lang.Throwable -> L60
goto L5b
L80:
r8.task = r2 // Catch: java.lang.Throwable -> L5e
throw r0 // Catch: java.lang.Throwable -> L5e
L83:
monitor-exit(r2) // Catch: java.lang.Throwable -> L20
throw r0 // Catch: java.lang.Throwable -> L5e
L85:
if (r1 == 0) goto L8e
java.lang.Thread r1 = java.lang.Thread.currentThread()
r1.interrupt()
L8e:
throw r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.concurrent.SequentialExecutor.QueueWorker.workOnQueue():void");
}
public String toString() {
Runnable runnable = this.task;
if (runnable != null) {
return "SequentialExecutorWorker{running=" + runnable + "}";
}
return "SequentialExecutorWorker{state=" + SequentialExecutor.this.workerRunningState + "}";
}
}
public String toString() {
return "SequentialExecutor@" + System.identityHashCode(this) + "{" + this.executor + "}";
}
}

View File

@@ -0,0 +1,20 @@
package com.google.firebase.concurrent;
import android.annotation.SuppressLint;
import android.os.Handler;
import android.os.Looper;
import java.util.concurrent.Executor;
/* loaded from: classes3.dex */
public enum UiExecutor implements Executor {
INSTANCE;
@SuppressLint({"ThreadPoolCreation"})
private static final Handler HANDLER = new Handler(Looper.getMainLooper());
@Override // java.util.concurrent.Executor
public void execute(Runnable runnable) {
HANDLER.post(runnable);
}
}