正在查看: 火箭TNT加速 v1.5.4 应用的 StatusProvider.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 火箭TNT加速 v1.5.4 应用的 StatusProvider.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.github.kr328.clash.service;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import androidx.core.app.NotificationCompat;
import com.facebook.react.uimanager.events.PointerEventHelper;
import com.facebook.react.views.textinput.ReactTextInputShadowNode;
import com.github.kr328.clash.common.Global;
import com.google.android.gms.actions.SearchIntents;
import java.io.File;
import kotlin.Metadata;
import kotlin.io.FilesKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000D\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0011\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\u0018\u0000 \u001e2\u00020\u0001:\u0001\u001eB\u0005¢\u0006\u0002\u0010\u0002J&\u0010\u0003\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\b\u0010\b\u001a\u0004\u0018\u00010\u0004H\u0016J1\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\b\u0010\r\u001a\u0004\u0018\u00010\u00062\u0010\u0010\u000e\u001a\f\u0012\u0006\b\u0001\u0012\u00020\u0006\u0018\u00010\u000fH\u0016¢\u0006\u0002\u0010\u0010J\u0012\u0010\u0011\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u000b\u001a\u00020\fH\u0016J\u001c\u0010\u0012\u001a\u0004\u0018\u00010\f2\u0006\u0010\u000b\u001a\u00020\f2\b\u0010\u0013\u001a\u0004\u0018\u00010\u0014H\u0016J\b\u0010\u0015\u001a\u00020\u0016H\u0016JO\u0010\u0017\u001a\u0004\u0018\u00010\u00182\u0006\u0010\u000b\u001a\u00020\f2\u0010\u0010\u0019\u001a\f\u0012\u0006\b\u0001\u0012\u00020\u0006\u0018\u00010\u000f2\b\u0010\r\u001a\u0004\u0018\u00010\u00062\u0010\u0010\u000e\u001a\f\u0012\u0006\b\u0001\u0012\u00020\u0006\u0018\u00010\u000f2\b\u0010\u001a\u001a\u0004\u0018\u00010\u0006H\u0016¢\u0006\u0002\u0010\u001bJ;\u0010\u001c\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\b\u0010\u0013\u001a\u0004\u0018\u00010\u00142\b\u0010\r\u001a\u0004\u0018\u00010\u00062\u0010\u0010\u000e\u001a\f\u0012\u0006\b\u0001\u0012\u00020\u0006\u0018\u00010\u000fH\u0016¢\u0006\u0002\u0010\u001d¨\u0006\u001f"}, d2 = {"Lcom/github/kr328/clash/service/StatusProvider;", "Landroid/content/ContentProvider;", "()V", NotificationCompat.CATEGORY_CALL, "Landroid/os/Bundle;", "method", PointerEventHelper.POINTER_TYPE_UNKNOWN, "arg", "extras", "delete", PointerEventHelper.POINTER_TYPE_UNKNOWN, "uri", "Landroid/net/Uri;", ReactTextInputShadowNode.PROP_SELECTION, "selectionArgs", PointerEventHelper.POINTER_TYPE_UNKNOWN, "(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I", "getType", "insert", "values", "Landroid/content/ContentValues;", "onCreate", PointerEventHelper.POINTER_TYPE_UNKNOWN, SearchIntents.EXTRA_QUERY, "Landroid/database/Cursor;", "projection", "sortOrder", "(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;", "update", "(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I", "Companion", "service_meta-alphaRelease"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final class StatusProvider extends ContentProvider {
private static final String CLASH_SERVICE_RUNNING_FILE = "service_running.lock";
public static final Companion INSTANCE = new Companion(null);
public static final String METHOD_CURRENT_PROFILE = "currentProfile";
private static String currentProfile;
private static boolean serviceRunning;
@Override
public boolean onCreate() {
return true;
}
@Override
public Bundle call(String method, String arg, Bundle extras) {
Intrinsics.checkNotNullParameter(method, "method");
if (Intrinsics.areEqual(method, METHOD_CURRENT_PROFILE)) {
if (!serviceRunning) {
return null;
}
Bundle bundle = new Bundle();
bundle.putString("name", "running");
return bundle;
}
return super.call(method, arg, extras);
}
@Override
public Uri insert(Uri uri, ContentValues values) {
Intrinsics.checkNotNullParameter(uri, "uri");
throw new IllegalArgumentException("Stub!");
}
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
Intrinsics.checkNotNullParameter(uri, "uri");
throw new IllegalArgumentException("Stub!");
}
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
Intrinsics.checkNotNullParameter(uri, "uri");
throw new IllegalArgumentException("Stub!");
}
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
Intrinsics.checkNotNullParameter(uri, "uri");
throw new IllegalArgumentException("Stub!");
}
@Override
public String getType(Uri uri) {
Intrinsics.checkNotNullParameter(uri, "uri");
throw new IllegalArgumentException("Stub!");
}
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0007\n\u0002\u0010\u000b\n\u0002\b\t\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u001c\u0010\u0006\u001a\u0004\u0018\u00010\u0004X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\nR$\u0010\r\u001a\u00020\f2\u0006\u0010\u000b\u001a\u00020\f@FX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u000e\u0010\u000f\"\u0004\b\u0010\u0010\u0011R$\u0010\u0012\u001a\u00020\f2\u0006\u0010\u000b\u001a\u00020\f8F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b\u0013\u0010\u000f\"\u0004\b\u0014\u0010\u0011¨\u0006\u0015"}, d2 = {"Lcom/github/kr328/clash/service/StatusProvider$Companion;", PointerEventHelper.POINTER_TYPE_UNKNOWN, "()V", "CLASH_SERVICE_RUNNING_FILE", PointerEventHelper.POINTER_TYPE_UNKNOWN, "METHOD_CURRENT_PROFILE", StatusProvider.METHOD_CURRENT_PROFILE, "getCurrentProfile", "()Ljava/lang/String;", "setCurrentProfile", "(Ljava/lang/String;)V", "value", PointerEventHelper.POINTER_TYPE_UNKNOWN, "serviceRunning", "getServiceRunning", "()Z", "setServiceRunning", "(Z)V", "shouldStartClashOnBoot", "getShouldStartClashOnBoot", "setShouldStartClashOnBoot", "service_meta-alphaRelease"}, k = 1, mv = {1, 7, 1}, xi = 48)
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final boolean getServiceRunning() {
return StatusProvider.serviceRunning;
}
public final void setServiceRunning(boolean z) {
StatusProvider.serviceRunning = z;
setShouldStartClashOnBoot(z);
}
public final boolean getShouldStartClashOnBoot() {
File filesDir = Global.INSTANCE.getApplication().getFilesDir();
Intrinsics.checkNotNullExpressionValue(filesDir, "Global.application.filesDir");
return FilesKt.resolve(filesDir, StatusProvider.CLASH_SERVICE_RUNNING_FILE).exists();
}
public final void setShouldStartClashOnBoot(boolean z) {
File filesDir = Global.INSTANCE.getApplication().getFilesDir();
Intrinsics.checkNotNullExpressionValue(filesDir, "Global.application.filesDir");
File resolve = FilesKt.resolve(filesDir, StatusProvider.CLASH_SERVICE_RUNNING_FILE);
if (z) {
resolve.createNewFile();
} else {
resolve.delete();
}
}
public final String getCurrentProfile() {
return StatusProvider.currentProfile;
}
public final void setCurrentProfile(String str) {
StatusProvider.currentProfile = str;
}
}
}