导航菜单

页面标题

页面副标题

Crafto v9.3.3 - HttpPostService.java 源代码

正在查看: Crafto v9.3.3 应用的 HttpPostService.java JAVA 源代码文件

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


package com.uxcam.service;

import android.app.Service;
import android.content.Intent;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import com.uxcam.internals.dc;
import com.uxcam.internals.gh;
import com.uxcam.internals.gr;
import com.uxcam.internals.hb;
import com.uxcam.internals.ih;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.ConcurrentModificationException;
import java.util.List;

public class HttpPostService extends Service {
    public static boolean a = false;
    public static List b = Collections.synchronizedList(new ArrayList());

    public final class aa extends Handler {
        public aa(HttpPostService httpPostService, Looper looper) {
            super(looper);
        }

        @Override
        public void handleMessage(Message message) {
            String string = message.getData().getString("arg_which_service");
            boolean z = HttpPostService.a;
            hb.a("HttpPostService").getClass();
            string.getClass();
            switch (string) {
                case "send_offline_data":
                    new gh(ih.c).b();
                    break;
                case "stop_foreground":
                    hb.a("HttpPostService").getClass();
                    break;
                case "screen_upload":
                    try {
                        new dc(ih.c).a();
                        break;
                    } catch (Exception unused) {
                        boolean z2 = HttpPostService.a;
                        hb.a("HttpPostService").getClass();
                        return;
                    }
                case "value_stop_uxcam":
                    gr.a().a(ih.c, "");
                    break;
            }
        }
    }

    public static synchronized void a(File file) {
        synchronized (HttpPostService.class) {
            try {
                for (String str : b) {
                    if (file.getAbsolutePath().equals(str)) {
                        b.remove(str);
                    }
                }
            } catch (ConcurrentModificationException unused) {
                a(file);
            }
        }
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
    }

    @Override
    public void onDestroy() {
        try {
            Thread.sleep(700L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        a = false;
    }

    @Override
    public int onStartCommand(Intent intent, int i, int i2) {
        if (intent != null && intent.getExtras() != null) {
            a = true;
            String string = intent.getExtras().getString("arg_which_service");
            if (string != null && !string.equalsIgnoreCase("stop_foreground")) {
                HandlerThread handlerThread = new HandlerThread("ServiceStartArguments", 10);
                handlerThread.start();
                aa aaVar = new aa(this, handlerThread.getLooper());
                Message obtainMessage = aaVar.obtainMessage();
                obtainMessage.arg1 = i2;
                obtainMessage.setData(intent.getExtras());
                aaVar.sendMessage(obtainMessage);
            }
        }
        return 2;
    }

    @Override
    public void onTaskRemoved(Intent intent) {
        stopSelf();
    }
}