diff --git a/build.gradle b/build.gradle index 25db9c2..bc59da4 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ def appName() { } def releaseTime() { - return new Date().format("yyyyMMdd", TimeZone.getDefault()) + return new Date().format("yyyyMMdd_HHmmss", TimeZone.getDefault()) } final String ANDROID_TOP = "${rootDir}" @@ -50,8 +50,8 @@ android { minSdkVersion 26 targetSdkVersion 28 - versionCode 17 - versionName "1.1.6" + versionCode 22 + versionName "1.2.1" ndk { //选择要添加的对应 cpu 类型的 .so 库。 @@ -70,8 +70,17 @@ android { //签名 signingConfigs { + G10P { + storeFile file("keystore/G10PMTK11.jks") + storePassword "123456" + keyAlias "G10PMTK11" + keyPassword "123456" + v1SigningEnabled true + v2SigningEnabled true + } + U807 { - storeFile file("src/doc/AllwinnerU807.jks") + storeFile file("keystore/AllwinnerU807.jks") storePassword "123456" keyAlias "u807" keyPassword "123456" @@ -79,16 +88,98 @@ android { } iPlay50SE { - storeFile file("src/doc/iPlay50SE.keystore") + storeFile file("keystore/iPlay50SE.keystore") storePassword "123456" keyAlias "iplay50se" keyPassword "123456" v1SigningEnabled true v2SigningEnabled true } + + teclast8183 { + storeFile file("keystore/TeclastMTK12.jks") + storePassword "123456" + keyAlias "TeclastMTK12" + keyPassword "123456" + v2SigningEnabled false + } + + UnisocS6688 { + storeFile file("keystore/UnisocS6688Userdebug.jks") + storePassword "123456" + keyAlias "unisocs6688userdebug" + keyPassword "123456" + v1SigningEnabled true + v2SigningEnabled true + } + + Aigo1071 { + storeFile file("keystore/Aigo1071.jks") + storePassword "123456" + keyAlias "aigo1071" + keyPassword "123456" + v1SigningEnabled true + v2SigningEnabled true + } } buildTypes { + Aigo1071Debug.initWith(debug) + Aigo1071Debug { + versionNameSuffix "-debug" + debuggable true + signingConfig signingConfigs.Aigo1071 + buildConfigField "String", "platform", '"W8183"' + } + + Aigo1071Release.initWith(release) + Aigo1071Release { + signingConfig signingConfigs.Aigo1071 + buildConfigField "String", "platform", '"W8183"' + } + + UnisocS6688Debug.initWith(debug) + UnisocS6688Debug { + versionNameSuffix "-debug" + debuggable true + signingConfig signingConfigs.UnisocS6688 + buildConfigField "String", "platform", '"S6688"' + } + + UnisocS6688Release.initWith(release) + UnisocS6688Release { + signingConfig signingConfigs.UnisocS6688 + buildConfigField "String", "platform", '"S6688"' + } + + teclast8183Debug.initWith(debug) + teclast8183Debug { + versionNameSuffix "-debug" + debuggable true + signingConfig signingConfigs.teclast8183 + buildConfigField "String", "platform", '"A11MTK8183"' + } + + teclast8183Release.initWith(release) + teclast8183Release { + signingConfig signingConfigs.teclast8183 + buildConfigField "String", "platform", '"A11MTK8183"' + } + + G10PDebug.initWith(debug) + G10PDebug { + versionNameSuffix "-debug" + debuggable true + signingConfig signingConfigs.G10P + buildConfigField "String", "platform", '"G10P"' + } + + G10PRelease.initWith(release) + G10PRelease { + signingConfig signingConfigs.G10P + buildConfigField "String", "platform", '"G10P"' + } + U807Debug.initWith(debug) U807Debug { buildConfigField "String", "platform", '"U807"' diff --git a/iconloaderlib/build.gradle b/iconloaderlib/build.gradle index 479ceba..22af0ac 100644 --- a/iconloaderlib/build.gradle +++ b/iconloaderlib/build.gradle @@ -13,6 +13,14 @@ android { } buildTypes { + Aigo1071Debug {} + Aigo1071Release {} + UnisocS6688Debug {} + UnisocS6688Release {} + teclast8183Debug {} + teclast8183Release {} + G10PDebug {} + G10PRelease {} U807Debug {} U807Release {} iPlay50SEDebug {} diff --git a/keystore/Aigo1071.jks b/keystore/Aigo1071.jks new file mode 100644 index 0000000..c32bd7a Binary files /dev/null and b/keystore/Aigo1071.jks differ diff --git a/src/doc/AllwinnerU807.jks b/keystore/AllwinnerU807.jks similarity index 100% rename from src/doc/AllwinnerU807.jks rename to keystore/AllwinnerU807.jks diff --git a/keystore/G10PMTK11.jks b/keystore/G10PMTK11.jks new file mode 100644 index 0000000..324fa31 Binary files /dev/null and b/keystore/G10PMTK11.jks differ diff --git a/keystore/TeclastMTK12.jks b/keystore/TeclastMTK12.jks new file mode 100644 index 0000000..669cfa9 Binary files /dev/null and b/keystore/TeclastMTK12.jks differ diff --git a/keystore/UnisocS6688Userdebug.jks b/keystore/UnisocS6688Userdebug.jks new file mode 100644 index 0000000..07f2a13 Binary files /dev/null and b/keystore/UnisocS6688Userdebug.jks differ diff --git a/src/doc/iPlay50SE.keystore b/keystore/iPlay50SE.keystore similarity index 100% rename from src/doc/iPlay50SE.keystore rename to keystore/iPlay50SE.keystore diff --git a/niceimageview/build.gradle b/niceimageview/build.gradle index d1ae292..94c3f9a 100644 --- a/niceimageview/build.gradle +++ b/niceimageview/build.gradle @@ -11,6 +11,14 @@ android { } buildTypes { + Aigo1071Debug {} + Aigo1071Release {} + UnisocS6688Debug {} + UnisocS6688Release {} + teclast8183Debug {} + teclast8183Release {} + G10PDebug {} + G10PRelease {} U807Debug {} U807Release {} iPlay50SEDebug {} diff --git a/src/com/uiuipad/os/alarm/AlarmActivity.java b/src/com/uiuipad/os/alarm/AlarmActivity.java index 0466fba..4346aed 100644 --- a/src/com/uiuipad/os/alarm/AlarmActivity.java +++ b/src/com/uiuipad/os/alarm/AlarmActivity.java @@ -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(); + } } diff --git a/src/com/uiuipad/os/icons/IconCache.java b/src/com/uiuipad/os/icons/IconCache.java index f9e6855..44c67d2 100644 --- a/src/com/uiuipad/os/icons/IconCache.java +++ b/src/com/uiuipad/os/icons/IconCache.java @@ -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"); diff --git a/src/com/uiuipad/os/manager/RunningAppManager.java b/src/com/uiuipad/os/manager/RunningAppManager.java index 299d283..75b86e0 100644 --- a/src/com/uiuipad/os/manager/RunningAppManager.java +++ b/src/com/uiuipad/os/manager/RunningAppManager.java @@ -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 weekdayPart = machineControl.getTime_part().stream().filter(partTime -> partTime.getDay_type() == 0).collect(Collectors.toCollection(HashSet::new)); HashSet 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> partTimeMap = new HashMap(); HashSet weekdayPart = new HashSet(appTimeControl.getTime_part().stream().filter(partTime -> partTime.getDay_type() == 0).collect(Collectors.toList())); HashSet holidayPart = new HashSet(appTimeControl.getTime_part().stream().filter(partTime -> partTime.getDay_type() == 1).collect(Collectors.toList())); diff --git a/src/com/uiuipad/os/manager/TimeControlManager.java b/src/com/uiuipad/os/manager/TimeControlManager.java index 8961c87..809e186 100644 --- a/src/com/uiuipad/os/manager/TimeControlManager.java +++ b/src/com/uiuipad/os/manager/TimeControlManager.java @@ -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 mClassifyTimeControlHashMap = new HashMap<>(); + /*分类的所有包名列表*/ private HashMap 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 classifyTimeControlHashMap = new HashMap<>(); List filterAppTimeControlList = appTimeControlList.stream().filter(appTimeControl -> { //tc_use_type == 1 时用的是分类配置,配置都是一样的 diff --git a/src/com/uiuipad/os/manager/bean/ClassConfig.java b/src/com/uiuipad/os/manager/bean/ClassConfig.java new file mode 100644 index 0000000..7a60a78 --- /dev/null +++ b/src/com/uiuipad/os/manager/bean/ClassConfig.java @@ -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 pkgs; + int id; + long time; + + public List getPkgs() { + return pkgs; + } + + public void setPkgs(List 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; + } +} diff --git a/src/com/uiuipad/os/model/LoaderTask.java b/src/com/uiuipad/os/model/LoaderTask.java index 2198eea..62dd936 100644 --- a/src/com/uiuipad/os/model/LoaderTask.java +++ b/src/com/uiuipad/os/model/LoaderTask.java @@ -255,15 +255,22 @@ public class LoaderTask implements Runnable { * 需要隐藏的图标 */ private HashSet hideApp = new HashSet() {{ - 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) diff --git a/src/com/uiuipad/os/service/MainService.java b/src/com/uiuipad/os/service/MainService.java index 03bce9a..9647956 100644 --- a/src/com/uiuipad/os/service/MainService.java +++ b/src/com/uiuipad/os/service/MainService.java @@ -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 { +public class MainService extends Service implements MainSContact.MainView, LifecycleProvider, 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); diff --git a/src/com/uiuipad/os/uiuiutils/Utils.java b/src/com/uiuipad/os/uiuiutils/Utils.java index db22af5..b2fcb09 100644 --- a/src/com/uiuipad/os/uiuiutils/Utils.java +++ b/src/com/uiuipad/os/uiuiutils/Utils.java @@ -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(); + } }