正在查看: Dostt v1.0.89 应用的 MediaProjectionService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Dostt v1.0.89 应用的 MediaProjectionService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.oney.WebRTCModule;
import android.app.Activity;
import android.app.Notification;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;
import android.util.Log;
import java.util.Random;
public class MediaProjectionService extends Service {
private static final String b = "MediaProjectionService";
private final IBinder a = new a();
public class a extends Binder {
public a() {
}
}
public static void a(Context context) {
if (U0.a().g) {
context.stopService(new Intent(context, (Class<?>) MediaProjectionService.class));
}
}
public static void b(Activity activity, ServiceConnection serviceConnection) {
if (U0.a().g) {
AbstractC1254q.b(activity);
Intent intent = new Intent(activity, (Class<?>) MediaProjectionService.class);
activity.bindService(intent, serviceConnection, 64);
try {
if ((Build.VERSION.SDK_INT >= 26 ? activity.startForegroundService(intent) : activity.startService(intent)) == null) {
Log.w(b, "Media projection service not started");
} else {
Log.i(b, "Media projection service started");
}
} catch (RuntimeException e) {
Log.w(b, "Media projection service not started", e);
}
}
}
@Override
public IBinder onBind(Intent intent) {
return this.a;
}
@Override
public int onStartCommand(Intent intent, int i, int i2) {
Notification a2 = AbstractC1254q.a(this);
int nextInt = new Random().nextInt(Integer.MAX_VALUE);
if (Build.VERSION.SDK_INT >= 29) {
startForeground(nextInt, a2, 32);
return 2;
}
startForeground(nextInt, a2);
return 2;
}
}