整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 OooOOO0.java 源代码,内容仅作参考
package com.ys.resemble.util;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Point;
import android.graphics.Rect;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Proxy;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Process;
import android.provider.Settings;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.style.AbsoluteSizeSpan;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
import com.baidu.mobads.sdk.internal.bw;
import com.bytedance.sdk.openadsdk.downloadnew.core.TTDownloadField;
import com.czhj.sdk.common.Constants;
import com.ss.android.socialbase.downloader.utils.DownloadExpSwitchCode;
import com.ys.resemble.app.AppApplication;
import com.ys.resemble.data.local.AdNumShowDao;
import com.ys.resemble.data.local.VideoAdLookDao;
import com.ys.resemble.data.local.VideoStayTimeDao;
import com.ys.resemble.server.killSelfService;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.net.NetworkInterface;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import me.goldze.mvvmhabit.base.BaseApplication;
public class OooOOO0 {
private static long OooO00o;
public static String OooO(Context context) {
ApplicationInfo applicationInfo;
Bundle bundle;
if (context == null) {
return null;
}
try {
PackageManager packageManager = context.getPackageManager();
if (packageManager == null || (applicationInfo = packageManager.getApplicationInfo(context.getPackageName(), 128)) == null || (bundle = applicationInfo.metaData) == null) {
return null;
}
return bundle.getString("UMENG_CHANNEL");
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
return null;
}
}
public static void OooO00o() {
if (o0000.OooOOoo().equals(me.goldze.mvvmhabit.utils.OooO0OO.OooO0o0())) {
return;
}
o0000.o00Ooo(me.goldze.mvvmhabit.utils.OooO0OO.OooO0o0());
o0000.Oooooo(0);
o0000.o0O0O00(0);
VideoStayTimeDao.getInstance().clearHistory();
o0000.o0000O00(0L);
o0000.o00ooo(0);
o0000.oo0o0Oo(0);
o0000.o000OOo(0);
o0000.OoooOoo(0);
AdNumShowDao.getInstance().update();
VideoAdLookDao.getInstance().clearHistory();
}
public static boolean OooO0O0(Activity activity) {
Display defaultDisplay = activity.getWindowManager().getDefaultDisplay();
DisplayMetrics displayMetrics = new DisplayMetrics();
if (Build.VERSION.SDK_INT >= 17) {
defaultDisplay.getRealMetrics(displayMetrics);
}
int i = displayMetrics.heightPixels;
int i2 = displayMetrics.widthPixels;
DisplayMetrics displayMetrics2 = new DisplayMetrics();
defaultDisplay.getMetrics(displayMetrics2);
return i2 - displayMetrics2.widthPixels > 0 || i - displayMetrics2.heightPixels > 0;
}
public static boolean OooO0OO(ConnectivityManager connectivityManager) {
NetworkInfo networkInfo = connectivityManager.getNetworkInfo(17);
if (networkInfo == null) {
return false;
}
return networkInfo.isConnected();
}
public static boolean OooO0Oo(Context context) {
NetworkInfo networkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getNetworkInfo(17);
if (networkInfo == null) {
return false;
}
return networkInfo.isConnected();
}
public static void OooO0o(String str) {
ClipboardManager clipboardManager = (ClipboardManager) me.goldze.mvvmhabit.utils.o0OoOo0.getContext().getSystemService("clipboard");
me.goldze.mvvmhabit.utils.o000oOoO.OooO0OO("已复制");
}
public static void OooO0o0(String str) {
ClipboardManager clipboardManager = (ClipboardManager) me.goldze.mvvmhabit.utils.o0OoOo0.getContext().getSystemService("clipboard");
}
public static void OooO0oO() {
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath(), "isSimple.txt");
try {
if (file.exists()) {
return;
}
file.createNewFile();
RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rwd");
randomAccessFile.seek(file.length());
randomAccessFile.write("123545678ddscdscdscsdvcdscdsv".getBytes());
randomAccessFile.close();
} catch (IOException unused) {
}
}
public static String OooO0oo(String str) {
if (!TextUtils.isEmpty(str)) {
String[] strArr = {"\\", "$", "(", ")", "*", "+", ".", "[", "]", "?", "^", "{", "}", "|"};
for (int i = 0; i < 14; i++) {
String str2 = strArr[i];
if (str.contains(str2)) {
str = str.replace(str2, "\\" + str2);
}
}
}
return str;
}
public static int OooOO0(Activity activity) {
return OooOOOo(activity) - OooOO0O(activity);
}
public static int OooOO0O(Activity activity) {
Resources resources = activity.getResources();
int identifier = resources.getIdentifier("navigation_bar_height", "dimen", "android");
if (identifier > 0 && OooO0O0(activity) && OooOoO0(activity)) {
return resources.getDimensionPixelSize(identifier);
}
return 0;
}
public static String OooOO0o(Context context) {
SharedPreferences sharedPreferences = context.getSharedPreferences("deviceId", 0);
String string = sharedPreferences.getString("key", "");
if (string == null || string.isEmpty()) {
String string2 = Settings.System.getString(context.getContentResolver(), "android_id");
if (string2 == null || string2.isEmpty() || string2.equals("0000000000000000")) {
string2 = OooOOOO();
}
String str = string2;
sharedPreferences.edit().putString("key", str).apply();
return str;
}
return string;
}
public static int OooOOO() {
return (int) (Math.random() * 20.0d);
}
public static void OooOOO0(Context context) {
SharedPreferences sharedPreferences = context.getSharedPreferences("deviceId", 0);
String string = sharedPreferences.getString("key", "");
if (me.goldze.mvvmhabit.utils.Oooo000.OooO00o(string)) {
return;
}
if (string.equals("0000000000000000") || string.length() == 20) {
o0000.o00000o0("");
sharedPreferences.edit().putString("key", OooOOOO()).apply();
}
}
public static String OooOOOO() {
char[] cArr = new char[22];
for (int i = 0; i < 22; i++) {
if (((int) (Math.random() * 2.0d)) == 0) {
cArr[i] = (char) ((Math.random() * 10.0d) + 48.0d);
} else {
cArr[i] = (char) ((Math.random() * 6.0d) + 97.0d);
}
}
return new String(cArr);
}
public static int OooOOOo(Activity activity) {
if (activity == null) {
return 0;
}
Display defaultDisplay = activity.getWindowManager().getDefaultDisplay();
if (Build.VERSION.SDK_INT >= 17) {
DisplayMetrics displayMetrics = new DisplayMetrics();
defaultDisplay.getRealMetrics(displayMetrics);
return displayMetrics.heightPixels;
}
try {
return ((Integer) Display.class.getMethod("getRawHeight", new Class[0]).invoke(defaultDisplay, new Object[0])).intValue();
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
public static SpannableString OooOOo(String str) {
if (Double.parseDouble(str) < 7.0d) {
return new SpannableString("");
}
int indexOf = str.indexOf(46);
int length = str.length();
SpannableString spannableString = new SpannableString(str);
if (indexOf > 0 && length > 0) {
spannableString.setSpan(new AbsoluteSizeSpan(40), 0, indexOf, 18);
spannableString.setSpan(new AbsoluteSizeSpan(27), indexOf, length, 18);
} else {
spannableString.setSpan(new AbsoluteSizeSpan(40), 0, length, 18);
}
return spannableString;
}
public static String OooOOo0() {
return OooOO0O.OooO0OO(BaseApplication.OooO00o(), "com.wholepoint.wpfilms", "SHA1");
}
public static int OooOOoo(Context context) {
WindowManager windowManager = (WindowManager) context.getSystemService("window");
Display defaultDisplay = windowManager.getDefaultDisplay();
DisplayMetrics displayMetrics = new DisplayMetrics();
try {
Class.forName("android.view.Display").getMethod("getRealMetrics", DisplayMetrics.class).invoke(defaultDisplay, displayMetrics);
return displayMetrics.heightPixels - windowManager.getDefaultDisplay().getHeight();
} catch (Exception e) {
e.printStackTrace();
return 0;
}
}
public static boolean OooOo(String str) {
return str.matches("^(1[3456789]+\\d{9})$");
}
public static boolean OooOo0() {
long currentTimeMillis = System.currentTimeMillis();
boolean z = currentTimeMillis - OooO00o < 500;
OooO00o = currentTimeMillis;
return z;
}
public static boolean OooOo00() {
return new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath(), "isSimple.txt").exists();
}
public static boolean OooOo0O(long j) {
long currentTimeMillis = System.currentTimeMillis();
boolean z = currentTimeMillis - OooO00o >= j;
OooO00o = currentTimeMillis;
return z;
}
public static boolean OooOo0o(String str) {
return str.matches("^[a-z0-9A-Z]+$");
}
public static boolean OooOoO(Context context, String str) {
List<ActivityManager.RunningServiceInfo> runningServices = ((ActivityManager) context.getSystemService(TTDownloadField.TT_ACTIVITY)).getRunningServices(40);
if (runningServices.size() <= 0) {
return false;
}
for (int i = 0; i < runningServices.size(); i++) {
if (runningServices.get(i).service.getClassName().toString().equals(str)) {
return true;
}
}
return false;
}
private static boolean OooOoO0(Activity activity) {
if (Build.VERSION.SDK_INT >= 17) {
Display defaultDisplay = activity.getWindow().getWindowManager().getDefaultDisplay();
Point point = new Point();
defaultDisplay.getRealSize(point);
View decorView = activity.getWindow().getDecorView();
if (2 == activity.getResources().getConfiguration().orientation) {
if (point.x == decorView.findViewById(16908290).getWidth()) {
return false;
}
} else {
Rect rect = new Rect();
decorView.getWindowVisibleDisplayFrame(rect);
if (rect.bottom == point.y) {
return false;
}
}
return true;
}
return false;
}
public static boolean OooOoOO(View view, boolean z) {
Rect rect = new Rect();
view.getLocalVisibleRect(rect);
return z ? rect.top == 0 : rect.top >= 0;
}
public static boolean OooOoo() {
String host;
int port;
if (Build.VERSION.SDK_INT >= 14) {
host = System.getProperty("http.proxyHost");
String property = System.getProperty("http.proxyPort");
if (property == null) {
property = "-1";
}
port = Integer.parseInt(property);
} else {
host = Proxy.getHost(BaseApplication.OooO00o());
port = Proxy.getPort(BaseApplication.OooO00o());
}
return (TextUtils.isEmpty(host) || port == -1) ? false : true;
}
public static boolean OooOoo0() {
try {
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
if (networkInterfaces != null) {
Iterator it = Collections.list(networkInterfaces).iterator();
while (it.hasNext()) {
NetworkInterface networkInterface = (NetworkInterface) it.next();
if (networkInterface.isUp() && networkInterface.getInterfaceAddresses().size() != 0 && ("tun0".equals(networkInterface.getName()) || "tun1".equals(networkInterface.getName()) || "ppp0".equals(networkInterface.getName()))) {
return true;
}
}
return false;
}
return false;
} catch (Throwable th) {
th.printStackTrace();
return false;
}
}
public static SpannableString OooOooO(String str, String str2) {
SpannableString spannableString = new SpannableString(str);
String OooO0oo = OooO0oo(str2);
if (OooO0oo(str).contains(OooO0oo) && !TextUtils.isEmpty(OooO0oo)) {
try {
Matcher matcher = Pattern.compile(OooO0oo).matcher(spannableString);
while (matcher.find()) {
spannableString.setSpan(new BookSearchStyleSpan(0), matcher.start(), matcher.end(), 33);
}
} catch (Exception e) {
me.goldze.mvvmhabit.utils.OooOO0.OooO0O0(e.toString());
}
}
return spannableString;
}
public static String OooOooo(String str) {
if (TextUtils.isEmpty(str)) {
return "";
}
try {
String str2 = "";
for (byte b : MessageDigest.getInstance(bw.a).digest(str.getBytes())) {
String hexString = Integer.toHexString(b & 255);
if (hexString.length() == 1) {
hexString = Constants.FAIL + hexString;
}
str2 = str2 + hexString;
}
return str2;
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return "";
}
}
public static String Oooo0() {
return "2vU&=Va+jZO-59%_";
}
public static String Oooo000(String str) {
return me.goldze.mvvmhabit.utils.OooO.OooO00o(Oooo000.OooO00o) + OooOO0o(BaseApplication.OooO00o()) + str;
}
public static void Oooo00O(Context context) {
Intent launchIntentForPackage = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
launchIntentForPackage.setFlags(268468224);
launchIntentForPackage.addFlags(DownloadExpSwitchCode.BACK_BUGFIX_SIGBUS);
context.startActivity(launchIntentForPackage);
Process.killProcess(Process.myPid());
System.exit(0);
}
public static void Oooo00o(Context context) {
Intent intent = new Intent(context, killSelfService.class);
intent.putExtra("PackageName", context.getPackageName());
intent.putExtra("Delayed", 100);
intent.setFlags(268468224);
context.startService(intent);
Process.killProcess(Process.myPid());
System.exit(0);
}
public static String Oooo0O0(String str) {
Matcher matcher = Pattern.compile("(\\\\u(\\p{XDigit}{4}))").matcher(str);
while (matcher.find()) {
String group = matcher.group(1);
str = str.replace(group, ((char) Integer.parseInt(matcher.group(2), 16)) + "");
}
return str;
}
public static String Oooo0OO(String str, String str2) {
return "http://127.0.0.1:" + AppApplication.OooO0OO + "/control?msg=up_ck&src=" + OooOOO.OooO00o(str) + "&ck=" + str2;
}
public static String Oooo0o(String str) {
return "http://127.0.0.1:" + AppApplication.OooO0OO + "/resource.m3u8?src=" + OooOOO.OooO00o(str);
}
public static String Oooo0o0(String str) {
return "http://127.0.0.1:" + AppApplication.OooO0OO + "/resource.m3u8?src=" + OooOOO.OooO00o(str) + "&ck=";
}
public static String Oooo0oO(String str) {
return "http://127.0.0.1:" + AppApplication.OooO0OO + "/resource.m3u8?src=" + OooOOO.OooO00o(str);
}
}