正在查看: Chaupal v3.2 应用的 h0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Chaupal v3.2 应用的 h0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package hd;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import com.yupptv.ott.enums.ScreenType;
import java.util.Iterator;
import java.util.regex.Pattern;
public class h0 {
public static String a(String str) {
if (str == null) {
return "";
}
if (str.startsWith("+")) {
str = str.substring(1, str.length());
}
if (str.startsWith("+")) {
str = str.substring(1, str.length());
}
if (str.contains("-")) {
str = str.replace("-", "");
}
h.b("3", str);
return str;
}
public static String b(Context context) {
PackageManager packageManager = context.getPackageManager();
try {
packageManager.getApplicationInfo(context.getPackageName(), 0);
} catch (PackageManager.NameNotFoundException unused) {
}
try {
return packageManager.getPackageInfo(context.getPackageName(), 0).versionName;
} catch (PackageManager.NameNotFoundException unused2) {
return "";
}
}
public static ScreenType c(String str) {
try {
return ScreenType.getType(str);
} catch (IllegalArgumentException unused) {
return null;
}
}
public static void d(Activity activity) {
View currentFocus = activity.getCurrentFocus();
if (currentFocus != null) {
((InputMethodManager) activity.getSystemService("input_method")).hideSoftInputFromWindow(currentFocus.getWindowToken(), 2);
}
}
public static void e(Context context) {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("market://details?id=" + context.getPackageName()));
boolean z = false;
Iterator<ResolveInfo> it = context.getPackageManager().queryIntentActivities(intent, 0).iterator();
while (true) {
if (!it.hasNext()) {
break;
}
ResolveInfo next = it.next();
if (next.activityInfo.applicationInfo.packageName.equals("com.android.vending")) {
ActivityInfo activityInfo = next.activityInfo;
ComponentName componentName = new ComponentName(activityInfo.applicationInfo.packageName, activityInfo.name);
intent.setFlags(337641472);
intent.setComponent(componentName);
context.startActivity(intent);
z = true;
break;
}
}
if (z) {
return;
}
context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + context.getPackageName())));
}
public static void f(Context context) {
try {
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.SUBJECT", "chaupal");
intent.putExtra("android.intent.extra.TEXT", "\nLet me recommend you this application\n\nhttps://play.google.com/store/apps/details?id=tv.chaupal.android\n\n");
context.startActivity(Intent.createChooser(intent, "choose one"));
} catch (Exception unused) {
}
}
public static Bitmap g(Drawable drawable) {
int intrinsicWidth = drawable.getIntrinsicWidth();
int intrinsicHeight = drawable.getIntrinsicHeight();
Rect rect = new Rect(drawable.getBounds());
Bitmap createBitmap = Bitmap.createBitmap(intrinsicWidth, intrinsicHeight, Bitmap.Config.ARGB_8888);
drawable.setBounds(0, 0, intrinsicWidth, intrinsicHeight);
drawable.draw(new Canvas(createBitmap));
drawable.setBounds(rect);
return createBitmap;
}
public static boolean h(String str) {
return Pattern.compile("^[0-9]{4,6}$").matcher(str).matches();
}
}