1.4.0608 增加爱优读

This commit is contained in:
2024-06-13 11:19:36 +08:00
parent 08fd02bf93
commit 526914c64c
28 changed files with 1291 additions and 1345 deletions

View File

@@ -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"'
}

View File

@@ -136,8 +136,7 @@
android:theme="@style/AppTheme">
<activity
android:name=".activity.SplashActivity"
android:exported="true"
android:screenOrientation="userPortrait">
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -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 @@
</intent-filter>
</activity>
<activity
android:name=".activity.checknet.CheckNetActivity"
android:theme="@style/activity_styles">
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.MAIN" /> -->
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
<!-- </intent-filter> -->
</activity>
<activity
android:name=".activity.main.MainActivity"
android:excludeFromRecents="true"
android:launchMode="singleTop"
android:screenOrientation="userPortrait" />
android:launchMode="singleTop" />
<activity android:name=".activity.TopActivity" />
<activity android:name=".activity.MainActivity1" />
<activity
android:name=".activity.update.UpdateActivity"
android:exported="true"
android:launchMode="singleInstance"
android:label="检查更新"
android:icon="@drawable/com_aoleyun_update"
android:screenOrientation="userPortrait">
android:label="检查更新"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@@ -39,15 +39,10 @@ public class CleanupActivity extends BaseMvpActivity {
}
@Override
protected boolean setNightMode() {
public boolean setNightMode() {
return true;
}
@Override
protected boolean setfitWindow() {
return false;
}
/**
* 初始化视图
*/

View File

@@ -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);

View File

@@ -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<MainActivity1> {
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;
}
}

View File

@@ -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();

View File

@@ -115,15 +115,10 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
}
@Override
protected boolean setNightMode() {
public boolean setNightMode() {
return true;
}
@Override
protected boolean setfitWindow() {
return false;
}
@Override
protected void initDataBinding() {
mViewModel.setCtx(this);

View File

@@ -54,15 +54,10 @@ public class RequestLogActivity extends BaseMvpActivity implements RequestLogCon
}
@Override
protected boolean setNightMode() {
public boolean setNightMode() {
return true;
}
@Override
protected boolean setfitWindow() {
return false;
}
@Override
public void initView() {
ButterKnife.bind(this);

View File

@@ -45,15 +45,10 @@ public class UpdateActivity extends BaseMvpActivity implements UpdateContact.Upd
}
@Override
protected boolean setNightMode() {
public boolean setNightMode() {
return true;
}
@Override
protected boolean setfitWindow() {
return false;
}
@Override
public void initView() {
ButterKnife.bind(this);

View File

@@ -60,6 +60,7 @@ public class AppUpdateAdapter extends RecyclerView.Adapter<AppUpdateAdapter.Hold
drawable = mContext.getDrawable(R.drawable.com_aoleyun_appstore);
break;
case PackageNames.DESKTOP:
case PackageNames.AIUDUDESKTOP:
drawable = mContext.getDrawable(R.drawable.com_aoleyun_os);
break;
case PackageNames.NOTIFICATIONS:

View File

@@ -1,38 +0,0 @@
package com.aoleyun.sn.base;
import android.os.Bundle;
import androidx.annotation.CallSuper;
import androidx.annotation.Nullable;
import com.aoleyun.sn.R;
import com.zackratos.ultimatebarx.ultimatebarx.java.UltimateBarX;
public abstract class BaseActivity extends BaseRxActivity {
public BaseActivity() {
super();
}
@Override
@CallSuper
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// StatusBarUtil.init(this);
UltimateBarX.statusBar(this)
.transparent()
.colorRes(R.color.colorPrimaryDark)
.light(true)
.apply();
UltimateBarX.navigationBar(this)
.transparent()
.colorRes(R.color.colorPrimaryDark)
.light(true)
.apply();
}
/**
* 设置布局
*/
protected abstract int getLayoutId();
}

View File

@@ -22,17 +22,39 @@ public abstract class BaseDataBindingActivity extends BaseRxActivity {
UltimateBarX.statusBar(this)
.transparent()
.colorRes(R.color.colorPrimaryDark)
.light(true)
.light(setNightMode())
.fitWindow(setfitWindow())
.apply();
UltimateBarX.navigationBar(this)
.transparent()
.colorRes(R.color.colorPrimaryDark)
.light(true)
.light(setNightMode())
.fitWindow(setfitWindow())
.apply();
initDataBinding();
initView();
initData();
}
/**
* @return 是否是黑色状态栏
*/
// protected abstract boolean setNightMode();
public boolean setNightMode() {
return false;
}
/**
* @return 是否是入侵
*/
// protected abstract boolean setNightMode();
public boolean setfitWindow() {
return false;
}
protected abstract void initDataBinding();
/**
* 初始化视图
*/
@@ -42,4 +64,4 @@ public abstract class BaseDataBindingActivity extends BaseRxActivity {
* 初始化数据
*/
protected abstract void initData();
}
}

View File

@@ -41,10 +41,16 @@ public abstract class BaseTransparentActivity extends BaseRxActivity {
/**
* @return 是否是黑色状态栏
*/
protected abstract boolean setNightMode();
// protected abstract boolean setNightMode();
public boolean setNightMode() {
return false;
}
/**
* @return 是否是入侵
*/
protected abstract boolean setfitWindow();
// protected abstract boolean setNightMode();
public boolean setfitWindow() {
return false;
}
}

View File

@@ -75,7 +75,8 @@ public class CommonConfig {
public static final String DEFAULT_LAUNCHER_PACKAGE_NAME = "aoleyun_default_launcher_key";
/*首次请求成功打开默认app*/
public static final String OPEN_LAUNCHER_STATUS = "frist_open_default_launcher";
/*存放后台上传的app包名 set*/
public static final String ALL_APP_PKG_SET = "all_app_pkg_set_key";
/**
* 管控系统指令

View File

@@ -12,6 +12,7 @@ public class PackageNames {
public static final String DEVICE_INFO = "com.aoleyun.sn";
public static final String APPSTORE = "com.aoleyun.appstore";
public static final String DESKTOP = "com.aoleyun.os";
public static final String AIUDUDESKTOP = "com.aoleyun.audos";
public static final String NOTIFICATIONS = "com.aoleyun.info";
public static final String BROWSER = "com.aoleyun.browser";
public static final String AILOG = "com.aoleyun.ailog";

View File

@@ -395,6 +395,12 @@ public class NetInterfaceManager {
return okHttpClient;
}
public static RequestBody convertToRequestBody(Object param) {
MediaType mediaType = MediaType.Companion.parse("text/plain");
RequestBody requestBody = RequestBody.Companion.create(String.valueOf(param), mediaType);
return requestBody;
}
public static RequestBody convertToRequestBody(String param) {
RequestBody requestBody = RequestBody.create(MediaType.parse("text/plain"), param);
return requestBody;
@@ -459,7 +465,7 @@ public class NetInterfaceManager {
Utils.getCustomVersion(),
BuildConfig.VERSION_NAME,
Utils.getAPPVersionName(PackageNames.APPSTORE, mContext),
Utils.getAPPVersionName(PackageNames.DESKTOP, mContext),
getDesktopAPPVersionName(),
Utils.getAndroid7MAC(),
Utils.obtainWifiInfo(mContext),
mMMKV.decodeString(NetInterfaceManager.PublicIP, ""),
@@ -479,6 +485,14 @@ public class NetInterfaceManager {
.observeOn(AndroidSchedulers.mainThread());
}
private String getDesktopAPPVersionName() {
if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
return Utils.getAPPVersionName(PackageNames.AIUDUDESKTOP, mContext);
} else {
return Utils.getAPPVersionName(PackageNames.DESKTOP, mContext);
}
}
/**
* 获取推送的tag
*
@@ -888,8 +902,14 @@ public class NetInterfaceManager {
.getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.APPSTORE, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> desktopUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.DESKTOP, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> 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<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = NetInterfaceManager.getInstance()
@@ -977,8 +997,14 @@ public class NetInterfaceManager {
.getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.APPSTORE, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> desktopUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.DESKTOP, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> 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<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> 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<AppListInfo> appListInfos = listBaseResponse.data;
cacheHelper.put(UrlAddress.GET_ALL_APP, GsonUtils.toJSONString(appListInfos));
getAppAutoStartUpdateAndNet(appListInfos);
Set<String> 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, "");
}

View File

@@ -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<String> 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<String> 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定时

View File

@@ -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<DownloadTaskInfo>() {
}.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<DownloadTaskInfo>() {
}.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());
}
}

View File

@@ -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();
}

View File

@@ -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<String> AiudHideApp = new HashSet<String>() {{
public static final HashSet<String> AiudHideApp = new HashSet<String>() {{
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<String> 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<String> AoleyunOSApp = new HashSet<String>() {{
private static final Set<String> AoleyunOSApp = new HashSet<String>() {{
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<String> 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<ActivityManager.RunningServiceInfo> 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 {

View File

@@ -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<String> 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);
}

View File

@@ -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 {

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.update.UpdateActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="应用更新检测"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_32"
android:layout_marginEnd="@dimen/dp_32"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_nodata"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView2"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_nodata"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="没有找到更新信息"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/imageView2"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="@+id/imageView2"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -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" />

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.update.UpdateActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="应用更新检测"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_nodata"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView2"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_nodata"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="没有找到更新信息"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/imageView2"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="@+id/imageView2"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -45,231 +45,240 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background">
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="滤蓝光模式"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="开启滤蓝光护眼,让屏幕偏暖色,保护视力,减少视觉疲劳。"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton1"
app:layout_constraintStart_toStartOf="@+id/textView1"
app:layout_constraintTop_toBottomOf="@+id/textView1" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="滤蓝光模式"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton1"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="开启滤蓝光护眼,让屏幕偏暖色,保护视力,减少视觉疲劳。"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton1"
app:layout_constraintStart_toStartOf="@+id/textView1"
app:layout_constraintTop_toBottomOf="@+id/textView1" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton1"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background">
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="阅读模式"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="通过模拟纸张的色调,体验如墨水屏般的显示效果,保护视力。"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton2"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="阅读模式"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton2"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="通过模拟纸张的色调,体验如墨水屏般的显示效果,保护视力。"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton2"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton2"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background">
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="躺姿提醒(暂未开放)"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="通仰躺、侧卧时使用平板,提醒坐正后使用"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton3"
app:layout_constraintStart_toStartOf="@+id/textView3"
app:layout_constraintTop_toBottomOf="@+id/textView3" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="躺姿提醒(暂未开放)"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton3"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="通仰躺、侧卧时使用平板,提醒坐正后使用"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton3"
app:layout_constraintStart_toStartOf="@+id/textView3"
app:layout_constraintTop_toBottomOf="@+id/textView3" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton3"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background">
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="抖动提醒(暂未开放)"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="走路、乘车等抖动环境下,提醒到平稳环境下使用"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton4"
app:layout_constraintStart_toStartOf="@+id/textView4"
app:layout_constraintTop_toBottomOf="@+id/textView4" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="抖动提醒(暂未开放)"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton4"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="走路、乘车等抖动环境下,提醒到平稳环境下使用"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton4"
app:layout_constraintStart_toStartOf="@+id/textView4"
app:layout_constraintTop_toBottomOf="@+id/textView4" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton4"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background">
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="亮度提醒(暂未开放)"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="环境亮度过亮或过暗时,提醒到事宜的环境下使用"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton5"
app:layout_constraintStart_toStartOf="@+id/textView5"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:maxLines="1"
android:text="亮度提醒(暂未开放)"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton5"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="2"
android:text="环境亮度过亮或过暗时,提醒到事宜的环境下使用"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/toggleButton5"
app:layout_constraintStart_toStartOf="@+id/textView5"
app:layout_constraintTop_toBottomOf="@+id/textView5" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.aoleyun.sn.view.ToggleButton
android:id="@+id/toggleButton5"
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>