fix:
update:更新主界面样式布局
This commit is contained in:
2022-08-19 10:17:45 +08:00
parent 99a8038e41
commit 26075a1486
11 changed files with 316 additions and 276 deletions

View File

@@ -30,19 +30,22 @@ public class CXAESUtil {
/**
* 加密
*
* @param key
* 密钥
* @param src
* 加密文本
* @param key 密钥
* @param src 加密文本
* @return
* @throws Exception
*/
public static String encrypt(String key, String src) throws Exception {
public static String encrypt(String key, String src) {
// /src = Base64.encodeToString(src.getBytes(), Base64.DEFAULT);
byte[] rawKey = toMakekey(key, keyLenght, defaultV).getBytes();// key.getBytes();
byte[] result = encrypt(rawKey, src.getBytes("utf-8"));
// result = Base64.encode(result, Base64.DEFAULT);
return toHex(result);
try {
byte[] result = encrypt(rawKey, src.getBytes("utf-8"));
// result = Base64.encode(result, Base64.DEFAULT);
return toHex(result);
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
/**

View File

@@ -1475,6 +1475,7 @@ public class Utils {
/**
* 获取电池容量
*
* @param context
* @return
*/
@@ -1690,6 +1691,7 @@ public class Utils {
/**
* 获取自定义版本号 或者版本号
*
* @return
*/
public static String getCustomVersion() {
@@ -1706,12 +1708,13 @@ public class Utils {
/**
* 获取系统版本号
*
* @return
*/
public static String getRomVersion() {
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.ZhanruiPlatform) {
return getProperty("ro.build.id", "获取失败");
}else if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.CubePlatform) {
} else if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.CubePlatform) {
return Utils.getProperty("ro.build.id", "获取失败");
} else if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MTKPlatform) {
return Utils.getProperty("ro.build.id", "获取失败");
@@ -1794,6 +1797,17 @@ public class Utils {
}
}
public static boolean isWifiAvailable(Context context) {
ConnectivityManager conMan = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo.State wifi = conMan.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState();
if (NetworkInfo.State.CONNECTED == wifi) {
return true;
} else {
return false;
}
}
public static String getWifiAlias(Context context) {
WifiManager wifiManager = (WifiManager) context.getSystemService(WIFI_SERVICE);
WifiInfo wifiInfo = wifiManager.getConnectionInfo();