version:1.1

fix:
update:优化
This commit is contained in:
2023-03-12 19:19:47 +08:00
parent a5e8623bed
commit 69bf8b4139
45 changed files with 658 additions and 4294 deletions

View File

@@ -45,7 +45,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
public class ApkUtils {
private static HashSet<String> excludePackageName = new HashSet<String>() {{
this.add(BuildConfig.APPLICATION_ID);
this.add("com.uiui.zysn");
this.add("com.uiui.zy");
this.add("com.uiui.zyos");
this.add("com.uiui.zybrowser");
this.add("com.uiui.zyappstore");
@@ -151,7 +151,7 @@ public class ApkUtils {
this.add("com.android.gallery3d");
this.add("com.android.camera2");
this.add("com.android.settings");
this.add("com.uiui.zysn");
this.add("com.uiui.zy");
this.add("com.uiui.appstore");
}};
@@ -207,7 +207,7 @@ public class ApkUtils {
}
if (Settings.Global.getInt(context.getContentResolver(), "is_activity", 0) == 0) {
resolveInfos.removeIf(resolveInfo -> "com.uiui.city".equals(resolveInfo.activityInfo.packageName));
// resolveInfos.removeIf(applicationInfo -> "com.uiui.zysn".equals(applicationInfo.packageName));
// resolveInfos.removeIf(applicationInfo -> "com.uiui.zy".equals(applicationInfo.packageName));
}
resolveInfos.sort(new Comparator<ResolveInfo>() {
@Override
@@ -227,8 +227,8 @@ public class ApkUtils {
}
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
return 0;
}
return -1;
}
});
ArrayList<DesktopIcon> desktopIcons = new ArrayList<>();

View File

@@ -55,7 +55,7 @@ public class OpenApkUtils {
private boolean checkActivation() {
int is_activation = Settings.Global.getInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0);
if (is_activation != 1) {
ApkUtils.openPackage(mContext, "com.uiui.zysn");
ApkUtils.openPackage(mContext, "com.uiui.zy");
ToastUtil.show("请激活设备后使用");
}
return is_activation == 1;
@@ -103,7 +103,7 @@ public class OpenApkUtils {
* @return true为能打开
*/
public boolean isCloudLessonMod(String pkg) {
if (mLessonJson==null)
if (mLessonJson == null)
return true;
if (mLessonJson.getIs_lesson() == 1) {
if (mContralTime == null) {

View File

@@ -49,6 +49,41 @@ public class TimeUtils {
return dateString + "\t" + getWeek();
}
public static String formatTime(Long s) {
if (s == 0) {
return "0分钟";
}
Integer ss = 1;
Integer mi = ss * 60;
Integer hh = mi * 60;
Integer dd = hh * 24;
Long day = s / dd;
Long hour = (s - day * dd) / hh;
Long minute = (s - day * dd - hour * hh) / mi;
Long second = (s - day * dd - hour * hh - minute * mi) / ss;
Long milliSecond = s - day * dd - hour * hh - minute * mi - second * ss;
StringBuffer sb = new StringBuffer();
if (day > 0) {
sb.append(day + "");
}
if (hour > 0) {
sb.append(hour + "小时");
}
if (minute > 0) {
sb.append(minute + "");
}
if (second > 0) {
sb.append(second + "");
}
// if (milliSecond > 0) {
// sb.append(milliSecond + "毫秒");
// }
return sb.toString();
}
/**
* 是否在管控时间内
*