导航菜单

页面标题

页面副标题

MX Player v1.97.8 - MusicPlayerService.java 源代码

正在查看: MX Player v1.97.8 应用的 MusicPlayerService.java JAVA 源代码文件

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


package com.mxtech.music.player;

import android.app.Notification;
import android.app.Service;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.IBinder;
import defpackage.b0c;
import defpackage.d0c;
import defpackage.pl0;
import defpackage.tya;

public class MusicPlayerService extends Service {
    public static MusicPlayerService c;
    public boolean b;

    @Override
    public final SharedPreferences getSharedPreferences(String str, int i) {
        return tya.m.getSharedPreferences(str, i);
    }

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

    @Override
    public final void onCreate() {
        super.onCreate();
        c = this;
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        c = null;
        this.b = false;
    }

    @Override
    public final int onStartCommand(Intent intent, int i, int i2) {
        if (intent != null) {
            String action = intent.getAction();
            if ("action_send_notification".equals(action)) {
                int intExtra = intent.getIntExtra("notification_id", -1);
                b0c b0cVar = b0c.g;
                Notification notification = b0cVar != null ? b0cVar.f : null;
                if (notification != null && !this.b) {
                    if (Build.VERSION.SDK_INT < 31) {
                        startForeground(intExtra, notification);
                    } else if (pl0.a(this)) {
                        startForeground(intExtra, notification, 2);
                    }
                    this.b = true;
                }
            } else if ("action_cancel_notification".equals(action)) {
                stopForeground(true);
                c = null;
                this.b = false;
                stopSelf();
            }
        }
        return 1;
    }

    @Override
    public final void onTaskRemoved(Intent intent) {
        d0c.i().h(false);
    }
}