From 526914c64c1db00f2b366348bc01d7b9bcd13b47 Mon Sep 17 00:00:00 2001
From: Fanhuitong <981964879@qq.com>
Date: Thu, 13 Jun 2024 11:19:36 +0800
Subject: [PATCH] =?UTF-8?q?1.4.0608=20=E5=A2=9E=E5=8A=A0=E7=88=B1=E4=BC=98?=
=?UTF-8?q?=E8=AF=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/build.gradle | 22 +-
app/src/main/AndroidManifest.xml | 25 +-
.../aoleyun/sn/activity/CleanupActivity.java | 7 +-
.../sn/activity/EyeProtectionActivity.java | 7 +-
.../aoleyun/sn/activity/MainActivity1.java | 382 ------
.../aoleyun/sn/activity/SplashActivity.java | 1 +
.../sn/activity/main/MainActivity.java | 7 +-
.../requestlog/RequestLogActivity.java | 7 +-
.../sn/activity/update/UpdateActivity.java | 7 +-
.../aoleyun/sn/adapter/AppUpdateAdapter.java | 1 +
.../com/aoleyun/sn/base/BaseActivity.java | 38 -
.../sn/base/BaseDataBindingActivity.java | 28 +-
.../sn/base/BaseTransparentActivity.java | 10 +-
.../com/aoleyun/sn/comm/CommonConfig.java | 3 +-
.../com/aoleyun/sn/comm/PackageNames.java | 1 +
.../sn/network/NetInterfaceManager.java | 46 +-
.../java/com/aoleyun/sn/push/PushManager.java | 35 +-
.../com/aoleyun/sn/service/GuardService.java | 27 +-
.../aoleyun/sn/service/main/MainService.java | 6 +-
.../java/com/aoleyun/sn/utils/ApkUtils.java | 33 +-
.../java/com/aoleyun/sn/utils/JGYUtils.java | 163 ++-
.../main/java/com/aoleyun/sn/utils/Utils.java | 6 +
.../main/res/layout-land/activity_main.xml | 1171 +++++++++--------
.../main/res/layout-land/activity_update.xml | 98 ++
.../main/res/layout-port/activity_main.xml | 2 +
.../main/res/layout-port/activity_update.xml | 96 ++
.../res/layout/activity_eye_protection.xml | 401 +++---
build.gradle | 6 +
28 files changed, 1291 insertions(+), 1345 deletions(-)
delete mode 100644 app/src/main/java/com/aoleyun/sn/activity/MainActivity1.java
delete mode 100644 app/src/main/java/com/aoleyun/sn/base/BaseActivity.java
create mode 100644 app/src/main/res/layout-land/activity_update.xml
create mode 100644 app/src/main/res/layout-port/activity_update.xml
diff --git a/app/build.gradle b/app/build.gradle
index f2a2835..55773f0 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -29,8 +29,8 @@ android {
defaultConfig {
applicationId "com.aoleyun.sn"
- versionCode 135
- versionName "1.4.0530"
+ versionCode 143
+ versionName "1.4.0608"
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
minSdkVersion 24
@@ -200,6 +200,20 @@ android {
}
buildTypes {
+ AiUduDebug.initWith(debug)
+ AiUduDebug {
+ versionNameSuffix "-debug"
+ debuggable true
+ signingConfig signingConfigs.G10P
+ buildConfigField "String", "platform", '"AUDG104"'
+ }
+
+ AiUduRelease.initWith(release)
+ AiUduRelease {
+ signingConfig signingConfigs.G10P
+ buildConfigField "String", "platform", '"AUDG104"'
+ }
+
Huaruian8768Debug.initWith(debug)
Huaruian8768Debug {
versionNameSuffix "-debug"
@@ -233,12 +247,14 @@ android {
versionNameSuffix "-debug"
debuggable true
signingConfig signingConfigs.teclast8183
+// signingConfig signingConfigs.mtk
buildConfigField "String", "platform", '"MTK8183"'
}
c2Release.initWith(release)
c2Release {
signingConfig signingConfigs.teclast8183
+// signingConfig signingConfigs.mtk
buildConfigField "String", "platform", '"MTK8183"'
}
@@ -351,12 +367,14 @@ android {
versionNameSuffix "-debug"
debuggable true
signingConfig signingConfigs.zhanruiG10Z
+// signingConfig signingConfigs.zhanRui
buildConfigField "String", "platform", '"ZR6016"'
}
zhanruiG10ZRelease.initWith(release)
zhanruiG10ZRelease {
signingConfig signingConfigs.zhanruiG10Z
+// signingConfig signingConfigs.zhanRui
buildConfigField "String", "platform", '"ZR6016"'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index ec87b6b..1307a74 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -136,8 +136,7 @@
android:theme="@style/AppTheme">
+ android:exported="true">
@@ -148,7 +147,7 @@
android:name=".activity.EyeProtectionActivity"
android:exported="true"
android:icon="@drawable/com_system_huyan"
- android:label="护眼模式"
+ android:label="护眼助手"
android:launchMode="singleInstance"
android:screenOrientation="userLandscape"
android:theme="@style/AppTheme">
@@ -172,31 +171,17 @@
-
-
-
-
-
-
-
-
-
+ android:launchMode="singleTop" />
-
+ android:label="检查更新"
+ android:launchMode="singleInstance">
diff --git a/app/src/main/java/com/aoleyun/sn/activity/CleanupActivity.java b/app/src/main/java/com/aoleyun/sn/activity/CleanupActivity.java
index 254d6e3..5333ae9 100644
--- a/app/src/main/java/com/aoleyun/sn/activity/CleanupActivity.java
+++ b/app/src/main/java/com/aoleyun/sn/activity/CleanupActivity.java
@@ -39,15 +39,10 @@ public class CleanupActivity extends BaseMvpActivity {
}
@Override
- protected boolean setNightMode() {
+ public boolean setNightMode() {
return true;
}
- @Override
- protected boolean setfitWindow() {
- return false;
- }
-
/**
* 初始化视图
*/
diff --git a/app/src/main/java/com/aoleyun/sn/activity/EyeProtectionActivity.java b/app/src/main/java/com/aoleyun/sn/activity/EyeProtectionActivity.java
index d1ca569..48aa918 100644
--- a/app/src/main/java/com/aoleyun/sn/activity/EyeProtectionActivity.java
+++ b/app/src/main/java/com/aoleyun/sn/activity/EyeProtectionActivity.java
@@ -34,15 +34,10 @@ public class EyeProtectionActivity extends BaseMvpActivity {
}
@Override
- protected boolean setNightMode() {
+ public boolean setNightMode() {
return true;
}
- @Override
- protected boolean setfitWindow() {
- return false;
- }
-
@Override
public void initView() {
ButterKnife.bind(this);
diff --git a/app/src/main/java/com/aoleyun/sn/activity/MainActivity1.java b/app/src/main/java/com/aoleyun/sn/activity/MainActivity1.java
deleted file mode 100644
index 916189d..0000000
--- a/app/src/main/java/com/aoleyun/sn/activity/MainActivity1.java
+++ /dev/null
@@ -1,382 +0,0 @@
-package com.aoleyun.sn.activity;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Message;
-import android.os.Bundle;
-import android.widget.TextView;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-import com.aoleyun.sn.R;
-import com.aoleyun.sn.activity.utils.WeakHandler;
-
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-
-// 电池状态
-import static android.os.BatteryManager.EXTRA_STATUS;
-// 未知
-import static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
-// 充电中
-import static android.os.BatteryManager.BATTERY_STATUS_CHARGING;
-// 放电中
-import static android.os.BatteryManager.BATTERY_STATUS_DISCHARGING;
-// 未充电
-import static android.os.BatteryManager.BATTERY_STATUS_NOT_CHARGING;
-// 电池满
-import static android.os.BatteryManager.BATTERY_STATUS_FULL;
-// 电池健康情况
-import static android.os.BatteryManager.EXTRA_HEALTH;
-// 未知
-import static android.os.BatteryManager.BATTERY_HEALTH_UNKNOWN;
-// 良好
-import static android.os.BatteryManager.BATTERY_HEALTH_GOOD;
-// 过热
-import static android.os.BatteryManager.BATTERY_HEALTH_OVERHEAT;
-// 没电
-import static android.os.BatteryManager.BATTERY_HEALTH_DEAD;
-// 未知错误
-import static android.os.BatteryManager.BATTERY_HEALTH_UNSPECIFIED_FAILURE;
-// 过电压
-import static android.os.BatteryManager.BATTERY_HEALTH_OVER_VOLTAGE;
-// 温度过低
-import static android.os.BatteryManager.BATTERY_HEALTH_COLD;
-// 充电类型
-import static android.os.BatteryManager.EXTRA_PLUGGED;
-// 充电器
-import static android.os.BatteryManager.BATTERY_PLUGGED_AC;
-// 其他
-import static android.os.BatteryManager.BATTERY_PLUGGED_ANY;
-// USB
-import static android.os.BatteryManager.BATTERY_PLUGGED_USB;
-// 无线充电
-import static android.os.BatteryManager.BATTERY_PLUGGED_WIRELESS;
-// 当前电量
-import static android.os.BatteryManager.EXTRA_LEVEL;
-// 当前电池温度
-import static android.os.BatteryManager.EXTRA_TEMPERATURE;
-import static android.os.BatteryManager.EXTRA_SCALE;
-// 当前电池电压
-import static android.os.BatteryManager.EXTRA_VOLTAGE;
-// 电池技术描述
-import static android.os.BatteryManager.EXTRA_TECHNOLOGY;
-// 最大充电电压
-import static android.os.BatteryManager.EXTRA_MAX_CHARGING_VOLTAGE;
-// 最大充电电流
-import static android.os.BatteryManager.EXTRA_MAX_CHARGING_CURRENT;
-
-public class MainActivity1 extends AppCompatActivity {
-
- private static final String TAG = MainActivity1.class.getSimpleName();
-
- private static final int DEFAULT_CHARGING_VOLTAGE_MICRO_VOLT = 5000000;
-
- private static final int MSG_UPDATE_UI = 0;
-
-
- private String result;
-
- private TextView tv_show;
-
- private final MainHandler mHandler = new MainHandler(this);
- private static class MainHandler extends WeakHandler {
-
- public MainHandler(MainActivity1 owner) {
- super(owner);
- }
-
- @Override
- public void handleMessage(Message msg) {
- MainActivity1 activity = getOwner();
- if (activity == null)
- return;
-
- if (msg.what == MSG_UPDATE_UI) {
- activity.updateUI();
- }
- }
- }
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main1);
- startBroadCast();
-
- initView();
- }
-
- private void initView() {
- tv_show = findViewById(R.id.tv_show);
- }
-
- private void updateUI() {
- tv_show.setText(result);
- }
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
- stopBroadCast();
- }
-
- private void startBroadCast() {
- IntentFilter filter = new IntentFilter();
- filter.addAction(Intent.ACTION_BATTERY_CHANGED);
- registerReceiver(mBroadcastReceiver, filter);
- }
-
- private void stopBroadCast() {
- unregisterReceiver(mBroadcastReceiver);
- }
-
- private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
-
- @Override
- public void onReceive(Context context, Intent intent) {
- if (null == intent) {
- return;
- }
-
- String action = intent.getAction();
-
- if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
- int status = intent.getIntExtra(EXTRA_STATUS, BATTERY_STATUS_UNKNOWN);
- int plugged = intent.getIntExtra(EXTRA_PLUGGED, BATTERY_PLUGGED_ANY);
- int level = intent.getIntExtra(EXTRA_LEVEL, 0);
- int scale = intent.getIntExtra(EXTRA_SCALE, 0);
- int health = intent.getIntExtra(EXTRA_HEALTH, BATTERY_HEALTH_UNKNOWN);
-
- int maxChargingMicroAmp = intent.getIntExtra(EXTRA_MAX_CHARGING_CURRENT, -1);
- int maxChargingMicroVolt = intent.getIntExtra(EXTRA_MAX_CHARGING_VOLTAGE, -1);
- int batteryVolt = intent.getIntExtra(EXTRA_VOLTAGE, -1);
- int temperature = intent.getIntExtra(EXTRA_TEMPERATURE, -1);
- String batteryTechnologyDescript = intent.getStringExtra(EXTRA_TECHNOLOGY);
-
- final int maxChargingMicroWatt;
-
- if (maxChargingMicroVolt <= 0) {
- maxChargingMicroVolt = DEFAULT_CHARGING_VOLTAGE_MICRO_VOLT;
- }
- if (maxChargingMicroAmp > 0) {
- // Calculating muW = muA * muV / (10^6 mu^2 / mu); splitting up the divisor
- // to maintain precision equally on both factors.
- maxChargingMicroWatt = (maxChargingMicroAmp / 1000)
- * (maxChargingMicroVolt / 1000);
- } else {
- maxChargingMicroWatt = -1;
- }
-
-
- String statusStr = getStatus(status);
- String healthStr = getHealth(health);
- String pluggedStr = getPlugged(plugged);
- String levelStr = getLevel(level);
- String scaleStr = getLevel(scale);
- String temperatureStr = getTemperature(temperature);
- String batteryVoltStr = getBatteryVolt(batteryVolt);
- String maxChargingMicroAmpStr = getMaxChargingMicroAmp(maxChargingMicroAmp);
- String maxChargingMicroVoltStr = getMaxChargingMicroVolt(maxChargingMicroVolt);
-
- int currentChargingCurrent = getCurrentChargingCurrent();
- String currentChargingCurrentStr = getCurrentChargingCurrentStr(currentChargingCurrent);
- int currentChargingVoltage = getCurrentChargingVoltage();
- String currentChargingVoltageStr = getCurrentChargingVoltageStr(currentChargingVoltage);
-
-
- result = MainActivity1.this.getString(R.string.adb_shell_help)
- + "\n" + MainActivity1.this.getString(R.string.battery_current_level) + levelStr
- + "\n" + MainActivity1.this.getString(R.string.battery_current_temperature) + temperatureStr
- + "\n" + MainActivity1.this.getString(R.string.battery_current_volt) + batteryVoltStr
- + "\n" + MainActivity1.this.getString(R.string.battery_current_charging_current) + currentChargingCurrentStr
- + "\n" + MainActivity1.this.getString(R.string.battery_current_charging_voltage) + currentChargingVoltageStr
- + "\n" + MainActivity1.this.getString(R.string.battery_status_titls) + statusStr
- + "\n" + MainActivity1.this.getString(R.string.battery_plugged_titls) + pluggedStr
- + "\n" + MainActivity1.this.getString(R.string.battery_max_charging_current) + maxChargingMicroAmpStr
- + "\n" + MainActivity1.this.getString(R.string.battery_max_charging_voltage) + maxChargingMicroVoltStr
- + "\n" + MainActivity1.this.getString(R.string.battery_health_titls) + healthStr
- + "\n" + MainActivity1.this.getString(R.string.battery_max_level) + scaleStr
- + "\n" + MainActivity1.this.getString(R.string.battery_technology_describing) + batteryTechnologyDescript
- +"\n充电速度 = " + maxChargingMicroWatt;
- mHandler.sendEmptyMessage(MSG_UPDATE_UI);
-
- }
- }
-
-
- };
-
- private String getCurrentChargingVoltageStr(int currentChargingVoltage) {
- return String.format("%.3f V", currentChargingVoltage / 1000000.0);
- }
-
- private String getCurrentChargingCurrentStr(int currentChargingCurrent) {
- return String.format("%.3f A", currentChargingCurrent / 1000.0);
- }
-
- /**
- * 当前充电电流 mA
- *
- * adb shell "cat /sys/class/power_supply/battery/BatteryAverageCurrent"
- */
- private int getCurrentChargingCurrent() {
- int result = 0;
- BufferedReader br = null;
- try {
- String line;
- br = new BufferedReader(new FileReader("/sys/class/power_supply/battery/BatteryAverageCurrent"));
- if ((line = br.readLine()) != null) {
- result = Integer.parseInt(line);
- }
-
- br.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- if (br != null) {
- try {
- br.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- return result;
- }
-
- /**
- * 当前充电电压 uV
- *
- * adb shell "cat /sys/class/power_supply/battery/batt_vol"
- */
- private int getCurrentChargingVoltage() {
- int result = 0;
- BufferedReader br = null;
- try {
- String line;
- br = new BufferedReader(new FileReader("/sys/class/power_supply/battery/batt_vol"));
- if ((line = br.readLine()) != null) {
- result = Integer.parseInt(line);
- }
-
- br.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- if (br != null) {
- try {
- br.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- return result;
- }
-
- private String getMaxChargingMicroVolt(int maxChargingMicroVolt) {
- return String.format("%.1f V", maxChargingMicroVolt / 1000000.0);
- }
-
- private String getMaxChargingMicroAmp(int maxChargingMicroAmp) {
- return String.format("%.1f A", maxChargingMicroAmp / 1000000.0);
- }
-
- private String getBatteryVolt(int batteryVolt) {
- return String.format("%.3f V", batteryVolt / 1000.0);
- }
-
-
- private String getTemperature(int temperature) {
- return String.format("%.1f ℃", temperature / 10.0);
- }
-
- private String getLevel(int level) {
- return String.format("%d %%", level);
- }
-
- private String getPlugged(int plugged) {
- String result = getString(R.string.battery_plugged_any);
-
- switch (plugged) {
- case BATTERY_PLUGGED_ANY:
- break;
- case BATTERY_PLUGGED_AC:
- result = getString(R.string.battery_plugged_ac);
- break;
- case BATTERY_PLUGGED_USB:
- result = getString(R.string.battery_plugged_usb);
- break;
- case BATTERY_PLUGGED_WIRELESS:
- result = getString(R.string.battery_plugged_wireless);
- break;
- }
-
- return result;
- }
-
-
- private String getHealth(int health) {
- String result = getString(R.string.battery_health_unknow);
-
- switch (health) {
- case BATTERY_HEALTH_UNKNOWN:
- break;
- case BATTERY_HEALTH_GOOD:
- result = getString(R.string.battery_health_good);
- break;
- case BATTERY_HEALTH_OVERHEAT:
- result = getString(R.string.battery_health_overheat);
- break;
- case BATTERY_HEALTH_DEAD:
- result = getString(R.string.battery_health_dead);
- break;
- case BATTERY_HEALTH_UNSPECIFIED_FAILURE:
- result = getString(R.string.battery_health_unspecified_failure);
- break;
- case BATTERY_HEALTH_OVER_VOLTAGE:
- result = getString(R.string.battery_health_over_voltage);
- break;
- case BATTERY_HEALTH_COLD:
- result = getString(R.string.battery_health_cold);
- break;
- }
-
- return result;
- }
-
-
- private String getStatus(int status) {
- String result = getString(R.string.battery_status_unknown);
-
- switch (status) {
- case BATTERY_STATUS_FULL:
- result = getString(R.string.battery_status_full);
- break;
- case BATTERY_STATUS_NOT_CHARGING:
- result = getString(R.string.battery_status_not_charging);
- break;
- case BATTERY_STATUS_DISCHARGING:
- result = getString(R.string.battery_status_discharging);
- break;
- case BATTERY_STATUS_CHARGING:
- result = getString(R.string.battery_status_charging);
- break;
- case BATTERY_STATUS_UNKNOWN:
- break;
- }
-
- return result;
- }
-}
diff --git a/app/src/main/java/com/aoleyun/sn/activity/SplashActivity.java b/app/src/main/java/com/aoleyun/sn/activity/SplashActivity.java
index 0c52cde..0692c4d 100644
--- a/app/src/main/java/com/aoleyun/sn/activity/SplashActivity.java
+++ b/app/src/main/java/com/aoleyun/sn/activity/SplashActivity.java
@@ -94,6 +94,7 @@ public class SplashActivity extends AppCompatActivity {
if (BuildConfig.DEBUG) {
// JGYUtils.getInstance().showApp("com.gaomuxuexi34");
JGYUtils.getModel();
+ Utils.getAndroiodScreenProperty(SplashActivity.this);
Log.e(TAG, "getOperators: " + NetworkUtils.getOperators(this));
Log.e(TAG, "PublicIP: " + MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE).decodeString(NetInterfaceManager.PublicIP, ""));
NetInterfaceManager.GetWhois();
diff --git a/app/src/main/java/com/aoleyun/sn/activity/main/MainActivity.java b/app/src/main/java/com/aoleyun/sn/activity/main/MainActivity.java
index b09eaf3..1a84461 100644
--- a/app/src/main/java/com/aoleyun/sn/activity/main/MainActivity.java
+++ b/app/src/main/java/com/aoleyun/sn/activity/main/MainActivity.java
@@ -115,15 +115,10 @@ public class MainActivity extends BaseMvvmActivity> storeUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.APPSTORE, JGYUtils.getInstance().checkAppPlatform());
- Observable> desktopUpdateObservable = NetInterfaceManager.getInstance()
- .getUpdateApi().getUpdate(PackageNames.DESKTOP, JGYUtils.getInstance().checkAppPlatform());
+ Observable> desktopUpdateObservable;
+ if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
+ desktopUpdateObservable = NetInterfaceManager.getInstance()
+ .getUpdateApi().getUpdate(PackageNames.AIUDUDESKTOP, JGYUtils.getInstance().checkAppPlatform());
+ } else {
+ desktopUpdateObservable = NetInterfaceManager.getInstance()
+ .getUpdateApi().getUpdate(PackageNames.DESKTOP, JGYUtils.getInstance().checkAppPlatform());
+ }
Observable> notifyUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JGYUtils.getInstance().checkAppPlatform());
Observable> browserUpdateObservable = NetInterfaceManager.getInstance()
@@ -977,8 +997,14 @@ public class NetInterfaceManager {
.getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JGYUtils.getInstance().checkAppPlatform());
Observable> storeUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.APPSTORE, JGYUtils.getInstance().checkAppPlatform());
- Observable> desktopUpdateObservable = NetInterfaceManager.getInstance()
- .getUpdateApi().getUpdate(PackageNames.DESKTOP, JGYUtils.getInstance().checkAppPlatform());
+ Observable> desktopUpdateObservable;
+ if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
+ desktopUpdateObservable = NetInterfaceManager.getInstance()
+ .getUpdateApi().getUpdate(PackageNames.AIUDUDESKTOP, JGYUtils.getInstance().checkAppPlatform());
+ } else {
+ desktopUpdateObservable = NetInterfaceManager.getInstance()
+ .getUpdateApi().getUpdate(PackageNames.DESKTOP, JGYUtils.getInstance().checkAppPlatform());
+ }
Observable> notifyUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JGYUtils.getInstance().checkAppPlatform());
Observable> browserUpdateObservable = NetInterfaceManager.getInstance()
@@ -2197,7 +2223,11 @@ public class NetInterfaceManager {
// String default_launcher = (String) SPUtils.get(mContext, "default_launcher", "");
Log.e("getDefaultApp", "onNext: " + default_launcher);
if (TextUtils.isEmpty(default_launcher)) {
- JGYUtils.getInstance().setDefaultDesktop();
+ if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform) {
+ JGYUtils.getInstance().setDop7DefaultDesktop();
+ } else {
+ JGYUtils.getInstance().setDefaultDesktop();
+ }
} else {
JGYUtils.getInstance().setDefaultDesktop(default_launcher);
}
@@ -2577,6 +2607,8 @@ public class NetInterfaceManager {
tagSets.add(JGYUtils.G11TAG);
} else if (platform == JGYUtils.MT8768Platform) {
tagSets.add(JGYUtils.MT8768Tag);
+ } else if (platform == JGYUtils.AUDG104Platform) {
+ tagSets.add(JGYUtils.AUDG104Tag);
}
});
Log.e(TAG, "clearAndAppendTags: " + tagSets);
@@ -3400,6 +3432,8 @@ public class NetInterfaceManager {
List appListInfos = listBaseResponse.data;
cacheHelper.put(UrlAddress.GET_ALL_APP, GsonUtils.toJSONString(appListInfos));
getAppAutoStartUpdateAndNet(appListInfos);
+ Set pkgList = appListInfos.stream().map(AppListInfo::getApp_package).collect(Collectors.toSet());
+ mMMKV.encode(CommonConfig.ALL_APP_PKG_SET, pkgList);
} else {
cacheHelper.put(UrlAddress.GET_ALL_APP, "");
}
diff --git a/app/src/main/java/com/aoleyun/sn/push/PushManager.java b/app/src/main/java/com/aoleyun/sn/push/PushManager.java
index 64c0315..94c6b8b 100644
--- a/app/src/main/java/com/aoleyun/sn/push/PushManager.java
+++ b/app/src/main/java/com/aoleyun/sn/push/PushManager.java
@@ -73,6 +73,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.TimeUnit;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
@@ -1283,11 +1284,11 @@ public class PushManager {
switch (remoteDebug.getType()) {
case ACTION_PULL:
Log.e(TAG, "customOrder: 唤起");
- ApkUtils.openPackage(mContext, pkg);
+ openApp(pkg);
break;
case ACTION_DELETE:
Log.e(TAG, "customOrder: 删除");
- ApkUtils.UninstallAPP(mContext, pkg);
+ orderDeleteApp(pkg);
break;
case ACTION_UPGRADE:
Log.e(TAG, "customOrder: 更新");
@@ -1299,6 +1300,36 @@ public class PushManager {
}
}
+ public static final String DEBUG_APP_LIST = "debug_app_pkg_list";
+
+ private void openApp(String pkg) {
+ Set pkgs = mMMKV.decodeStringSet(DEBUG_APP_LIST, new HashSet<>());
+ pkgs.add(pkg);
+ Log.e(TAG, "openApp: pkg = " + pkgs);
+ mMMKV.encode(DEBUG_APP_LIST, pkgs);
+ PackageManager pm = mContext.getPackageManager();
+ if (pm.getApplicationEnabledSetting(pkg) == PackageManager.COMPONENT_ENABLED_STATE_DISABLED) {
+ try {
+ pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
+ } catch (Exception e) {
+ Log.e(TAG, "openApp: " + e.getMessage());
+ }
+ }
+ ApkUtils.openPackage(mContext, pkg);
+ }
+
+ private void orderDeleteApp(String pkg) {
+ Set pkgs = mMMKV.decodeStringSet(DEBUG_APP_LIST, new HashSet<>());
+ pkgs.remove(pkg);
+ Log.e(TAG, "orderDeleteApp: pkgs = " + pkgs);
+ mMMKV.encode(DEBUG_APP_LIST, pkgs);
+ if (ApkUtils.isSystemApp(mContext,pkg)){
+ JGYUtils.getInstance().hideApp(pkg);
+ }else {
+ ApkUtils.UninstallAPP(mContext, pkg);
+ }
+ }
+
/**
* @param jsonString "is_log": 1,//是否开启运行日志 0关闭 1开启
* "is_log_type": 1 //获取运行日志类型 0即时 1定时
diff --git a/app/src/main/java/com/aoleyun/sn/service/GuardService.java b/app/src/main/java/com/aoleyun/sn/service/GuardService.java
index 8efcde5..bca4024 100644
--- a/app/src/main/java/com/aoleyun/sn/service/GuardService.java
+++ b/app/src/main/java/com/aoleyun/sn/service/GuardService.java
@@ -230,8 +230,8 @@ public class GuardService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.e(TAG, "onStartCommand: ");
- Aria.init(this);
Aria.download(this).register();
+ Aria.download(this).resumeAllTask();
// 绑定建立链接
bindService(new Intent(this, StepService.class), mServiceConnection, Context.BIND_IMPORTANT);
return START_STICKY;
@@ -849,15 +849,20 @@ public class GuardService extends Service {
//在这里处理任务执行中的状态,如进度进度条的刷新
@Download.onTaskRunning
protected void running(DownloadTask task) {
- String jsonString = task.getExtendField();
- Gson gson = new Gson();
- Type listType = new TypeToken() {
- }.getType();
- DownloadTaskInfo downloadTaskInfo = gson.fromJson(jsonString, listType);
- String app_name = downloadTaskInfo.getApp_name();
- String app_package = downloadTaskInfo.getApp_package();
- Log.e("aria", "正在下载:" + task.getPercent() + ":" + task.getExtendField());
- Toaster.show("正在下载:" + app_name + "-" + task.getPercent() + "%" + "\t" + Formatter.formatFileSize(GuardService.this, task.getSpeed()) + "/s");
+ String filepath = task.getFilePath();
+ if (filepath.endsWith("apk")) {
+ String jsonString = task.getExtendField();
+ Gson gson = new Gson();
+ Type listType = new TypeToken() {
+ }.getType();
+ DownloadTaskInfo downloadTaskInfo = gson.fromJson(jsonString, listType);
+ String app_name = downloadTaskInfo.getApp_name();
+ String app_package = downloadTaskInfo.getApp_package();
+ Log.e("aria", "正在下载:" + task.getPercent() + ":" + task.getExtendField());
+ Toaster.show("下载启动:" + app_name + "\t" + task.getPercent() + "%");
+ } else if (filepath.endsWith(".zip")) {
+ Toaster.show("下载开机动画启动:" + "\t" + task.getPercent() + " % ");
+ }
}
@Download.onTaskComplete
@@ -884,7 +889,7 @@ public class GuardService extends Service {
new Thread(() -> ApkUtils.installApp(GuardService.this, filepath)).start();
}
} else if (filepath.endsWith(".zip")) {
- Log.e("taskComplete", "下载完成:" + task.getPercent() + ":" + task.getExtendField());
+ Log.e("taskComplete", "开机动画下载完成:" + task.getPercent() + ":" + task.getExtendField());
JGYUtils.getInstance().setBootanimationG10J(task.getFilePath());
}
}
diff --git a/app/src/main/java/com/aoleyun/sn/service/main/MainService.java b/app/src/main/java/com/aoleyun/sn/service/main/MainService.java
index 0d0b15d..af7285a 100644
--- a/app/src/main/java/com/aoleyun/sn/service/main/MainService.java
+++ b/app/src/main/java/com/aoleyun/sn/service/main/MainService.java
@@ -422,9 +422,9 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
}
if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
- if (mMMKV.decodeInt(CommonConfig.DEVICES_FRIST_START, 0) == 0) {
- ApkUtils.openPackage(MainService.this, "com.books.wisdom");
- }
+// if (mMMKV.decodeInt(CommonConfig.DEVICES_FRIST_START, 0) == 0) {
+// ApkUtils.openPackage(MainService.this, "com.books.wisdom");
+// }
ApkUtils.HideAiUDuApp();
}
diff --git a/app/src/main/java/com/aoleyun/sn/utils/ApkUtils.java b/app/src/main/java/com/aoleyun/sn/utils/ApkUtils.java
index dbdfbe9..c9fc7f8 100644
--- a/app/src/main/java/com/aoleyun/sn/utils/ApkUtils.java
+++ b/app/src/main/java/com/aoleyun/sn/utils/ApkUtils.java
@@ -18,6 +18,7 @@ import android.os.Binder;
import android.os.Build;
import android.provider.Settings;
import android.text.TextUtils;
+import android.util.ArraySet;
import android.util.Log;
import androidx.annotation.RequiresApi;
@@ -25,14 +26,17 @@ import androidx.core.content.FileProvider;
import com.aoleyun.sn.BuildConfig;
import com.aoleyun.sn.bean.UploadAppInfo;
+import com.aoleyun.sn.comm.CommonConfig;
import com.aoleyun.sn.comm.JGYActions;
import com.aoleyun.sn.comm.PackageNames;
import com.aoleyun.sn.gson.GsonUtils;
+import com.aoleyun.sn.push.PushManager;
import com.arialyy.aria.core.Aria;
import com.arialyy.aria.core.download.DownloadEntity;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.hjq.toast.Toaster;
+import com.tencent.mmkv.MMKV;
import java.io.BufferedReader;
import java.io.DataOutputStream;
@@ -69,6 +73,7 @@ public class ApkUtils {
this.add("com.aoleyun.appstore");
this.add("com.aoleyun.sn");
this.add("com.aoleyun.info");
+ this.add("com.aoleyun.audos");
this.add("com.aoleyun.os");
this.add("com.aoleyun.ailog");
this.add("com.aoleyun.browser");
@@ -414,6 +419,7 @@ public class ApkUtils {
this.add("com.ygyb.yischool");
this.add("com.gaomuxuexi34");
+
}};
@@ -501,10 +507,10 @@ public class ApkUtils {
}};
/*爱优读需要隐藏的图标*/
- private static final HashSet AiudHideApp = new HashSet() {{
+ public static final HashSet AiudHideApp = new HashSet() {{
this.add("com.android.email");
this.add("com.android.soundrecorder");
- this.add("com.android.documentsui");
+// this.add("com.android.documentsui");
this.add("com.mediatek.camera");
this.add("com.aoleyun.browser");
this.add("com.android.music");
@@ -521,7 +527,12 @@ public class ApkUtils {
public static void HideAiUDuApp() {
Log.e(TAG, "HideAiUDuApp: ");
+ MMKV mmkv = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
+ Set pkgs = mmkv.decodeStringSet(PushManager.DEBUG_APP_LIST, new HashSet<>());
for (String s : AiudHideApp) {
+ if (pkgs.contains(s)) {
+ continue;
+ }
JGYUtils.getInstance().hideApp(s);
}
}
@@ -1187,6 +1198,11 @@ public class ApkUtils {
Log.e(TAG, "showAllApp: continue: " + pkg);
continue;
}
+ if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
+ if (AiudHideApp.contains(pkg)) {
+ continue;
+ }
+ }
try {
Log.i(TAG, "showAllApp: show: " + pkg);
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
@@ -1366,9 +1382,10 @@ public class ApkUtils {
Log.e("addShortcut", "putstring:" + aole_force_app);
}
- private static Set AoleyunOSApp = new HashSet() {{
+ private static final Set AoleyunOSApp = new HashSet() {{
this.add("com.aoleyun.info");
this.add("com.aoleyun.os");
+ this.add("com.aoleyun.audos");
this.add("com.aoleyun.sn");
this.add("com.aoleyun.browser");
this.add("com.aoleyun.appstore");
@@ -1388,10 +1405,14 @@ public class ApkUtils {
this.add("com.calculator.uiui");
this.add("com.alarmclock.uiui");
this.add("com.uiui.speed");
+ this.add("com.books.wisdom");
}};
public static String getRunningAppInfo(Context context) {
+ MMKV mmkv = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
+ Set allPkgSet = mmkv.decodeStringSet(CommonConfig.ALL_APP_PKG_SET, new HashSet<>());
+ Log.e(TAG, "getRunningAppInfo: allPkgSet = " + allPkgSet);
// ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
// List infoList = activityManager.getRunningServices(Integer.MAX_VALUE);
//用来存储获取的应用信息数据
@@ -1407,7 +1428,11 @@ public class ApkUtils {
}
//排除所有系统应用,不显示
if (isSystemApp(context, packageName)) {
- if (!AoleyunOSApp.contains(packageName) && !aihuaApp.contains(packageName)) {
+ if (!AoleyunOSApp.contains(packageName)
+ && !aihuaApp.contains(packageName)
+ && !dongwa.contains(packageName)
+ && !allPkgSet.contains(packageName)
+ ) {
continue;
}
} else {
diff --git a/app/src/main/java/com/aoleyun/sn/utils/JGYUtils.java b/app/src/main/java/com/aoleyun/sn/utils/JGYUtils.java
index 5b67db7..023224c 100644
--- a/app/src/main/java/com/aoleyun/sn/utils/JGYUtils.java
+++ b/app/src/main/java/com/aoleyun/sn/utils/JGYUtils.java
@@ -138,7 +138,7 @@ public class JGYUtils {
public static final int MTKPlatform = 1;
public static final int ZhanruiPlatform = 2;
-// public static final int CubePlatform = 3;
+ // public static final int CubePlatform = 3;
public static final int MTK11Platform = 5;
public static final int TeclastP20sPlatform = 6;
public static final int AH6016Platform = 9;
@@ -149,13 +149,14 @@ public class JGYUtils {
public static final int YXPD1Platform = 15;
public static final int G11Platform = 16;
public static final int MT8768Platform = 17;
+ public static final int AUDG104Platform = 18;
public static final String Other = "其他";
public static final String MTKTag = "MTK";
public static final String ZhanruiTag = "展锐";
-// public static final String CubeTag = "展锐cube";
+ // public static final String CubeTag = "展锐cube";
public static final String MTK11Tag = "MTK11";
public static final String TeclastP20sTag = "P20S";
public static final String AH6016Tag = "AH6016";
@@ -166,6 +167,7 @@ public class JGYUtils {
public static final String YXPD1TAG = "YXPD1";
public static final String G11TAG = "MTKG11";
public static final String MT8768Tag = "MT8768";
+ public static final String AUDG104Tag = "AUDG104";
private CacheHelper cacheHelper;
@@ -293,6 +295,9 @@ public class JGYUtils {
} else if (MT8768Tag.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "MT8768");
return MT8768Platform;
+ } else if (AUDG104Tag.equalsIgnoreCase(platform)) {
+ Log.i(TAG, "checkAppPlatform: " + "AUDG104");
+ return AUDG104Platform;
} else {
Log.i(TAG, "checkAppPlatform: " + "没有数据");
return UnknowPlatform;
@@ -343,6 +348,8 @@ public class JGYUtils {
getAppPlatformCallback.AppPlatform(G11Platform);
} else if (MT8768Tag.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(MT8768Platform);
+ } else if (AUDG104Tag.equalsIgnoreCase(platform)) {
+ getAppPlatformCallback.AppPlatform(AUDG104Platform);
} else {
getAppPlatformCallback.AppPlatform(UnknowPlatform);
}
@@ -1276,6 +1283,7 @@ public class JGYUtils {
this.add("com.uiui.browser");
this.add("com.android.uiuios");
this.add("com.aoleyun.os");
+ this.add("com.aoleyun.audos");
this.add("com.aoleyunos.dop1");
this.add("com.aoleyunos.dop2");
this.add("com.aoleyunos.dop3");
@@ -1287,6 +1295,8 @@ public class JGYUtils {
this.add("com.uiui.videoplayer");
this.add("com.ygyb.yischool");
this.add("com.books.wisdom");
+ this.add("com.qi.airoom");
+ this.add("com.qi.AiStudyRoom");
}};
private Set getWhitePkgList() {
@@ -1755,67 +1765,71 @@ public class JGYUtils {
} else {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("MD5", MD5);
+ jsonObject.addProperty("app_name", "开机动画");
+ jsonObject.addProperty("app_package", "开机动画");
Utils.ariaDownload(mContext, url, jsonObject);
Log.e(TAG, "checkBootFile: " + "download file");
}
} else {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("MD5", MD5);
- jsonObject.addProperty("app_name", urlFileName);
+ jsonObject.addProperty("app_name", "开机动画");
+ jsonObject.addProperty("app_package", "开机动画");
Utils.ariaDownload(mContext, url, jsonObject);
}
}
- private static final String BOOTANIMATION_PATH = "/data/local/qchmedia/bootanimation.zip";
-
- @Deprecated
- public void setBootanimation(String filePath) {
- File systemFile = new File(BOOTANIMATION_PATH);
- if (!systemFile.exists()) {
- systemFile.getParentFile().mkdirs();
- File file = systemFile.getParentFile();
- Log.e(TAG, "setBootanimation: " + file.getAbsolutePath());
- try {
- systemFile.createNewFile();
- } catch (IOException e) {
- e.printStackTrace();
- Log.e("setBootanimation: ", "createNewFile: " + e.getMessage());
- }
- }
- File newFile = new File(filePath);
- if (systemFile.exists() && systemFile.isFile()) {
- String systemMD5 = FileUtils.getFileMD5ToString(systemFile);
- String newMD5 = FileUtils.getFileMD5ToString(newFile);
- if (systemMD5.equals(newMD5)) {
- Log.e(TAG, "setBootanimation: 文件一致");
- } else {
- Path path = Paths.get(newFile.getAbsolutePath());
- try {
- Files.copy(path, new FileOutputStream(systemFile));
- Log.e(TAG, "setBootanimation: 设置新开机动画");
- } catch (IOException e) {
- Log.e(TAG, "setBootanimation: IOException: " + e.getMessage());
- e.printStackTrace();
- }
- }
- } else {
- File file = new File(BOOTANIMATION_PATH);
- Log.e(TAG, "setBootanimation: " + file.getParentFile().getAbsolutePath());
- Log.e(TAG, "setBootanimation: " + "Is a directory = " + file.isDirectory());
- if (!file.getParentFile().delete()) {
- Log.e(TAG, "setBootanimation: " + "系统动画删除失败");
- }
- Path path = Paths.get(newFile.getAbsolutePath());
- try {
- Files.copy(path, new FileOutputStream(systemFile));
- copy(systemFile.getAbsolutePath(), newFile.getAbsolutePath());
- Log.e(TAG, "setBootanimation: 设置新开机动画");
- } catch (IOException e) {
- Log.e(TAG, "setBootanimation: IOException: " + e.getMessage());
- e.printStackTrace();
- }
- }
- }
+// @Deprecated
+// private static final String BOOTANIMATION_PATH = "/data/local/qchmedia/bootanimation.zip";
+//
+// @Deprecated
+// public void setBootanimation(String filePath) {
+// File systemFile = new File(BOOTANIMATION_PATH);
+// if (!systemFile.exists()) {
+// systemFile.getParentFile().mkdirs();
+// File file = systemFile.getParentFile();
+// Log.e(TAG, "setBootanimation: " + file.getAbsolutePath());
+// try {
+// systemFile.createNewFile();
+// } catch (IOException e) {
+// e.printStackTrace();
+// Log.e("setBootanimation: ", "createNewFile: " + e.getMessage());
+// }
+// }
+// File newFile = new File(filePath);
+// if (systemFile.exists() && systemFile.isFile()) {
+// String systemMD5 = FileUtils.getFileMD5ToString(systemFile);
+// String newMD5 = FileUtils.getFileMD5ToString(newFile);
+// if (systemMD5.equals(newMD5)) {
+// Log.e(TAG, "setBootanimation: 文件一致");
+// } else {
+// Path path = Paths.get(newFile.getAbsolutePath());
+// try {
+// Files.copy(path, new FileOutputStream(systemFile));
+// Log.e(TAG, "setBootanimation: 设置新开机动画");
+// } catch (IOException e) {
+// Log.e(TAG, "setBootanimation: IOException: " + e.getMessage());
+// e.printStackTrace();
+// }
+// }
+// } else {
+// File file = new File(BOOTANIMATION_PATH);
+// Log.e(TAG, "setBootanimation: " + file.getParentFile().getAbsolutePath());
+// Log.e(TAG, "setBootanimation: " + "Is a directory = " + file.isDirectory());
+// if (!file.getParentFile().delete()) {
+// Log.e(TAG, "setBootanimation: " + "系统动画删除失败");
+// }
+// Path path = Paths.get(newFile.getAbsolutePath());
+// try {
+// Files.copy(path, new FileOutputStream(systemFile));
+// copy(systemFile.getAbsolutePath(), newFile.getAbsolutePath());
+// Log.e(TAG, "setBootanimation: 设置新开机动画");
+// } catch (IOException e) {
+// Log.e(TAG, "setBootanimation: IOException: " + e.getMessage());
+// e.printStackTrace();
+// }
+// }
+// }
private static final String BOOTANIMATION_PATH_G10J = "/storage/emulated/0/Download/bootanimation.zip";
@@ -1839,6 +1853,7 @@ public class JGYUtils {
}
}
if (FileUtils.copy(newFile, file)) {
+ Toaster.show("设置开机动画成功");
Log.e(TAG, "setBootanimationG10J: set Bootanimation successful");
} else {
Log.e(TAG, "setBootanimationG10J: set Bootanimation failed");
@@ -1850,11 +1865,11 @@ public class JGYUtils {
public void removeBootanimation() {
File systemFile;
- if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform) {
- systemFile = new File(BOOTANIMATION_PATH_G10J);
- } else {
- systemFile = new File(BOOTANIMATION_PATH);
- }
+// if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform) {
+ systemFile = new File(BOOTANIMATION_PATH_G10J);
+// } else {
+// systemFile = new File(BOOTANIMATION_PATH);
+// }
if (systemFile.exists()) {
if (systemFile.delete()) {
Log.e(TAG, "removeBootanimation: delete: " + "ture");
@@ -1862,10 +1877,10 @@ public class JGYUtils {
Log.e(TAG, "removeBootanimation: delete: " + "false");
}
}
- if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform) {
- Intent intent = new Intent("com.hra.setBootanimation");
- mContext.sendBroadcast(intent);
- }
+// if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform) {
+ Intent intent = new Intent("com.hra.setBootanimation");
+ mContext.sendBroadcast(intent);
+// }
}
public void copy(String oldPath, String newPath) {
@@ -2324,6 +2339,9 @@ public class JGYUtils {
private String AoleyunOs = "com.aoleyun.os";
private String AoleyunOsClass = "com.aoleyun.os.Launcher";
+ private String AiUDuOs = "com.aoleyun.audos";
+ private String AiUDuOsClass = "com.aoleyun.audos.Launcher";
+
public void setDefaultLauncher(Context context, String defPackageName, String defClassName) {
try {
if (!TextUtils.isEmpty(defPackageName) && !TextUtils.isEmpty(defClassName)) {
@@ -2384,9 +2402,16 @@ public class JGYUtils {
public void checkDefaultDesktop(String pkg) {
String desktopPkg = getDefaultDesktop();
// String desktopPkg = (String) SPUtils.get(mContext, "default_launcher", "");
- Log.e(TAG, "checkDefaultDesktop: " + desktopPkg);
- if (pkg.equalsIgnoreCase(desktopPkg)) {
- setDefaultDesktop(pkg);
+ Log.e(TAG, "checkDefaultDesktop: pkg = " + pkg);
+ Log.e(TAG, "checkDefaultDesktop: desktopPkg = " + desktopPkg);
+ if (TextUtils.isEmpty(pkg)) {
+ if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform) {
+ JGYUtils.getInstance().setDop7DefaultDesktop();
+ }
+ } else {
+ if (pkg.equalsIgnoreCase(desktopPkg)) {
+ setDefaultDesktop(pkg);
+ }
}
}
@@ -2420,6 +2445,10 @@ public class JGYUtils {
setDefaultDesktop(PackageNames.YIXUEPAI_DESKTOP);
}
+ public void setDop7DefaultDesktop() {
+ setDefaultDesktop("com.aoleyunos.dop7");
+ }
+
/**
* 设置默认桌面
*
@@ -2454,6 +2483,8 @@ public class JGYUtils {
if (ApkUtils.isAvailable(mContext, AoleyunOs)
|| "C2".equals(Build.MODEL)) {
setDefaultDesktop(AoleyunOs, AoleyunOsClass);
+ } else if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
+ setDefaultDesktop(AiUDuOs, AiUDuOsClass);
} else {
setDefaultDesktop(Launcher3, Launcher3Class);
}
@@ -2463,6 +2494,8 @@ public class JGYUtils {
if (ApkUtils.isAvailable(mContext, AoleyunOs)
|| "C2".equals(Build.MODEL)) {
ApkUtils.openPackage(mContext, AoleyunOs, AoleyunOsClass);
+ } else if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
+ setDefaultDesktop(AiUDuOs, AiUDuOsClass);
} else {
ApkUtils.openPackage(mContext, Launcher3, Launcher3Class);
}
diff --git a/app/src/main/java/com/aoleyun/sn/utils/Utils.java b/app/src/main/java/com/aoleyun/sn/utils/Utils.java
index 02d177b..024f2ec 100644
--- a/app/src/main/java/com/aoleyun/sn/utils/Utils.java
+++ b/app/src/main/java/com/aoleyun/sn/utils/Utils.java
@@ -1219,6 +1219,7 @@ public class Utils {
.create(); //启动下载}
}
} else {
+
Aria.download(context)
.load(url) //读取下载地址
.setFilePath(JGYUtils.getInstance().getDownLoadPath() + fileName)
@@ -1228,6 +1229,10 @@ public class Utils {
}
}
+ private void showToast() {
+
+ }
+
/**
* 屏幕截图
* 适用于lanucher版
@@ -1776,6 +1781,7 @@ public class Utils {
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G11Platform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform
+ || JGYUtils.getInstance().checkAppPlatform() == JGYUtils.AUDG104Platform
) {
return Utils.getProperty("ro.build.display.id", "获取失败");
} else {
diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml
index 05524ad..471ccb5 100644
--- a/app/src/main/res/layout-land/activity_main.xml
+++ b/app/src/main/res/layout-land/activity_main.xml
@@ -77,613 +77,624 @@
-
-
+ app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_height="@dimen/dp_472"
+ android:orientation="vertical"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
+ android:layout_marginStart="@dimen/dp_8"
+ android:layout_marginTop="@dimen/dp_8"
+ android:layout_marginEnd="@dimen/dp_8"
+ android:layout_weight="3">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+ android:textStyle="bold"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
-
-
-
+ app:layout_constraintTop_toBottomOf="@+id/tv_bind_statu">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-land/activity_update.xml b/app/src/main/res/layout-land/activity_update.xml
new file mode 100644
index 0000000..7ea8b9b
--- /dev/null
+++ b/app/src/main/res/layout-land/activity_update.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-port/activity_main.xml b/app/src/main/res/layout-port/activity_main.xml
index de742ba..0fce3d4 100644
--- a/app/src/main/res/layout-port/activity_main.xml
+++ b/app/src/main/res/layout-port/activity_main.xml
@@ -267,6 +267,7 @@
android:layout_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8"
android:background="@color/text_gray"
+ android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@@ -314,6 +315,7 @@
android:layout_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8"
android:background="@color/text_gray"
+ android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
diff --git a/app/src/main/res/layout-port/activity_update.xml b/app/src/main/res/layout-port/activity_update.xml
new file mode 100644
index 0000000..3177b58
--- /dev/null
+++ b/app/src/main/res/layout-port/activity_update.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_eye_protection.xml b/app/src/main/res/layout/activity_eye_protection.xml
index 9e2b632..8e86dfd 100644
--- a/app/src/main/res/layout/activity_eye_protection.xml
+++ b/app/src/main/res/layout/activity_eye_protection.xml
@@ -45,231 +45,240 @@
-
-
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 6dc0260..b6ec2b2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -18,6 +18,12 @@ buildscript {
}
allprojects {
+ configurations.all {
+ resolutionStrategy {
+ force 'androidx.constraintlayout:constraintlayout:2.0.4'
+ }
+ }
+
repositories {
google()
mavenCentral()