version:1.5.1216
bugfixes: add:优化默认管控,修复高木id管控
This commit is contained in:
@@ -29,8 +29,8 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.aoleyun.sn"
|
||||
versionCode 197
|
||||
versionName "1.5.1018"
|
||||
versionCode 200
|
||||
versionName "1.5.1216"
|
||||
|
||||
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
||||
minSdkVersion 24
|
||||
@@ -67,6 +67,12 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path file('CMakeLists.txt')
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
//测试版的图标
|
||||
// beta.res.srcDirs = ['src/beta/res']
|
||||
@@ -648,11 +654,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path file('CMakeLists.txt')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -249,6 +249,8 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
mViewModel.setBindInfoPanel();
|
||||
mViewModel.getAppSettings();
|
||||
mViewModel.getPushTags();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void setObserve() {
|
||||
@@ -374,6 +376,7 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
public void onServiceConnected(ComponentName name, IBinder service) {
|
||||
Log.e(TAG, "onServiceConnected: ");
|
||||
mMainBinder = (MainService.MainBinder) service;
|
||||
mMainBinder.getService().mPresenter.getLockedState();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2017,15 +2017,26 @@ public class NetInterfaceManager {
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<List<AppID>> baseResponse) {
|
||||
Log.e("getAppIDControl", "onNext: " + baseResponse);
|
||||
Settings.System.putString(mContext.getContentResolver(), CommonConfig.APP_VIEW_CLICK_DISABLED, "com.ttstd.utils:12345");
|
||||
// TODO: 2025/11/21 高木g104不需要id管控
|
||||
if ("G104".equals(Build.MODEL)) {
|
||||
try {
|
||||
Settings.System.putString(mContext.getContentResolver(), CommonConfig.APP_VIEW_CLICK_DISABLED, null);
|
||||
CmdUtil.Result result = CmdUtil.execute(" settings delete system app_view_click_disabled");
|
||||
Log.e(TAG, "getAppIDControl: " + result);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
Settings.System.putString(mContext.getContentResolver(), CommonConfig.APP_VIEW_CLICK_DISABLED, "com.arivoc.wordhd:2131624676,2131624689;com.ttstd.utils:12345");
|
||||
}
|
||||
if (baseResponse.code == OK) {
|
||||
List<AppID> appIDList = baseResponse.data;
|
||||
cacheHelper.put(UrlAddress.GET_APPID, GsonUtils.toJSONString(appIDList));
|
||||
|
||||
// JgyUtils.getInstance().writeDeselectIDtoSystem(appIDList);
|
||||
JgyUtils.getInstance().writeDeselectIDtoSystem(appIDList);
|
||||
} else {
|
||||
cacheHelper.put(UrlAddress.GET_APPID, "");
|
||||
// JgyUtils.getInstance().writeDeselectIDtoSystem(null);
|
||||
JgyUtils.getInstance().writeDeselectIDtoSystem(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
TimeTask task = new TimeTask();
|
||||
task.execute("ntp.aliyun.com");
|
||||
|
||||
boolean reboot = mMMKV.decodeBool(CommonConfig.DEVICES_REBOOT, false);
|
||||
boolean reboot = mMMKV.decodeBool(CommonConfig.DEVICES_REBOOT, true);
|
||||
if (reboot) {
|
||||
mPresenter.getLockedState();
|
||||
mMMKV.encode(CommonConfig.DEVICES_REBOOT, false);
|
||||
@@ -655,18 +655,15 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
}
|
||||
|
||||
private static final String CHANNEL_ID = "CHANNEL_ID";
|
||||
private static final String channel_name = "系统通知";
|
||||
private static final String channel_description = "我的设备系统通知";
|
||||
private static final String CHANNEL_NAME = "系统通知";
|
||||
private static final String CHANNEL_DESCRIPTION = "我的设备系统通知";
|
||||
|
||||
private void createNotificationChannel() {
|
||||
// Create the NotificationChannel, but only on API 26+ because
|
||||
// the NotificationChannel class is new and not in the support library
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
CharSequence name = channel_name;
|
||||
String description = channel_description;
|
||||
int importance = NotificationManager.IMPORTANCE_DEFAULT;
|
||||
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);
|
||||
channel.setDescription(description);
|
||||
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);
|
||||
channel.setDescription(CHANNEL_DESCRIPTION);
|
||||
// Register the channel with the system; you can't change the importance
|
||||
// or other notification behaviors after this
|
||||
NotificationManager notificationManager = getSystemService(NotificationManager.class);
|
||||
@@ -678,7 +675,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
private int NotificationID = 1;
|
||||
|
||||
private void sendSimpleNotification() {
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, "CHANNEL_ID")
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
|
||||
.setSmallIcon(R.mipmap.ic_launcher)
|
||||
.setContentTitle("设备管控中")
|
||||
// .setContentText("测试内容")
|
||||
|
||||
@@ -836,6 +836,10 @@ public class JgyUtils {
|
||||
this.add(BuildConfig.APPLICATION_ID);
|
||||
this.add("com.aoleyun.appstore");
|
||||
this.add("com.aoleyun.camera");
|
||||
this.add("com.aoleyun.browser");
|
||||
this.add("com.aoleyun.info");
|
||||
this.add("com.aoleyun.os");
|
||||
|
||||
this.add("com.aoleyun.calculator");
|
||||
this.add("com.aoleyun.gallery3d");
|
||||
this.addAll(ApkUtils.mJxwApp);
|
||||
@@ -1011,6 +1015,10 @@ public class JgyUtils {
|
||||
}
|
||||
|
||||
public void writeDeselectIDtoSystem(List<AppID> appIDList) {
|
||||
if (!"Ebox201".equals(Build.MODEL)&&!"Ebox201W".equals(Build.MODEL)){
|
||||
Log.e(TAG, "writeDeselectIDtoSystem: not match Ebox201 or Ebox201W" );
|
||||
return;
|
||||
}
|
||||
if (appIDList == null || appIDList.isEmpty()) {
|
||||
try {
|
||||
Settings.System.putString(crv, CommonConfig.APP_VIEW_CLICK_DISABLED, null);
|
||||
|
||||
@@ -83,7 +83,7 @@ public class SysSettingUtils {
|
||||
Toaster.debugShow("关闭所有功能");
|
||||
Log.e("setDisableSetting", "Close all settings: ");
|
||||
setPhoneList(context, 1);
|
||||
setUsbStatus(context, 1);
|
||||
setUsbStatus(context, 0);
|
||||
if (JgyUtils.getInstance().getAppPlatform().equals(JgyUtils.YXPD1TAG)
|
||||
|| JgyUtils.getInstance().getAppPlatform().equals(JgyUtils.C2Tag)
|
||||
|| JgyUtils.getInstance().getAppPlatform().equals(JgyUtils.ZR6016Tag)
|
||||
@@ -95,7 +95,7 @@ public class SysSettingUtils {
|
||||
setHotspot(context, 1);
|
||||
setBar(context, 1);
|
||||
setCamera(context, 1);
|
||||
setTF(context, 1);
|
||||
setTF(context, 0);
|
||||
setIcon(context, 0);
|
||||
setWallpaper(context, 0);
|
||||
setCanReset(context, 0);
|
||||
|
||||
Reference in New Issue
Block a user