Initial version -- added millennium read funcionality
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.google.android.gms.common.util.concurrent;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.internal.common.zzi;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class HandlerExecutor implements Executor {
|
||||
private final Handler zza;
|
||||
|
||||
public HandlerExecutor(Looper looper) {
|
||||
this.zza = new zzi(looper);
|
||||
}
|
||||
|
||||
@Override // java.util.concurrent.Executor
|
||||
public final void execute(Runnable runnable) {
|
||||
this.zza.post(runnable);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.google.android.gms.common.util.concurrent;
|
||||
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class NamedThreadFactory implements ThreadFactory {
|
||||
private final String zza;
|
||||
private final ThreadFactory zzb = Executors.defaultThreadFactory();
|
||||
|
||||
public NamedThreadFactory(String str) {
|
||||
Preconditions.checkNotNull(str, "Name must not be null");
|
||||
this.zza = str;
|
||||
}
|
||||
|
||||
@Override // java.util.concurrent.ThreadFactory
|
||||
public final Thread newThread(Runnable runnable) {
|
||||
Thread threadNewThread = this.zzb.newThread(new zza(runnable, 0));
|
||||
threadNewThread.setName(this.zza);
|
||||
return threadNewThread;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.google.android.gms.common.util.concurrent;
|
||||
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class NumberedThreadFactory implements ThreadFactory {
|
||||
private final String zza;
|
||||
private final AtomicInteger zzb = new AtomicInteger();
|
||||
private final ThreadFactory zzc = Executors.defaultThreadFactory();
|
||||
|
||||
public NumberedThreadFactory(String str) {
|
||||
Preconditions.checkNotNull(str, "Name must not be null");
|
||||
this.zza = str;
|
||||
}
|
||||
|
||||
@Override // java.util.concurrent.ThreadFactory
|
||||
public final Thread newThread(Runnable runnable) {
|
||||
Thread threadNewThread = this.zzc.newThread(new zza(runnable, 0));
|
||||
threadNewThread.setName(this.zza + "[" + this.zzb.getAndIncrement() + "]");
|
||||
return threadNewThread;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.google.android.gms.common.util.concurrent;
|
||||
|
||||
import android.os.Process;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zza implements Runnable {
|
||||
private final Runnable zza;
|
||||
|
||||
public zza(Runnable runnable, int i) {
|
||||
this.zza = runnable;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
Process.setThreadPriority(0);
|
||||
this.zza.run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user