导航菜单

页面标题

页面副标题

管控平台 v5.2.3.0. - AlarmService.java 源代码

正在查看: 管控平台 v5.2.3.0. 应用的 AlarmService.java JAVA 源代码文件

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


package com.iflytek.mdmservice.service;

import android.app.AlarmManager;
import android.app.IntentService;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import androidx.annotation.Nullable;
import com.iflytek.mdmservice.MDMApp;
import com.iflytek.mdmservice.R$drawable;

public class AlarmService extends IntentService {

    private static final Uri f430b = Uri.parse("content://com.simplemobiletools.clock.providers.AlarmProvider/alarms");

    private AlarmManager f431a;

    public AlarmService() {
        this("AlarmService");
    }

    @Override
    public void onCreate() {
        super.onCreate();
        this.f431a = (AlarmManager) MDMApp.j().getSystemService("alarm");
        if (Build.VERSION.SDK_INT >= 26) {
            String packageName = getPackageName();
            NotificationManager notificationManager = (NotificationManager) getSystemService(com.igexin.push.core.b.l);
            NotificationChannel notificationChannel = new NotificationChannel(packageName, "主服务", 4);
            notificationChannel.enableLights(true);
            notificationChannel.setLightColor(-65536);
            notificationChannel.setShowBadge(true);
            notificationChannel.setDescription("管控平台正在后台运行,请勿停用此服务!");
            notificationChannel.setLockscreenVisibility(-1);
            notificationManager.createNotificationChannel(notificationChannel);
            startForeground(1120, new Notification.Builder(this, packageName).setContentTitle("正在进行设备管控").setContentText("管控平台正在后台运行,请勿停用此服务!").setWhen(System.currentTimeMillis()).setSmallIcon(R$drawable.ic_notification_mdm).setLargeIcon(BitmapFactory.decodeResource(getResources(), R$drawable.ic_notification_mdm)).build());
        }
    }

    @Override
    protected void onHandleIntent(@androidx.annotation.Nullable android.content.Intent r18) {
        throw new UnsupportedOperationException("Method not decompiled: com.iflytek.mdmservice.service.AlarmService.onHandleIntent(android.content.Intent):void");
    }

    @Override
    public int onStartCommand(@Nullable Intent intent, int i, int i2) {
        if (Build.VERSION.SDK_INT >= 26) {
            String packageName = getPackageName();
            NotificationManager notificationManager = (NotificationManager) getSystemService(com.igexin.push.core.b.l);
            NotificationChannel notificationChannel = new NotificationChannel(packageName, "主服务", 4);
            notificationChannel.enableLights(true);
            notificationChannel.setLightColor(-65536);
            notificationChannel.setShowBadge(true);
            notificationChannel.setDescription("管控平台正在后台运行,请勿停用此服务!");
            notificationChannel.setLockscreenVisibility(-1);
            notificationManager.createNotificationChannel(notificationChannel);
            startForeground(1120, new Notification.Builder(this, packageName).setContentTitle("正在进行设备管控").setContentText("管控平台正在后台运行,请勿停用此服务!").setWhen(System.currentTimeMillis()).setSmallIcon(R$drawable.ic_notification_mdm).setLargeIcon(BitmapFactory.decodeResource(getResources(), R$drawable.ic_notification_mdm)).build());
        }
        return super.onStartCommand(intent, i, i2);
    }

    public AlarmService(String str) {
        super(str);
    }
}