APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Music Player
版本号:1.0
包名称:music.downloader.mp3player.downloadmusic

MD5 校验值:61e58c10a11e4adec8760ee3854e996a

反编译源代码说明

PlayerActivity.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package music.downloader.mp3player.downloadmusic.ui.activity;

import A1.f;
import B.d;
import P4.c;
import Q4.v;
import S3.p;
import S4.a;
import T4.n;
import X4.h;
import Y4.l;
import a1.C0224c;
import a1.C0225d;
import android.app.Activity;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.media.session.m;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.widget.AppCompatSeekBar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import c4.b;
import c4.e;
import c4.i;
import c4.o;
import c4.r;
import com.chibde.visualizer.BarVisualizer;
import com.google.android.gms.internal.ads.C0398Kc;
import com.google.gson.Gson;
import com.wang.avi.AVLoadingIndicatorView;
import io.reactivex.rxjava3.annotations.SchedulerSupport;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import music.downloader.mp3player.downloadmusic.MainActivityX;
import music.downloader.mp3player.downloadmusic.MusicApp;
import music.downloader.mp3player.downloadmusic.R;
import music.downloader.mp3player.downloadmusic.service.MusicPlayerService;
import music.downloader.mp3player.downloadmusic.ui.fragment.player.FragmentPlayer;
import music.downloader.mp3player.downloadmusic.widget.SwipeViewPager;
import n4.AbstractC2102e;
import n4.ThreadFactoryC2099b;
import n5.InterfaceC2106d;
import org.greenrobot.eventbus.ThreadMode;
import org.schabi.newpipe.extractor.stream.Stream;

public class PlayerActivity extends a implements InterfaceC2106d {

    public static final int f17340K = 0;

    public Dialog f17341A;

    public p f17342B;

    public String f17343C;

    public String f17344D;

    public File f17346F;
    public MusicPlayerService G;

    public l f17347H;

    public C0398Kc f17348I;

    public TextView f17349J;

    @BindView
    public ImageButton btnBack;

    @BindView
    public ImageButton btnDownload;

    @BindView
    ImageButton btnEqz;

    @BindView
    public ImageButton btnFavorite;

    @BindView
    public ImageButton btnNextBig;

    @BindView
    public ImageButton btnPriveBig;

    @BindView
    public ImageView btn_loop;

    @BindView
    public ImageView btn_more;

    @BindView
    public ImageView btn_now_Playing;

    @BindView
    public ImageView btn_playPause;

    @BindView
    public ImageView btn_shuffle;

    @BindView
    public AVLoadingIndicatorView bufferView;

    @BindView
    public CoordinatorLayout coordinator;

    @BindView
    public SwipeViewPager pagerControl;

    @BindView
    public AppCompatSeekBar seekBarSmall;

    @BindView
    public TextView tv_artist;

    @BindView
    public TextView tv_duration;

    @BindView
    public TextView tv_name;

    @BindView
    public TextView tv_timePlaying;

    public v f17351v;

    public View f17352w;

    public C0225d f17353x;

    public BarVisualizer f17354y;

    public String f17350u = SchedulerSupport.NONE;

    public final c f17355z = new c(this, 4);

    public boolean f17345E = false;

    public final void S() {
        if (MusicPlayerService.f17270q0 != null) {
            BarVisualizer barVisualizer = (BarVisualizer) findViewById(R.id.visualizer);
            this.f17354y = barVisualizer;
            try {
                barVisualizer.setColor(d.a(this, R.color.green));
                this.f17354y.setDensity(120.0f);
                this.f17354y.setPlayer(MusicPlayerService.f17270q0.f907A);
            } catch (RuntimeException e) {
                e.printStackTrace();
            }
        }
    }

    @Override
    public final void k(h hVar) {
        this.G.a(hVar);
    }

    public void lambda$showDialogDownload$1$PlayerActivity(View view) {
        b[] bVarArr;
        new File(this.f17346F.getPath()).delete();
        new File(AbstractC2102e.e(this.f17346F.getPath())).delete();
        m mVar = c4.m.f5696a;
        synchronized (mVar) {
            o oVar = (o) mVar.f4650b;
            ((ThreadPoolExecutor) oVar.f5699a).shutdownNow();
            LinkedBlockingQueue linkedBlockingQueue = new LinkedBlockingQueue();
            oVar.f5700b = linkedBlockingQueue;
            ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(3, 3, 15L, TimeUnit.SECONDS, linkedBlockingQueue, new ThreadFactoryC2099b("LauncherTask"));
            threadPoolExecutor.allowCoreThreadTimeOut(true);
            oVar.f5699a = threadPoolExecutor;
        }
        f fVar = e.f5678a;
        synchronized (fVar.f62a) {
            bVarArr = (b[]) fVar.f62a.toArray(new b[fVar.f62a.size()]);
        }
        for (b bVar : bVarArr) {
            bVar.getClass();
            synchronized (bVar.f5668n) {
                bVar.f5657a.c();
            }
        }
        C0224c c0224c = i.f5688a;
        if (((c4.p) c0224c.e).a()) {
            c0224c.r0();
        } else {
            File b7 = r.b();
            if (!b7.getParentFile().exists()) {
                b7.getParentFile().mkdirs();
            }
            if (b7.exists()) {
                com.bumptech.glide.d.q(r.class, "marker file " + b7.getAbsolutePath() + " exists", new Object[0]);
            } else {
                try {
                    com.bumptech.glide.d.c(r.class, "create marker file" + b7.getAbsolutePath() + Stream.ID_UNKNOWN + b7.createNewFile(), new Object[0]);
                } catch (IOException e) {
                    com.bumptech.glide.d.k(6, r.class, null, "create marker file failed", e);
                }
            }
        }
        i.f5688a.c0();
        this.f17341A.dismiss();
    }

    public void lambda$showRateDialog$2$PlayerActivity(View view) {
        if (C0224c.f4536f == null) {
            Context applicationContext = getApplicationContext();
            C0224c c0224c = new C0224c(29);
            c0224c.e = PreferenceManager.getDefaultSharedPreferences(applicationContext);
            C0224c.f4536f = c0224c;
        }
        SharedPreferences.Editor edit = ((SharedPreferences) C0224c.f4536f.e).edit();
        edit.putBoolean("PREF_DONT_SHOW_RATE_gaudio", true);
        edit.apply();
        Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + getPackageName()));
        intent.addFlags(1208483840);
        try {
            startActivity(intent);
        } catch (ActivityNotFoundException unused) {
            startActivity(new Intent("android.intent.action.VIEW", Uri.parse("http://play.google.com/store/apps/details?id=" + getPackageName())));
        }
        throw null;
    }

    public void lambda$showRateDialog$3$PlayerActivity(View view) {
        if (C0224c.f4536f == null) {
            Context applicationContext = getApplicationContext();
            C0224c c0224c = new C0224c(29);
            c0224c.e = PreferenceManager.getDefaultSharedPreferences(applicationContext);
            C0224c.f4536f = c0224c;
        }
        C0224c c0224c2 = C0224c.f4536f;
        long currentTimeMillis = System.currentTimeMillis();
        SharedPreferences.Editor edit = ((SharedPreferences) c0224c2.e).edit();
        edit.putLong("PREF_TIME_LATTER_4_HOUR_gaudio", currentTimeMillis);
        edit.apply();
        throw null;
    }

    @Override
    public final void n(h hVar) {
        Intent intent = new Intent("android.settings.action.MANAGE_WRITE_SETTINGS");
        intent.setData(Uri.parse("package:" + getPackageName()));
        intent.addFlags(268435456);
        startActivity(intent);
        this.f3156t = hVar;
    }

    @N5.i(sticky = true, threadMode = ThreadMode.MAIN)
    public void onAddToLoveSong(T4.a aVar) {
        MusicPlayerService musicPlayerService = this.G;
        if (musicPlayerService != null) {
            musicPlayerService.f17277H = musicPlayerService.c0.e();
            this.G.m();
        }
        if (aVar.f3490a) {
            ImageButton imageButton = this.btnFavorite;
            if (imageButton != null) {
                imageButton.setImageResource(R.drawable.favorite_on);
                return;
            }
            return;
        }
        ImageButton imageButton2 = this.btnFavorite;
        if (imageButton2 != null) {
            imageButton2.setImageResource(R.drawable.favorite_off);
        }
    }

    @Override
    public final void onBackPressed() {
        if (this.f17345E) {
            try {
                unbindService(this.f17355z);
            } catch (Exception unused) {
            }
        }
        if (this.f17350u != null) {
            startActivity(new Intent(this, (Class<?>) MainActivityX.class));
            finish();
            return;
        }
        C0225d c0225d = this.f17353x;
        N2.a aVar = (N2.a) c0225d.e;
        if (aVar != null) {
            aVar.b((Activity) c0225d.f4540f);
        } else {
            System.out.println("interstitialAd = null");
        }
        finish();
    }

    public void onClickControl(View view) {
        view.getId();
    }

    @Override
    public final void onCreate(Bundle bundle) {
        ImageView imageView;
        int i5;
        ImageView imageView2;
        int i6;
        int i7 = 1;
        super.onCreate(bundle);
        setContentView(R.layout.activity_player);
        Gson gson = MusicApp.f17251m;
        ButterKnife.b(this);
        this.f17350u = getIntent().getStringExtra("notify");
        this.btn_shuffle.setOnTouchListener(c5.d.f5708b);
        this.f17348I = new C0398Kc(new U4.b(this, "DEFAULT_FAVORITEDOWNLOAD"));
        this.f17342B = new p((Context) this, (InterfaceC2106d) this, true);
        this.f17347H = l.E(this);
        this.tv_name.setSelected(true);
        if (this.f17347H.D("com.eskaylation.downloadmusic.SHUFFLE_MUSIC")) {
            imageView = this.btn_shuffle;
            i5 = R.drawable.ic_shuffle_on;
        } else {
            imageView = this.btn_shuffle;
            i5 = R.drawable.ic_shuffle;
        }
        imageView.setImageResource(i5);
        if (this.f17347H.F() == 0) {
            imageView2 = this.btn_loop;
            i6 = R.drawable.ic_loop;
        } else if (this.f17347H.F() == 1) {
            imageView2 = this.btn_loop;
            i6 = R.drawable.ic_loop_one;
        } else {
            if (this.f17347H.F() == 999) {
                imageView2 = this.btn_loop;
                i6 = R.drawable.ic_loop_all;
            }
            this.seekBarSmall.setOnSeekBarChangeListener(new c5.c(this));
            v vVar = new v(((androidx.fragment.app.r) this.f15379n.f4650b).f5195o);
            this.f17351v = vVar;
            FragmentPlayer fragmentPlayer = new FragmentPlayer();
            String string = getString(R.string.tit_song);
            vVar.f2654f.add(fragmentPlayer);
            vVar.f2655g.add(string);
            this.pagerControl.setAdapter(this.f17351v);
            this.pagerControl.setOffscreenPageLimit(this.f17351v.f2654f.size() - 1);
            this.btn_loop.setOnClickListener(new c5.b(this, 6));
            this.btnNextBig.setOnClickListener(new c5.b(this, 7));
            this.btnBack.setOnClickListener(new c5.b(this, 8));
            this.btnDownload.setOnClickListener(new c5.b(this, 9));
            this.btn_playPause.setOnClickListener(new c5.b(this, 10));
            this.btnPriveBig.setOnClickListener(new c5.b(this, 11));
            this.btn_more.setOnClickListener(new c5.b(this, 0));
            this.btn_now_Playing.setOnClickListener(new c5.b(this, i7));
            this.btnFavorite.setOnClickListener(new c5.b(this, 2));
            this.btn_shuffle.setOnClickListener(new c5.b(this, 3));
            ImageButton imageButton = (ImageButton) findViewById(R.id.btn_eqz);
            this.btnEqz = imageButton;
            imageButton.setOnClickListener(new c5.b(this, 5));
            C0225d c0225d = new C0225d((Activity) this);
            this.f17353x = c0225d;
            c0225d.E();
            this.f17354y = (BarVisualizer) findViewById(R.id.visualizer);
            S();
        }
        imageView2.setImageResource(i6);
        this.seekBarSmall.setOnSeekBarChangeListener(new c5.c(this));
        v vVar2 = new v(((androidx.fragment.app.r) this.f15379n.f4650b).f5195o);
        this.f17351v = vVar2;
        FragmentPlayer fragmentPlayer2 = new FragmentPlayer();
        String string2 = getString(R.string.tit_song);
        vVar2.f2654f.add(fragmentPlayer2);
        vVar2.f2655g.add(string2);
        this.pagerControl.setAdapter(this.f17351v);
        this.pagerControl.setOffscreenPageLimit(this.f17351v.f2654f.size() - 1);
        this.btn_loop.setOnClickListener(new c5.b(this, 6));
        this.btnNextBig.setOnClickListener(new c5.b(this, 7));
        this.btnBack.setOnClickListener(new c5.b(this, 8));
        this.btnDownload.setOnClickListener(new c5.b(this, 9));
        this.btn_playPause.setOnClickListener(new c5.b(this, 10));
        this.btnPriveBig.setOnClickListener(new c5.b(this, 11));
        this.btn_more.setOnClickListener(new c5.b(this, 0));
        this.btn_now_Playing.setOnClickListener(new c5.b(this, i7));
        this.btnFavorite.setOnClickListener(new c5.b(this, 2));
        this.btn_shuffle.setOnClickListener(new c5.b(this, 3));
        ImageButton imageButton2 = (ImageButton) findViewById(R.id.btn_eqz);
        this.btnEqz = imageButton2;
        imageButton2.setOnClickListener(new c5.b(this, 5));
        C0225d c0225d2 = new C0225d((Activity) this);
        this.f17353x = c0225d2;
        c0225d2.E();
        this.f17354y = (BarVisualizer) findViewById(R.id.visualizer);
        S();
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        Gson gson = MusicApp.f17251m;
    }

    @Override
    public final void onResume() {
        super.onResume();
        bindService(new Intent(this, (Class<?>) MusicPlayerService.class), this.f17355z, 1);
        S();
    }

    @Override
    public final void onStart() {
        super.onStart();
    }

    @Override
    public final void onStop() {
        if (this.f17345E) {
            try {
                unbindService(this.f17355z);
            } catch (Exception unused) {
            }
        }
        super.onStop();
    }

    @Override
    @N5.i(sticky = true, threadMode = ThreadMode.MAIN)
    public void onStopService(n nVar) {
        if (nVar.f3496a) {
            if (!isFinishing()) {
                finish();
            }
            N5.d.b().h(new n(false));
        }
    }

    @N5.i(sticky = true, threadMode = ThreadMode.MAIN)
    public void EndSong(T4.e eVar) {
    }

    @Override
    public final void c(h hVar) {
    }

    @N5.i(sticky = true, threadMode = ThreadMode.MAIN)
    public void paletteColor(T4.l lVar) {
    }

    @N5.i(sticky = true, threadMode = ThreadMode.MAIN)
    public void refreshData(T4.f fVar) {
    }

    @Override
    public final void t(h hVar) {
    }
}