导航菜单

页面标题

页面副标题

爱心e站 v1.0.0 - KillSelfService.java 源代码

正在查看: 爱心e站 v1.0.0 应用的 KillSelfService.java JAVA 源代码文件

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


package com.newheyd.JZKFcanjiren;

import android.app.Service;
import android.content.Intent;
import android.os.Handler;
import android.os.IBinder;
import android.support.annotation.Nullable;

public class KillSelfService extends Service {
    private static long stopDelayed = 2000;
    private String PackageName;
    private Handler handler = new Handler();

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

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        stopDelayed = intent.getLongExtra("Delayed", 1000L);
        this.PackageName = intent.getStringExtra("PackageName");
        this.handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent LaunchIntent = KillSelfService.this.getPackageManager().getLaunchIntentForPackage(KillSelfService.this.PackageName);
                KillSelfService.this.startActivity(LaunchIntent);
                KillSelfService.this.stopSelf();
            }
        }, stopDelayed);
        return super.onStartCommand(intent, flags, startId);
    }
}