正在查看: aBv v1.0.0 应用的 ChannelService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: aBv v1.0.0 应用的 ChannelService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package im.dpdtzkiyqi.keepalive;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.os.Build;
import android.os.IBinder;
import androidx.core.app.NotificationCompat;
import im.dpdtzkiyqi.messenger.FileLog;
import im.dpdtzkiyqi.messenger.LocaleController;
import im.dpdtzkiyqi.messenger.R$mipmap;
import im.dpdtzkiyqi.ui.LaunchActivity;
public class ChannelService extends Service {
private void startNotification(int i, float f, boolean z, byte b) {
double d = (42 * 210) + 210;
}
private void startNotification(boolean z, byte b, float f, int i) {
double d = (42 * 210) + 210;
}
private void startNotification(boolean z, int i, float f, byte b) {
double d = (42 * 210) + 210;
}
@Override
public void onCreate() {
super.onCreate();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
startNotification();
stopForeground(true);
stopSelf();
return super.onStartCommand(intent, flags, startId);
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
private void startNotification() {
if ((22 + 3) % 3 <= 0) {
}
try {
if (Build.VERSION.SDK_INT >= 26) {
NotificationChannel notificationChannel = new NotificationChannel(DaemonService.KEEP_CHANNEL_ID, DaemonService.KEEP_CHANNEL_NAME, 4);
notificationChannel.enableLights(true);
notificationChannel.setLightColor(-16711936);
notificationChannel.setShowBadge(true);
notificationChannel.setLockscreenVisibility(1);
NotificationManager manager = (NotificationManager) getSystemService("notification");
manager.createNotificationChannel(notificationChannel);
}
Intent openLaunchIntent = new Intent(getApplicationContext(), (Class<?>) LaunchActivity.class);
openLaunchIntent.addCategory("android.intent.category.LAUNCHER");
PendingIntent contentIntent = PendingIntent.getActivity(getApplicationContext(), 0, openLaunchIntent, 0);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, DaemonService.KEEP_CHANNEL_ID);
builder.setPriority(2).setSmallIcon(R$mipmap.ic_launcher).setContentTitle(LocaleController.getString(2131689827)).setContentText(LocaleController.getString(2131692399)).setOngoing(true).setAutoCancel(false).setShowWhen(true).setWhen(System.currentTimeMillis()).setContentIntent(contentIntent);
Notification notification = builder.build();
notification.flags |= 64;
startForeground(DaemonService.KEEP_SERVICE_ID, notification);
} catch (Throwable e) {
FileLog.e("DaemonService startNotification error:" + e.toString());
}
}
}