version:3.4.6
fix: update:样式修改
This commit is contained in:
@@ -32,7 +32,6 @@ import android.net.wifi.WifiManager;
|
||||
import android.os.BatteryManager;
|
||||
import android.os.Build;
|
||||
import android.os.StatFs;
|
||||
import android.os.SystemClock;
|
||||
import android.provider.Settings;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
@@ -48,14 +47,6 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.EncodeHintType;
|
||||
import com.google.zxing.WriterException;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.qrcode.QRCodeWriter;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.fuying.sn.BuildConfig;
|
||||
import com.fuying.sn.R;
|
||||
import com.fuying.sn.Statistics.AppInformation;
|
||||
@@ -64,6 +55,14 @@ import com.fuying.sn.bean.AppUsed;
|
||||
import com.fuying.sn.config.CommonConfig;
|
||||
import com.fuying.sn.gson.GsonUtils;
|
||||
import com.fuying.sn.network.NetInterfaceManager;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.EncodeHintType;
|
||||
import com.google.zxing.WriterException;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.qrcode.QRCodeWriter;
|
||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -222,7 +221,7 @@ public class Utils {
|
||||
// get md5 bytes
|
||||
byte[] p_md5Data = m.digest();
|
||||
// create a hex string
|
||||
String m_szUniqueID = new String();
|
||||
String m_szUniqueID = "";
|
||||
for (int i = 0; i < p_md5Data.length; i++) {
|
||||
int b = (0xFF & p_md5Data[i]);
|
||||
// if it is a single digit, make sure it have 0 in front (proper padding)
|
||||
@@ -311,9 +310,7 @@ public class Utils {
|
||||
return true;
|
||||
if (s.length() == 0)
|
||||
return true;
|
||||
if (s.trim().length() == 0)
|
||||
return true;
|
||||
return false;
|
||||
return s.trim().length() == 0;
|
||||
}
|
||||
|
||||
// 手动隐藏键盘
|
||||
@@ -443,7 +440,7 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return diff > 0 ? true : false;
|
||||
return diff > 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -502,13 +499,9 @@ public class Utils {
|
||||
int top = leftTop[1];
|
||||
int bottom = top + v.getHeight();
|
||||
int right = left + v.getWidth();
|
||||
if (event.getX() > left && event.getX() < right
|
||||
&& event.getY() > top && event.getY() < bottom) {
|
||||
// 点击的是输入框区域,保留点击EditText的事件
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
// 点击的是输入框区域,保留点击EditText的事件
|
||||
return !(event.getX() > left) || !(event.getX() < right)
|
||||
|| !(event.getY() > top) || !(event.getY() < bottom);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -524,10 +517,7 @@ public class Utils {
|
||||
// 检查网络连接,如果无网络可用,就不需要进行连网操作等
|
||||
NetworkInfo networkinfo = manager.getActiveNetworkInfo();
|
||||
|
||||
if (networkinfo == null || !networkinfo.isAvailable()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return networkinfo != null && networkinfo.isAvailable();
|
||||
}
|
||||
|
||||
public static String getTime(int time) {
|
||||
@@ -560,7 +550,6 @@ public class Utils {
|
||||
try {
|
||||
packInfo = packageManager.getPackageInfo(context.getPackageName(), 0);
|
||||
String version = packInfo.versionName.replaceAll("[a-zA-Z]", "").trim();
|
||||
;
|
||||
return version;
|
||||
} catch (NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
@@ -917,9 +906,7 @@ public class Utils {
|
||||
}
|
||||
//去掉已经安装的
|
||||
} else {
|
||||
if (!allList.contains(s)) {
|
||||
allList.add(s);
|
||||
}
|
||||
allList.add(s);
|
||||
//没有安装就加入进去
|
||||
//没有加入会导致安装后卸载不能再安装的情况
|
||||
}
|
||||
@@ -1190,10 +1177,7 @@ public class Utils {
|
||||
@Override
|
||||
public boolean accept(File pathname) {
|
||||
// Check if filename is "cpu", followed by a single digit number
|
||||
if (Pattern.matches("cpu[0-9]", pathname.getName())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return Pattern.matches("cpu[0-9]", pathname.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1384,4 +1368,14 @@ public class Utils {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*重启自身*/
|
||||
public static void triggerRebirth(Context context) {
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
Intent intent = packageManager.getLaunchIntentForPackage(context.getPackageName()); //
|
||||
ComponentName componentName = intent.getComponent();
|
||||
Intent mainIntent = Intent.makeRestartActivityTask(componentName); //
|
||||
context.startActivity(mainIntent);
|
||||
Runtime.getRuntime().exit(0); //
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user