导航菜单

页面标题

页面副标题

Share Any v2.1.7 - WorkerService.java 源代码

正在查看: Share Any v2.1.7 应用的 WorkerService.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package net.shareany.app.service;

import a2.f;
import a6.d;
import a6.n;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Binder;
import android.os.IBinder;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import m5.h;
import p5.g;

public class WorkerService extends g {
    public static final String e = h.a(new byte[]{81, 9, 95, 72, 85, 3, 92, 9, 92, 4, 87, 18, 83, 72, 91, 8, 70, 3, 92, 18, 28, 7, 81, 18, 91, 9, 92, 72, 121, 47, 126, 42, 109, 53, 123, 33, 124, 39, 126}, new byte[]{50, 102});
    public static final String h = h.a(new byte[]{-50, -82, -64, -17, -54, -92, -61, -82, -61, -93, -56, -75, -52, -17, -60, -81, -39, -92, -61, -75, -125, -96, -50, -75, -60, -82, -61, -17, -26, -120, -31, -115, -14, Byte.MIN_VALUE, -31, -115, -14, -110, -28, -122, -29, Byte.MIN_VALUE, -31}, new byte[]{-83, -63});
    public static final String k = h.a(new byte[]{17, 113, 0, 123, 21, 93, 21, 122, 31, 64, 16}, new byte[]{116, 9});
    public final List<c> b = new ArrayList();
    public final ExecutorService c = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
    public final a d = new a();

    public class a extends Binder {
        public a() {
        }
    }

    public interface b {
    }

    public static abstract class c<T extends b> extends f {
        public va.b a;
        public WorkerService b;
        public long c;
        public T d;

        public class a implements ServiceConnection {
            public final Context a;

            public a(Context context) {
                this.a = context;
            }

            @Override
            public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
                try {
                    Context context = this.a;
                    Intent intent = new Intent(this.a, (Class<?>) WorkerService.class);
                    int i = d.a;
                    context.startService(intent);
                    WorkerService workerService = WorkerService.this;
                    workerService.c.submit(new net.shareany.app.service.a(workerService, c.this));
                    this.a.unbindService(this);
                } catch (Throwable th) {
                    th.printStackTrace();
                }
            }

            @Override
            public void onServiceDisconnected(ComponentName componentName) {
            }
        }

        public c() {
            super(1);
            this.c = 0L;
        }

        public va.b d() {
            if (this.a == null) {
                this.a = new va.b();
            }
            return this.a;
        }

        public boolean e(String str) {
            if (System.currentTimeMillis() - this.c <= 2000) {
                return false;
            }
            WorkerService workerService = this.b;
            String str2 = WorkerService.e;
            Objects.requireNonNull(workerService);
            this.c = System.currentTimeMillis();
            return true;
        }

        public boolean equals(Object obj) {
            boolean z = obj instanceof c;
            return super/*java.lang.Object*/.equals(obj);
        }

        public boolean f(Context context) {
            return context.bindService(new Intent(context, (Class<?>) WorkerService.class), new a(context), 1);
        }

        public int hashCode() {
            return super/*java.lang.Object*/.hashCode();
        }
    }

    public synchronized void b(c cVar) {
        synchronized (this.b) {
            this.b.remove(cVar);
            if (this.b.size() <= 0) {
                stopForeground(true);
            }
        }
    }

    public IBinder onBind(Intent intent) {
        return this.d;
    }

    public void onCreate() {
        super/*android.app.Service*/.onCreate();
        h.a(new byte[]{98, 89, 98, 1, 117, 79, 89, 83, Byte.MAX_VALUE, 64, 110, 68, 50, 8}, new byte[]{26, 33});
    }

    public void onDestroy() {
        super/*android.app.Service*/.onDestroy();
        h.a(new byte[]{47, 83, 47, 11, 56, 69, 19, 78, 36, 95, 37, 68, 46, 3, 126}, new byte[]{87, 43});
        synchronized (this.b) {
            Iterator<c> it = this.b.iterator();
            while (it.hasNext()) {
                it.next().d().b(false);
            }
        }
    }

    public int onStartCommand(Intent intent, int i, int i2) {
        c cVar;
        h.a(new byte[]{17, -58, 17, -98, 6, -48, 58, -54, 8, -52, 29, -3, 6, -45, 4, -33, 7, -38, 65, -105, 73}, new byte[]{105, -66});
        Objects.toString(intent);
        if (intent != null) {
            if (e.equals(intent.getAction())) {
                String str = k;
                if (intent.hasExtra(str)) {
                    int intExtra = intent.getIntExtra(str, -1);
                    synchronized (this) {
                        synchronized (this.b) {
                            Iterator<c> it = this.b.iterator();
                            while (true) {
                                if (!it.hasNext()) {
                                    cVar = null;
                                    break;
                                }
                                cVar = it.next();
                                if (cVar.hashCode() == intExtra) {
                                    break;
                                }
                            }
                        }
                    }
                    if (cVar == null || cVar.d().a) {
                        if (((g) this).a == null) {
                            ((g) this).a = new n(getApplicationContext(), d.c(this));
                        }
                        ((g) this).a.a.b.cancel(null, intExtra);
                    } else {
                        cVar.d().b(true);
                    }
                }
            }
            if (h.equals(intent.getAction())) {
                synchronized (this.b) {
                    Iterator<c> it2 = this.b.iterator();
                    while (it2.hasNext()) {
                        it2.next().d().b(true);
                    }
                }
            }
        }
        return 1;
    }
}