version:1.2.1

fix:
update:准备分包
This commit is contained in:
tt committed 2023-12-15 09:38:33 +08:00
1 parent e081884984
commit b117888f87
17 files changed
+218 -17

No files matched your search

@@ -20,6 +20,7 @@ import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import cn.jzvd.Jzvd;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
@@ -252,4 +253,18 @@ public class AlarmActivity extends BaseActivity implements AlarmContact.AlarmVie
rv_data.setVisibility(View.VISIBLE);
}
}
@Override
public void onBackPressed() {
if (Jzvd.backPress()) {
return;
}
super.onBackPressed();
}
@Override
protected void onPause() {
super.onPause();
Jzvd.releaseAllVideos();
}
}
+2
View File
@@ -250,6 +250,7 @@ public class IconCache extends BaseIconCache {
this.add("com.android.gallery3d.app.GalleryActivity");//图库
this.add("com.google.android.apps.photos.home.HomeActivity");//图库
this.add("com.android.messaging.ui.conversationlist.ConversationListActivity");//信息
this.add("com.android.mms.ui.BootActivity");//信息
this.add("com.android.music.MusicBrowserActivity");//音乐
this.add("com.android.providers.downloads.ui.DownloadList");//下载
this.add("com.android.quicksearchbox.SearchActivity");//搜索
@@ -289,6 +290,7 @@ public class IconCache extends BaseIconCache {
this.add("com_android_gallery3d_app");
this.add("com_android_gallery3d_app");
this.add("com_android_mms_ui");
this.add("com_android_mms_ui");
this.add("com_android_music");
this.add("com_android_providers_downloads_ui");
this.add("com_android_quicksearchbox");
@@ -671,6 +671,18 @@ public class RunningAppManager {
this.add("com.uiui.appstore");
this.add("com.uiui.browser");
this.add("com.uiui.aios");
this.add("com.uiuipad.find");
this.add("com.uiuipad.os");
this.add("com.uiuipad.browser");
this.add("com.uiuipad.store");
this.add("com.uiuipad.zyinfo");
this.add("com.aole.safe");
this.add("com.aole.aios");
this.add("com.aole.store");
this.add("com.safeos.ae");
this.add("com.dangsafe.kf");
}};
/**
@@ -1019,7 +1031,7 @@ public class RunningAppManager {
// if (machineControl.getIs_part() == 1) {
// int partType = machineControl.getPart_type();
if (machineControl.getTime_part() != null && machineControl.getTime_part().size() != 0) {
int partType = 1;
int partType = 0;
HashSet<TimeManagePart> weekdayPart = machineControl.getTime_part().stream().filter(partTime -> partTime.getDay_type() == 0).collect(Collectors.toCollection(HashSet::new));
HashSet<TimeManagePart> holidayPart = machineControl.getTime_part().stream().filter(partTime -> partTime.getDay_type() == 1).collect(Collectors.toCollection(HashSet::new));
//工作日
@@ -1080,7 +1092,7 @@ public class RunningAppManager {
// if (appTimeControl.getIs_part() == 1) {
// int partType = appTimeControl.getPart_type();
if (appTimeControl.getTime_part() != null && appTimeControl.getTime_part().size() != 0) {
int partType = 1;
int partType = 0;
HashMap<Integer, Set<TimeManagePart>> partTimeMap = new HashMap();
HashSet<TimeManagePart> weekdayPart = new HashSet(appTimeControl.getTime_part().stream().filter(partTime -> partTime.getDay_type() == 0).collect(Collectors.toList()));
HashSet<TimeManagePart> holidayPart = new HashSet(appTimeControl.getTime_part().stream().filter(partTime -> partTime.getDay_type() == 1).collect(Collectors.toList()));
@@ -27,8 +27,9 @@ public class TimeControlManager {
private static TimeControlManager mTimeControlManager;
private Context mContext;
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
/*app为分类的分类配置*/
private HashMap<Integer, TimeManageApp> mClassifyTimeControlHashMap = new HashMap<>();
/*分类的所有包名列表*/
private HashMap<String, TimeManageApp> mAppTimeControlMap = new HashMap<>();
/*整机分类*/
@@ -166,7 +167,7 @@ public class TimeControlManager {
/**
* 设置app的配置
* 设置app管控时间的配置
*
* @param appTimeControlList
*/
@@ -174,6 +175,7 @@ public class TimeControlManager {
if (appTimeControlList == null || appTimeControlList.size() == 0) {
return;
}
HashMap<Integer, TimeManageApp> classifyTimeControlHashMap = new HashMap<>();
List<TimeManageApp> filterAppTimeControlList = appTimeControlList.stream().filter(appTimeControl -> {
//tc_use_type == 1 时用的是分类配置,配置都是一样的
@@ -0,0 +1,36 @@
package com.uiuipad.os.manager.bean;
import java.io.Serializable;
import java.util.List;
public class ClassConfig implements Serializable {
private static final long serialVersionUID = 3113893274162914847L;
List<String> pkgs;
int id;
long time;
public List<String> getPkgs() {
return pkgs;
}
public void setPkgs(List<String> pkgs) {
this.pkgs = pkgs;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public long getTime() {
return time;
}
public void setTime(long time) {
this.time = time;
}
}
+12 -7
View File
@@ -255,15 +255,22 @@ public class LoaderTask implements Runnable {
* 需要隐藏的图标
*/
private HashSet<String> hideApp = new HashSet<String>() {{
this.add(BuildConfig.APPLICATION_ID);
this.add("com.android.quicksearchbox");
this.add("com.st.nfc.dta.mobile");
this.add("com.mediatek.ygps");
this.add("com.mediatek.factorymode");
this.add("org.chromium.browser");
this.add("com.android.email");
this.add("com.uiui.sn");
this.add("com.uiui.zy");
this.add("com.ygyb.yischool");
this.add("com.cube.setlauncherdef");
this.add("com.iflytek.speechcloud");
this.add("com.oirsdfg89.flg");
this.add("com.android.browser");
}};
/**
* 系统应用只显示这几个
*/
@@ -316,12 +323,10 @@ public class LoaderTask implements Runnable {
for (LauncherActivityInfo app : apps) {
Log.e("verifyApplications", "AllAPP: pkg = " + app.getApplicationInfo().packageName);
Log.e("verifyApplications", "AllAPP: className = " + app.getComponentName().getClassName());
if ("com.ygyb.yischool".equals(app.getApplicationInfo().packageName)
|| "com.cube.setlauncherdef".equals(app.getApplicationInfo().packageName)
|| "com.iflytek.speechcloud".equals(app.getApplicationInfo().packageName)
|| "com.oirsdfg89.flg".equals(app.getApplicationInfo().packageName)
|| "com.uiuipad.os.Launcher".equals(app.getComponentName().getClassName())
)
if (hideApp.contains(app.getApplicationInfo().packageName)) {
continue;
}
if ("com.uiuipad.os.Launcher".equals(app.getComponentName().getClassName()))
continue;
if (is_control == 1) {
if ("org.chromium.chrome".equals(app.getApplicationInfo().packageName)
+16 -1
View File
@@ -23,6 +23,7 @@ import com.uiuipad.os.uiuiutils.ApkUtils;
import com.arialyy.annotations.Download;
import com.arialyy.aria.core.Aria;
import com.arialyy.aria.core.task.DownloadTask;
import com.uiuipad.os.uiuiutils.Utils;
import org.jetbrains.annotations.NotNull;
@@ -32,7 +33,7 @@ import java.util.HashMap;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.subjects.BehaviorSubject;
public class MainService extends Service implements MainSContact.MainView, LifecycleProvider<ActivityEvent> {
public class MainService extends Service implements MainSContact.MainView, LifecycleProvider<ActivityEvent>, NetworkUtils.OnNetworkStatusChangedListener {
private String TAG = MainService.class.getSimpleName();
public static final String ALARMWAKEUP = "KUXIN_ALARM_WAKEUP";
@@ -64,6 +65,19 @@ public class MainService extends Service implements MainSContact.MainView, Lifec
return RxLifecycleAndroid.bindActivity(lifecycleSubject);
}
@Override
public void onDisconnected() {
Log.e(TAG, "网络未连接");
}
@Override
public void onConnected(NetworkUtils.NetworkType networkType) {
Log.e(TAG, "onConnected: 网络已连接");
if (Utils.isScreenOn(MainService.this)) {
mPresenter.getTimeManageSn();
}
}
@Override
public IBinder onBind(Intent intent) {
return mMainBinder;
@@ -83,6 +97,7 @@ public class MainService extends Service implements MainSContact.MainView, Lifec
Log.e(TAG, "onCreate: ");
registerReceivers();
Aria.download(this).register();
NetworkUtils.registerNetworkStatusChangedListener(this);
lifecycleSubject.onNext(ActivityEvent.CREATE);
mPresenter = new MainSPresenter(this);
+7
View File
@@ -11,6 +11,7 @@ import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Environment;
import android.os.PowerManager;
import android.os.RemoteException;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
@@ -368,4 +369,10 @@ public class Utils {
int position = url.lastIndexOf("/");
return url.substring(position + 1);
}
public static boolean isScreenOn(Context context) {
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
//true为打开,false为关闭
return powerManager.isInteractive();
}
}