Idle Tower v2.48版本的 MD5 值为:56f20496f6a85726b376356ed2ecee23
以下内容为反编译后的 ApplicationUtility.java 源代码,内容仅作参考
package com.voxelbusters.essentialkit.extras;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import com.voxelbusters.essentialkit.utilities.ApplicationUtil;
import com.voxelbusters.essentialkit.utilities.common.annotations.RunOnUiThread;
import com.voxelbusters.essentialkit.utilities.common.interfaces.IFeature;
public class ApplicationUtility implements IFeature {
public Context context;
public ApplicationUtility(Context context) {
this.context = context;
}
@Override
public String getFeatureName() {
return "Application Utility";
}
@RunOnUiThread
public void openApplicationSettings() {
Intent intent = new Intent();
intent.addFlags(268435456);
String packageName = this.context.getPackageName();
intent.setData(Uri.parse("package:" + packageName));
int i = Build.VERSION.SDK_INT;
if (i >= 26) {
intent.setAction("android.settings.APPLICATION_DETAILS_SETTINGS");
} else {
intent.setAction("android.settings.APPLICATION_DETAILS_SETTINGS");
if (i >= 21) {
intent.putExtra("app_package", packageName);
intent.putExtra("app_uid", ApplicationUtil.getApplicationInfo(this.context).uid);
} else {
intent.addCategory("android.intent.category.DEFAULT");
}
}
this.context.startActivity(intent);
}
@RunOnUiThread
public void openGooglePlayStoreLink(String str) {
try {
this.context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + str)));
} catch (Exception unused) {
this.context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + str)));
}
}
}