导航菜单

页面标题

页面副标题

VIP-LODDER v3.3.1 - LogSenderInstaller.java 源代码

正在查看: VIP-LODDER v3.3.1 应用的 LogSenderInstaller.java JAVA 源代码文件

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


package com.itsaky.androidide.logsender.utils;

import android.app.Application;
import android.app.BackgroundServiceStartNotAllowedException;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import com.itsaky.androidide.logsender.LogSender;
import com.itsaky.androidide.logsender.LogSenderService;

public class LogSenderInstaller extends ContentProvider {
    @Override
    public boolean onCreate() {
        Application application = (Application) getContext();
        if (LogSender.PACKAGE_ANDROIDIDE.equals(application.getPackageName())) {
            return true;
        }
        try {
            Intent intent = new Intent(application, (Class<?>) LogSenderService.class);
            intent.setAction(LogSenderService.ACTION_START_SERVICE);
            if (Build.VERSION.SDK_INT >= 26) {
                application.startForegroundService(intent);
            } else {
                application.startService(intent);
            }
        } catch (Exception e) {
            if (Build.VERSION.SDK_INT < 31 || !(e instanceof BackgroundServiceStartNotAllowedException)) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }

    @Override
    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
        return null;
    }

    @Override
    public String getType(Uri uri) {
        return null;
    }

    @Override
    public Uri insert(Uri uri, ContentValues values) {
        return null;
    }

    @Override
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        return 0;
    }

    @Override
    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
        return 0;
    }
}