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 { defaultConfig {
applicationId "com.aoleyun.sn" applicationId "com.aoleyun.sn"
versionCode 135 versionCode 143
versionName "1.4.0530" 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. //There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
minSdkVersion 24 minSdkVersion 24
@@ -200,6 +200,20 @@ android {
} }
buildTypes { 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.initWith(debug)
Huaruian8768Debug { Huaruian8768Debug {
versionNameSuffix "-debug" versionNameSuffix "-debug"
@@ -233,12 +247,14 @@ android {
versionNameSuffix "-debug" versionNameSuffix "-debug"
debuggable true debuggable true
signingConfig signingConfigs.teclast8183 signingConfig signingConfigs.teclast8183
// signingConfig signingConfigs.mtk
buildConfigField "String", "platform", '"MTK8183"' buildConfigField "String", "platform", '"MTK8183"'
} }
c2Release.initWith(release) c2Release.initWith(release)
c2Release { c2Release {
signingConfig signingConfigs.teclast8183 signingConfig signingConfigs.teclast8183
// signingConfig signingConfigs.mtk
buildConfigField "String", "platform", '"MTK8183"' buildConfigField "String", "platform", '"MTK8183"'
} }
@@ -351,12 +367,14 @@ android {
versionNameSuffix "-debug" versionNameSuffix "-debug"
debuggable true debuggable true
signingConfig signingConfigs.zhanruiG10Z signingConfig signingConfigs.zhanruiG10Z
// signingConfig signingConfigs.zhanRui
buildConfigField "String", "platform", '"ZR6016"' buildConfigField "String", "platform", '"ZR6016"'
} }
zhanruiG10ZRelease.initWith(release) zhanruiG10ZRelease.initWith(release)
zhanruiG10ZRelease { zhanruiG10ZRelease {
signingConfig signingConfigs.zhanruiG10Z signingConfig signingConfigs.zhanruiG10Z
// signingConfig signingConfigs.zhanRui
buildConfigField "String", "platform", '"ZR6016"' buildConfigField "String", "platform", '"ZR6016"'
} }

View File

@@ -136,8 +136,7 @@
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity <activity
android:name=".activity.SplashActivity" android:name=".activity.SplashActivity"
android:exported="true" android:exported="true">
android:screenOrientation="userPortrait">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -148,7 +147,7 @@
android:name=".activity.EyeProtectionActivity" android:name=".activity.EyeProtectionActivity"
android:exported="true" android:exported="true"
android:icon="@drawable/com_system_huyan" android:icon="@drawable/com_system_huyan"
android:label="护眼模式" android:label="护眼助手"
android:launchMode="singleInstance" android:launchMode="singleInstance"
android:screenOrientation="userLandscape" android:screenOrientation="userLandscape"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
@@ -172,31 +171,17 @@
</intent-filter> </intent-filter>
</activity> </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 <activity
android:name=".activity.main.MainActivity" android:name=".activity.main.MainActivity"
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:launchMode="singleTop" android:launchMode="singleTop" />
android:screenOrientation="userPortrait" />
<activity android:name=".activity.TopActivity" /> <activity android:name=".activity.TopActivity" />
<activity android:name=".activity.MainActivity1" />
<activity <activity
android:name=".activity.update.UpdateActivity" android:name=".activity.update.UpdateActivity"
android:exported="true" android:exported="true"
android:launchMode="singleInstance"
android:label="检查更新"
android:icon="@drawable/com_aoleyun_update" android:icon="@drawable/com_aoleyun_update"
android:screenOrientation="userPortrait"> android:label="检查更新"
android:launchMode="singleInstance">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

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

View File

@@ -34,15 +34,10 @@ public class EyeProtectionActivity extends BaseMvpActivity {
} }
@Override @Override
protected boolean setNightMode() { public boolean setNightMode() {
return true; return true;
} }
@Override
protected boolean setfitWindow() {
return false;
}
@Override @Override
public void initView() { public void initView() {
ButterKnife.bind(this); 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) { if (BuildConfig.DEBUG) {
// JGYUtils.getInstance().showApp("com.gaomuxuexi34"); // JGYUtils.getInstance().showApp("com.gaomuxuexi34");
JGYUtils.getModel(); JGYUtils.getModel();
Utils.getAndroiodScreenProperty(SplashActivity.this);
Log.e(TAG, "getOperators: " + NetworkUtils.getOperators(this)); Log.e(TAG, "getOperators: " + NetworkUtils.getOperators(this));
Log.e(TAG, "PublicIP: " + MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE).decodeString(NetInterfaceManager.PublicIP, "")); Log.e(TAG, "PublicIP: " + MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE).decodeString(NetInterfaceManager.PublicIP, ""));
NetInterfaceManager.GetWhois(); NetInterfaceManager.GetWhois();

View File

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

View File

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

View File

@@ -45,15 +45,10 @@ public class UpdateActivity extends BaseMvpActivity implements UpdateContact.Upd
} }
@Override @Override
protected boolean setNightMode() { public boolean setNightMode() {
return true; return true;
} }
@Override
protected boolean setfitWindow() {
return false;
}
@Override @Override
public void initView() { public void initView() {
ButterKnife.bind(this); 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); drawable = mContext.getDrawable(R.drawable.com_aoleyun_appstore);
break; break;
case PackageNames.DESKTOP: case PackageNames.DESKTOP:
case PackageNames.AIUDUDESKTOP:
drawable = mContext.getDrawable(R.drawable.com_aoleyun_os); drawable = mContext.getDrawable(R.drawable.com_aoleyun_os);
break; break;
case PackageNames.NOTIFICATIONS: 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) UltimateBarX.statusBar(this)
.transparent() .transparent()
.colorRes(R.color.colorPrimaryDark) .colorRes(R.color.colorPrimaryDark)
.light(true) .light(setNightMode())
.fitWindow(setfitWindow())
.apply(); .apply();
UltimateBarX.navigationBar(this) UltimateBarX.navigationBar(this)
.transparent() .transparent()
.colorRes(R.color.colorPrimaryDark) .colorRes(R.color.colorPrimaryDark)
.light(true) .light(setNightMode())
.fitWindow(setfitWindow())
.apply(); .apply();
initDataBinding();
initView(); initView();
initData(); 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();
/** /**
* 初始化视图 * 初始化视图
*/ */

View File

@@ -41,10 +41,16 @@ public abstract class BaseTransparentActivity extends BaseRxActivity {
/** /**
* @return 是否是黑色状态栏 * @return 是否是黑色状态栏
*/ */
protected abstract boolean setNightMode(); // protected abstract boolean setNightMode();
public boolean setNightMode() {
return false;
}
/** /**
* @return 是否是入侵 * @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"; public static final String DEFAULT_LAUNCHER_PACKAGE_NAME = "aoleyun_default_launcher_key";
/*首次请求成功打开默认app*/ /*首次请求成功打开默认app*/
public static final String OPEN_LAUNCHER_STATUS = "frist_open_default_launcher"; 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 DEVICE_INFO = "com.aoleyun.sn";
public static final String APPSTORE = "com.aoleyun.appstore"; public static final String APPSTORE = "com.aoleyun.appstore";
public static final String DESKTOP = "com.aoleyun.os"; 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 NOTIFICATIONS = "com.aoleyun.info";
public static final String BROWSER = "com.aoleyun.browser"; public static final String BROWSER = "com.aoleyun.browser";
public static final String AILOG = "com.aoleyun.ailog"; public static final String AILOG = "com.aoleyun.ailog";

View File

@@ -395,6 +395,12 @@ public class NetInterfaceManager {
return okHttpClient; 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) { public static RequestBody convertToRequestBody(String param) {
RequestBody requestBody = RequestBody.create(MediaType.parse("text/plain"), param); RequestBody requestBody = RequestBody.create(MediaType.parse("text/plain"), param);
return requestBody; return requestBody;
@@ -459,7 +465,7 @@ public class NetInterfaceManager {
Utils.getCustomVersion(), Utils.getCustomVersion(),
BuildConfig.VERSION_NAME, BuildConfig.VERSION_NAME,
Utils.getAPPVersionName(PackageNames.APPSTORE, mContext), Utils.getAPPVersionName(PackageNames.APPSTORE, mContext),
Utils.getAPPVersionName(PackageNames.DESKTOP, mContext), getDesktopAPPVersionName(),
Utils.getAndroid7MAC(), Utils.getAndroid7MAC(),
Utils.obtainWifiInfo(mContext), Utils.obtainWifiInfo(mContext),
mMMKV.decodeString(NetInterfaceManager.PublicIP, ""), mMMKV.decodeString(NetInterfaceManager.PublicIP, ""),
@@ -479,6 +485,14 @@ public class NetInterfaceManager {
.observeOn(AndroidSchedulers.mainThread()); .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 * 获取推送的tag
* *
@@ -888,8 +902,14 @@ public class NetInterfaceManager {
.getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JGYUtils.getInstance().checkAppPlatform()); .getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = NetInterfaceManager.getInstance() Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.APPSTORE, JGYUtils.getInstance().checkAppPlatform()); .getUpdateApi().getUpdate(PackageNames.APPSTORE, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> desktopUpdateObservable = NetInterfaceManager.getInstance() 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()); .getUpdateApi().getUpdate(PackageNames.DESKTOP, JGYUtils.getInstance().checkAppPlatform());
}
Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = NetInterfaceManager.getInstance() Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JGYUtils.getInstance().checkAppPlatform()); .getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = NetInterfaceManager.getInstance() Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = NetInterfaceManager.getInstance()
@@ -977,8 +997,14 @@ public class NetInterfaceManager {
.getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JGYUtils.getInstance().checkAppPlatform()); .getUpdateApi().getUpdate(BuildConfig.APPLICATION_ID, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = NetInterfaceManager.getInstance() Observable<BaseResponse<AppUpdateInfo>> storeUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.APPSTORE, JGYUtils.getInstance().checkAppPlatform()); .getUpdateApi().getUpdate(PackageNames.APPSTORE, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> desktopUpdateObservable = NetInterfaceManager.getInstance() 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()); .getUpdateApi().getUpdate(PackageNames.DESKTOP, JGYUtils.getInstance().checkAppPlatform());
}
Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = NetInterfaceManager.getInstance() Observable<BaseResponse<AppUpdateInfo>> notifyUpdateObservable = NetInterfaceManager.getInstance()
.getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JGYUtils.getInstance().checkAppPlatform()); .getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JGYUtils.getInstance().checkAppPlatform());
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = NetInterfaceManager.getInstance() Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = NetInterfaceManager.getInstance()
@@ -2197,7 +2223,11 @@ public class NetInterfaceManager {
// String default_launcher = (String) SPUtils.get(mContext, "default_launcher", ""); // String default_launcher = (String) SPUtils.get(mContext, "default_launcher", "");
Log.e("getDefaultApp", "onNext: " + default_launcher); Log.e("getDefaultApp", "onNext: " + default_launcher);
if (TextUtils.isEmpty(default_launcher)) { if (TextUtils.isEmpty(default_launcher)) {
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform) {
JGYUtils.getInstance().setDop7DefaultDesktop();
} else {
JGYUtils.getInstance().setDefaultDesktop(); JGYUtils.getInstance().setDefaultDesktop();
}
} else { } else {
JGYUtils.getInstance().setDefaultDesktop(default_launcher); JGYUtils.getInstance().setDefaultDesktop(default_launcher);
} }
@@ -2577,6 +2607,8 @@ public class NetInterfaceManager {
tagSets.add(JGYUtils.G11TAG); tagSets.add(JGYUtils.G11TAG);
} else if (platform == JGYUtils.MT8768Platform) { } else if (platform == JGYUtils.MT8768Platform) {
tagSets.add(JGYUtils.MT8768Tag); tagSets.add(JGYUtils.MT8768Tag);
} else if (platform == JGYUtils.AUDG104Platform) {
tagSets.add(JGYUtils.AUDG104Tag);
} }
}); });
Log.e(TAG, "clearAndAppendTags: " + tagSets); Log.e(TAG, "clearAndAppendTags: " + tagSets);
@@ -3400,6 +3432,8 @@ public class NetInterfaceManager {
List<AppListInfo> appListInfos = listBaseResponse.data; List<AppListInfo> appListInfos = listBaseResponse.data;
cacheHelper.put(UrlAddress.GET_ALL_APP, GsonUtils.toJSONString(appListInfos)); cacheHelper.put(UrlAddress.GET_ALL_APP, GsonUtils.toJSONString(appListInfos));
getAppAutoStartUpdateAndNet(appListInfos); getAppAutoStartUpdateAndNet(appListInfos);
Set<String> pkgList = appListInfos.stream().map(AppListInfo::getApp_package).collect(Collectors.toSet());
mMMKV.encode(CommonConfig.ALL_APP_PKG_SET, pkgList);
} else { } else {
cacheHelper.put(UrlAddress.GET_ALL_APP, ""); cacheHelper.put(UrlAddress.GET_ALL_APP, "");
} }

View File

@@ -73,6 +73,7 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers; import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
@@ -1283,11 +1284,11 @@ public class PushManager {
switch (remoteDebug.getType()) { switch (remoteDebug.getType()) {
case ACTION_PULL: case ACTION_PULL:
Log.e(TAG, "customOrder: 唤起"); Log.e(TAG, "customOrder: 唤起");
ApkUtils.openPackage(mContext, pkg); openApp(pkg);
break; break;
case ACTION_DELETE: case ACTION_DELETE:
Log.e(TAG, "customOrder: 删除"); Log.e(TAG, "customOrder: 删除");
ApkUtils.UninstallAPP(mContext, pkg); orderDeleteApp(pkg);
break; break;
case ACTION_UPGRADE: case ACTION_UPGRADE:
Log.e(TAG, "customOrder: 更新"); 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开启 * @param jsonString "is_log": 1,//是否开启运行日志 0关闭 1开启
* "is_log_type": 1 //获取运行日志类型 0即时 1定时 * "is_log_type": 1 //获取运行日志类型 0即时 1定时

View File

@@ -230,8 +230,8 @@ public class GuardService extends Service {
@Override @Override
public int onStartCommand(Intent intent, int flags, int startId) { public int onStartCommand(Intent intent, int flags, int startId) {
Log.e(TAG, "onStartCommand: "); Log.e(TAG, "onStartCommand: ");
Aria.init(this);
Aria.download(this).register(); Aria.download(this).register();
Aria.download(this).resumeAllTask();
// 绑定建立链接 // 绑定建立链接
bindService(new Intent(this, StepService.class), mServiceConnection, Context.BIND_IMPORTANT); bindService(new Intent(this, StepService.class), mServiceConnection, Context.BIND_IMPORTANT);
return START_STICKY; return START_STICKY;
@@ -849,6 +849,8 @@ public class GuardService extends Service {
//在这里处理任务执行中的状态,如进度进度条的刷新 //在这里处理任务执行中的状态,如进度进度条的刷新
@Download.onTaskRunning @Download.onTaskRunning
protected void running(DownloadTask task) { protected void running(DownloadTask task) {
String filepath = task.getFilePath();
if (filepath.endsWith("apk")) {
String jsonString = task.getExtendField(); String jsonString = task.getExtendField();
Gson gson = new Gson(); Gson gson = new Gson();
Type listType = new TypeToken<DownloadTaskInfo>() { Type listType = new TypeToken<DownloadTaskInfo>() {
@@ -857,7 +859,10 @@ public class GuardService extends Service {
String app_name = downloadTaskInfo.getApp_name(); String app_name = downloadTaskInfo.getApp_name();
String app_package = downloadTaskInfo.getApp_package(); String app_package = downloadTaskInfo.getApp_package();
Log.e("aria", "正在下载:" + task.getPercent() + ":" + task.getExtendField()); Log.e("aria", "正在下载:" + task.getPercent() + ":" + task.getExtendField());
Toaster.show("正在下载:" + app_name + "-" + task.getPercent() + "%" + "\t" + Formatter.formatFileSize(GuardService.this, task.getSpeed()) + "/s"); Toaster.show("下载启动:" + app_name + "\t" + task.getPercent() + "%");
} else if (filepath.endsWith(".zip")) {
Toaster.show("下载开机动画启动:" + "\t" + task.getPercent() + " % ");
}
} }
@Download.onTaskComplete @Download.onTaskComplete
@@ -884,7 +889,7 @@ public class GuardService extends Service {
new Thread(() -> ApkUtils.installApp(GuardService.this, filepath)).start(); new Thread(() -> ApkUtils.installApp(GuardService.this, filepath)).start();
} }
} else if (filepath.endsWith(".zip")) { } else if (filepath.endsWith(".zip")) {
Log.e("taskComplete", "下载完成:" + task.getPercent() + ":" + task.getExtendField()); Log.e("taskComplete", "开机动画下载完成:" + task.getPercent() + ":" + task.getExtendField());
JGYUtils.getInstance().setBootanimationG10J(task.getFilePath()); 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 ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
if (mMMKV.decodeInt(CommonConfig.DEVICES_FRIST_START, 0) == 0) { // if (mMMKV.decodeInt(CommonConfig.DEVICES_FRIST_START, 0) == 0) {
ApkUtils.openPackage(MainService.this, "com.books.wisdom"); // ApkUtils.openPackage(MainService.this, "com.books.wisdom");
} // }
ApkUtils.HideAiUDuApp(); ApkUtils.HideAiUDuApp();
} }

View File

@@ -18,6 +18,7 @@ import android.os.Binder;
import android.os.Build; import android.os.Build;
import android.provider.Settings; import android.provider.Settings;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.ArraySet;
import android.util.Log; import android.util.Log;
import androidx.annotation.RequiresApi; import androidx.annotation.RequiresApi;
@@ -25,14 +26,17 @@ import androidx.core.content.FileProvider;
import com.aoleyun.sn.BuildConfig; import com.aoleyun.sn.BuildConfig;
import com.aoleyun.sn.bean.UploadAppInfo; import com.aoleyun.sn.bean.UploadAppInfo;
import com.aoleyun.sn.comm.CommonConfig;
import com.aoleyun.sn.comm.JGYActions; import com.aoleyun.sn.comm.JGYActions;
import com.aoleyun.sn.comm.PackageNames; import com.aoleyun.sn.comm.PackageNames;
import com.aoleyun.sn.gson.GsonUtils; import com.aoleyun.sn.gson.GsonUtils;
import com.aoleyun.sn.push.PushManager;
import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.Aria;
import com.arialyy.aria.core.download.DownloadEntity; import com.arialyy.aria.core.download.DownloadEntity;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.hjq.toast.Toaster; import com.hjq.toast.Toaster;
import com.tencent.mmkv.MMKV;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.DataOutputStream; import java.io.DataOutputStream;
@@ -69,6 +73,7 @@ public class ApkUtils {
this.add("com.aoleyun.appstore"); this.add("com.aoleyun.appstore");
this.add("com.aoleyun.sn"); this.add("com.aoleyun.sn");
this.add("com.aoleyun.info"); this.add("com.aoleyun.info");
this.add("com.aoleyun.audos");
this.add("com.aoleyun.os"); this.add("com.aoleyun.os");
this.add("com.aoleyun.ailog"); this.add("com.aoleyun.ailog");
this.add("com.aoleyun.browser"); this.add("com.aoleyun.browser");
@@ -414,6 +419,7 @@ public class ApkUtils {
this.add("com.ygyb.yischool"); this.add("com.ygyb.yischool");
this.add("com.gaomuxuexi34"); 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.email");
this.add("com.android.soundrecorder"); this.add("com.android.soundrecorder");
this.add("com.android.documentsui"); // this.add("com.android.documentsui");
this.add("com.mediatek.camera"); this.add("com.mediatek.camera");
this.add("com.aoleyun.browser"); this.add("com.aoleyun.browser");
this.add("com.android.music"); this.add("com.android.music");
@@ -521,7 +527,12 @@ public class ApkUtils {
public static void HideAiUDuApp() { public static void HideAiUDuApp() {
Log.e(TAG, "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) { for (String s : AiudHideApp) {
if (pkgs.contains(s)) {
continue;
}
JGYUtils.getInstance().hideApp(s); JGYUtils.getInstance().hideApp(s);
} }
} }
@@ -1187,6 +1198,11 @@ public class ApkUtils {
Log.e(TAG, "showAllApp: continue: " + pkg); Log.e(TAG, "showAllApp: continue: " + pkg);
continue; continue;
} }
if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
if (AiudHideApp.contains(pkg)) {
continue;
}
}
try { try {
Log.i(TAG, "showAllApp: show: " + pkg); Log.i(TAG, "showAllApp: show: " + pkg);
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0); pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
@@ -1366,9 +1382,10 @@ public class ApkUtils {
Log.e("addShortcut", "putstring:" + aole_force_app); 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.info");
this.add("com.aoleyun.os"); this.add("com.aoleyun.os");
this.add("com.aoleyun.audos");
this.add("com.aoleyun.sn"); this.add("com.aoleyun.sn");
this.add("com.aoleyun.browser"); this.add("com.aoleyun.browser");
this.add("com.aoleyun.appstore"); this.add("com.aoleyun.appstore");
@@ -1388,10 +1405,14 @@ public class ApkUtils {
this.add("com.calculator.uiui"); this.add("com.calculator.uiui");
this.add("com.alarmclock.uiui"); this.add("com.alarmclock.uiui");
this.add("com.uiui.speed"); this.add("com.uiui.speed");
this.add("com.books.wisdom");
}}; }};
public static String getRunningAppInfo(Context context) { 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); // ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
// List<ActivityManager.RunningServiceInfo> infoList = activityManager.getRunningServices(Integer.MAX_VALUE); // List<ActivityManager.RunningServiceInfo> infoList = activityManager.getRunningServices(Integer.MAX_VALUE);
//用来存储获取的应用信息数据 //用来存储获取的应用信息数据
@@ -1407,7 +1428,11 @@ public class ApkUtils {
} }
//排除所有系统应用,不显示 //排除所有系统应用,不显示
if (isSystemApp(context, packageName)) { 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; continue;
} }
} else { } else {

View File

@@ -149,6 +149,7 @@ public class JGYUtils {
public static final int YXPD1Platform = 15; public static final int YXPD1Platform = 15;
public static final int G11Platform = 16; public static final int G11Platform = 16;
public static final int MT8768Platform = 17; public static final int MT8768Platform = 17;
public static final int AUDG104Platform = 18;
public static final String Other = "其他"; public static final String Other = "其他";
@@ -166,6 +167,7 @@ public class JGYUtils {
public static final String YXPD1TAG = "YXPD1"; public static final String YXPD1TAG = "YXPD1";
public static final String G11TAG = "MTKG11"; public static final String G11TAG = "MTKG11";
public static final String MT8768Tag = "MT8768"; public static final String MT8768Tag = "MT8768";
public static final String AUDG104Tag = "AUDG104";
private CacheHelper cacheHelper; private CacheHelper cacheHelper;
@@ -293,6 +295,9 @@ public class JGYUtils {
} else if (MT8768Tag.equalsIgnoreCase(platform)) { } else if (MT8768Tag.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "MT8768"); Log.i(TAG, "checkAppPlatform: " + "MT8768");
return MT8768Platform; return MT8768Platform;
} else if (AUDG104Tag.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "AUDG104");
return AUDG104Platform;
} else { } else {
Log.i(TAG, "checkAppPlatform: " + "没有数据"); Log.i(TAG, "checkAppPlatform: " + "没有数据");
return UnknowPlatform; return UnknowPlatform;
@@ -343,6 +348,8 @@ public class JGYUtils {
getAppPlatformCallback.AppPlatform(G11Platform); getAppPlatformCallback.AppPlatform(G11Platform);
} else if (MT8768Tag.equalsIgnoreCase(platform)) { } else if (MT8768Tag.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(MT8768Platform); getAppPlatformCallback.AppPlatform(MT8768Platform);
} else if (AUDG104Tag.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(AUDG104Platform);
} else { } else {
getAppPlatformCallback.AppPlatform(UnknowPlatform); getAppPlatformCallback.AppPlatform(UnknowPlatform);
} }
@@ -1276,6 +1283,7 @@ public class JGYUtils {
this.add("com.uiui.browser"); this.add("com.uiui.browser");
this.add("com.android.uiuios"); this.add("com.android.uiuios");
this.add("com.aoleyun.os"); this.add("com.aoleyun.os");
this.add("com.aoleyun.audos");
this.add("com.aoleyunos.dop1"); this.add("com.aoleyunos.dop1");
this.add("com.aoleyunos.dop2"); this.add("com.aoleyunos.dop2");
this.add("com.aoleyunos.dop3"); this.add("com.aoleyunos.dop3");
@@ -1287,6 +1295,8 @@ public class JGYUtils {
this.add("com.uiui.videoplayer"); this.add("com.uiui.videoplayer");
this.add("com.ygyb.yischool"); this.add("com.ygyb.yischool");
this.add("com.books.wisdom"); this.add("com.books.wisdom");
this.add("com.qi.airoom");
this.add("com.qi.AiStudyRoom");
}}; }};
private Set<String> getWhitePkgList() { private Set<String> getWhitePkgList() {
@@ -1755,67 +1765,71 @@ public class JGYUtils {
} else { } else {
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("MD5", MD5); jsonObject.addProperty("MD5", MD5);
jsonObject.addProperty("app_name", "开机动画");
jsonObject.addProperty("app_package", "开机动画");
Utils.ariaDownload(mContext, url, jsonObject); Utils.ariaDownload(mContext, url, jsonObject);
Log.e(TAG, "checkBootFile: " + "download file"); Log.e(TAG, "checkBootFile: " + "download file");
} }
} else { } else {
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("MD5", MD5); jsonObject.addProperty("MD5", MD5);
jsonObject.addProperty("app_name", urlFileName); jsonObject.addProperty("app_name", "开机动画");
jsonObject.addProperty("app_package", "开机动画");
Utils.ariaDownload(mContext, url, jsonObject); Utils.ariaDownload(mContext, url, jsonObject);
} }
} }
private static final String BOOTANIMATION_PATH = "/data/local/qchmedia/bootanimation.zip"; // @Deprecated
// private static final String BOOTANIMATION_PATH = "/data/local/qchmedia/bootanimation.zip";
@Deprecated //
public void setBootanimation(String filePath) { // @Deprecated
File systemFile = new File(BOOTANIMATION_PATH); // public void setBootanimation(String filePath) {
if (!systemFile.exists()) { // File systemFile = new File(BOOTANIMATION_PATH);
systemFile.getParentFile().mkdirs(); // if (!systemFile.exists()) {
File file = systemFile.getParentFile(); // systemFile.getParentFile().mkdirs();
Log.e(TAG, "setBootanimation: " + file.getAbsolutePath()); // File file = systemFile.getParentFile();
try { // Log.e(TAG, "setBootanimation: " + file.getAbsolutePath());
systemFile.createNewFile(); // try {
} catch (IOException e) { // systemFile.createNewFile();
e.printStackTrace(); // } catch (IOException e) {
Log.e("setBootanimation: ", "createNewFile: " + e.getMessage()); // e.printStackTrace();
} // Log.e("setBootanimation: ", "createNewFile: " + e.getMessage());
} // }
File newFile = new File(filePath); // }
if (systemFile.exists() && systemFile.isFile()) { // File newFile = new File(filePath);
String systemMD5 = FileUtils.getFileMD5ToString(systemFile); // if (systemFile.exists() && systemFile.isFile()) {
String newMD5 = FileUtils.getFileMD5ToString(newFile); // String systemMD5 = FileUtils.getFileMD5ToString(systemFile);
if (systemMD5.equals(newMD5)) { // String newMD5 = FileUtils.getFileMD5ToString(newFile);
Log.e(TAG, "setBootanimation: 文件一致"); // if (systemMD5.equals(newMD5)) {
} else { // Log.e(TAG, "setBootanimation: 文件一致");
Path path = Paths.get(newFile.getAbsolutePath()); // } else {
try { // Path path = Paths.get(newFile.getAbsolutePath());
Files.copy(path, new FileOutputStream(systemFile)); // try {
Log.e(TAG, "setBootanimation: 设置新开机动画"); // Files.copy(path, new FileOutputStream(systemFile));
} catch (IOException e) { // Log.e(TAG, "setBootanimation: 设置新开机动画");
Log.e(TAG, "setBootanimation: IOException: " + e.getMessage()); // } catch (IOException e) {
e.printStackTrace(); // Log.e(TAG, "setBootanimation: IOException: " + e.getMessage());
} // e.printStackTrace();
} // }
} else { // }
File file = new File(BOOTANIMATION_PATH); // } else {
Log.e(TAG, "setBootanimation: " + file.getParentFile().getAbsolutePath()); // File file = new File(BOOTANIMATION_PATH);
Log.e(TAG, "setBootanimation: " + "Is a directory = " + file.isDirectory()); // Log.e(TAG, "setBootanimation: " + file.getParentFile().getAbsolutePath());
if (!file.getParentFile().delete()) { // Log.e(TAG, "setBootanimation: " + "Is a directory = " + file.isDirectory());
Log.e(TAG, "setBootanimation: " + "系统动画删除失败"); // if (!file.getParentFile().delete()) {
} // Log.e(TAG, "setBootanimation: " + "系统动画删除失败");
Path path = Paths.get(newFile.getAbsolutePath()); // }
try { // Path path = Paths.get(newFile.getAbsolutePath());
Files.copy(path, new FileOutputStream(systemFile)); // try {
copy(systemFile.getAbsolutePath(), newFile.getAbsolutePath()); // Files.copy(path, new FileOutputStream(systemFile));
Log.e(TAG, "setBootanimation: 设置新开机动画"); // copy(systemFile.getAbsolutePath(), newFile.getAbsolutePath());
} catch (IOException e) { // Log.e(TAG, "setBootanimation: 设置新开机动画");
Log.e(TAG, "setBootanimation: IOException: " + e.getMessage()); // } catch (IOException e) {
e.printStackTrace(); // Log.e(TAG, "setBootanimation: IOException: " + e.getMessage());
} // e.printStackTrace();
} // }
} // }
// }
private static final String BOOTANIMATION_PATH_G10J = "/storage/emulated/0/Download/bootanimation.zip"; 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)) { if (FileUtils.copy(newFile, file)) {
Toaster.show("设置开机动画成功");
Log.e(TAG, "setBootanimationG10J: set Bootanimation successful"); Log.e(TAG, "setBootanimationG10J: set Bootanimation successful");
} else { } else {
Log.e(TAG, "setBootanimationG10J: set Bootanimation failed"); Log.e(TAG, "setBootanimationG10J: set Bootanimation failed");
@@ -1850,11 +1865,11 @@ public class JGYUtils {
public void removeBootanimation() { public void removeBootanimation() {
File systemFile; File systemFile;
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform) { // if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform) {
systemFile = new File(BOOTANIMATION_PATH_G10J); systemFile = new File(BOOTANIMATION_PATH_G10J);
} else { // } else {
systemFile = new File(BOOTANIMATION_PATH); // systemFile = new File(BOOTANIMATION_PATH);
} // }
if (systemFile.exists()) { if (systemFile.exists()) {
if (systemFile.delete()) { if (systemFile.delete()) {
Log.e(TAG, "removeBootanimation: delete: " + "ture"); Log.e(TAG, "removeBootanimation: delete: " + "ture");
@@ -1862,10 +1877,10 @@ public class JGYUtils {
Log.e(TAG, "removeBootanimation: delete: " + "false"); Log.e(TAG, "removeBootanimation: delete: " + "false");
} }
} }
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform) { // if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform) {
Intent intent = new Intent("com.hra.setBootanimation"); Intent intent = new Intent("com.hra.setBootanimation");
mContext.sendBroadcast(intent); mContext.sendBroadcast(intent);
} // }
} }
public void copy(String oldPath, String newPath) { public void copy(String oldPath, String newPath) {
@@ -2324,6 +2339,9 @@ public class JGYUtils {
private String AoleyunOs = "com.aoleyun.os"; private String AoleyunOs = "com.aoleyun.os";
private String AoleyunOsClass = "com.aoleyun.os.Launcher"; 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) { public void setDefaultLauncher(Context context, String defPackageName, String defClassName) {
try { try {
if (!TextUtils.isEmpty(defPackageName) && !TextUtils.isEmpty(defClassName)) { if (!TextUtils.isEmpty(defPackageName) && !TextUtils.isEmpty(defClassName)) {
@@ -2384,11 +2402,18 @@ public class JGYUtils {
public void checkDefaultDesktop(String pkg) { public void checkDefaultDesktop(String pkg) {
String desktopPkg = getDefaultDesktop(); String desktopPkg = getDefaultDesktop();
// String desktopPkg = (String) SPUtils.get(mContext, "default_launcher", ""); // String desktopPkg = (String) SPUtils.get(mContext, "default_launcher", "");
Log.e(TAG, "checkDefaultDesktop: " + desktopPkg); 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)) { if (pkg.equalsIgnoreCase(desktopPkg)) {
setDefaultDesktop(pkg); setDefaultDesktop(pkg);
} }
} }
}
/** /**
* 获取默认的简易桌面,学习桌面或者默认应用桌面 * 获取默认的简易桌面,学习桌面或者默认应用桌面
@@ -2420,6 +2445,10 @@ public class JGYUtils {
setDefaultDesktop(PackageNames.YIXUEPAI_DESKTOP); setDefaultDesktop(PackageNames.YIXUEPAI_DESKTOP);
} }
public void setDop7DefaultDesktop() {
setDefaultDesktop("com.aoleyunos.dop7");
}
/** /**
* 设置默认桌面 * 设置默认桌面
* *
@@ -2454,6 +2483,8 @@ public class JGYUtils {
if (ApkUtils.isAvailable(mContext, AoleyunOs) if (ApkUtils.isAvailable(mContext, AoleyunOs)
|| "C2".equals(Build.MODEL)) { || "C2".equals(Build.MODEL)) {
setDefaultDesktop(AoleyunOs, AoleyunOsClass); setDefaultDesktop(AoleyunOs, AoleyunOsClass);
} else if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
setDefaultDesktop(AiUDuOs, AiUDuOsClass);
} else { } else {
setDefaultDesktop(Launcher3, Launcher3Class); setDefaultDesktop(Launcher3, Launcher3Class);
} }
@@ -2463,6 +2494,8 @@ public class JGYUtils {
if (ApkUtils.isAvailable(mContext, AoleyunOs) if (ApkUtils.isAvailable(mContext, AoleyunOs)
|| "C2".equals(Build.MODEL)) { || "C2".equals(Build.MODEL)) {
ApkUtils.openPackage(mContext, AoleyunOs, AoleyunOsClass); ApkUtils.openPackage(mContext, AoleyunOs, AoleyunOsClass);
} else if ("Aiud_A8_ag_1095".equals(Build.MODEL)) {
setDefaultDesktop(AiUDuOs, AiUDuOsClass);
} else { } else {
ApkUtils.openPackage(mContext, Launcher3, Launcher3Class); ApkUtils.openPackage(mContext, Launcher3, Launcher3Class);
} }

View File

@@ -1219,6 +1219,7 @@ public class Utils {
.create(); //启动下载} .create(); //启动下载}
} }
} else { } else {
Aria.download(context) Aria.download(context)
.load(url) //读取下载地址 .load(url) //读取下载地址
.setFilePath(JGYUtils.getInstance().getDownLoadPath() + fileName) .setFilePath(JGYUtils.getInstance().getDownLoadPath() + fileName)
@@ -1228,6 +1229,10 @@ public class Utils {
} }
} }
private void showToast() {
}
/** /**
* 屏幕截图 * 屏幕截图
* 适用于lanucher版 * 适用于lanucher版
@@ -1776,6 +1781,7 @@ public class Utils {
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform || JGYUtils.getInstance().checkAppPlatform() == JGYUtils.YXPD1Platform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G11Platform || JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G11Platform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform || JGYUtils.getInstance().checkAppPlatform() == JGYUtils.MT8768Platform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.AUDG104Platform
) { ) {
return Utils.getProperty("ro.build.display.id", "获取失败"); return Utils.getProperty("ro.build.display.id", "获取失败");
} else { } else {

View File

@@ -77,15 +77,22 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:scrollbars="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bannerLayout"> app:layout_constraintTop_toBottomOf="@+id/bannerLayout">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="@dimen/dp_472"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
@@ -249,6 +256,7 @@
android:layout_marginStart="@dimen/dp_8" android:layout_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8" android:layout_marginEnd="@dimen/dp_8"
android:background="@color/text_gray" android:background="@color/text_gray"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@@ -294,6 +302,7 @@
android:layout_marginStart="@dimen/dp_8" android:layout_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8" android:layout_marginEnd="@dimen/dp_8"
android:background="@color/text_gray" android:background="@color/text_gray"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@@ -685,5 +694,7 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

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_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8" android:layout_marginEnd="@dimen/dp_8"
android:background="@color/text_gray" android:background="@color/text_gray"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@@ -314,6 +315,7 @@
android:layout_marginStart="@dimen/dp_8" android:layout_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8" android:layout_marginEnd="@dimen/dp_8"
android:background="@color/text_gray" android:background="@color/text_gray"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="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,13 +45,17 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout"> app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_54" android:layout_height="@dimen/dp_54"
@@ -145,7 +149,8 @@
android:layout_marginStart="@dimen/dp_64" android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64" android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background"> android:background="@drawable/item_eye_background"
android:visibility="gone">
<TextView <TextView
android:id="@+id/textView3" android:id="@+id/textView3"
@@ -189,7 +194,8 @@
android:layout_marginStart="@dimen/dp_64" android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64" android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background"> android:background="@drawable/item_eye_background"
android:visibility="gone">
<TextView <TextView
android:id="@+id/textView4" android:id="@+id/textView4"
@@ -233,7 +239,8 @@
android:layout_marginStart="@dimen/dp_64" android:layout_marginStart="@dimen/dp_64"
android:layout_marginTop="@dimen/dp_8" android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_64" android:layout_marginEnd="@dimen/dp_64"
android:background="@drawable/item_eye_background"> android:background="@drawable/item_eye_background"
android:visibility="gone">
<TextView <TextView
android:id="@+id/textView5" android:id="@+id/textView5"
@@ -272,4 +279,6 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -18,6 +18,12 @@ buildscript {
} }
allprojects { allprojects {
configurations.all {
resolutionStrategy {
force 'androidx.constraintlayout:constraintlayout:2.0.4'
}
}
repositories { repositories {
google() google()
mavenCentral() mavenCentral()