version:3.3.4

fix:
update:修复无法安装
This commit is contained in:
2025-05-24 09:45:07 +08:00
parent 3dcd25b5bf
commit 9e15d20837
7 changed files with 31 additions and 17 deletions

View File

@@ -74,8 +74,8 @@ android {
official {
flavorDimensions "default"
versionCode 73
versionName "3.3.3"
versionCode 74
versionName "3.3.4"
}
}

View File

@@ -1685,7 +1685,7 @@ public class NetInterfaceManager {
}
}
}
ApkUtils.addShortcut(mContext);
// ApkUtils.addShortcut(mContext);
}
//应用自启动

View File

@@ -39,7 +39,7 @@ public class APKinstallReceiver extends BroadcastReceiver {
mContext = context;
// an Intent broadcast.
String action = intent.getAction();
ApkUtils.addShortcut(context);
// ApkUtils.addShortcut(context);
JGYUtils.getInstance().cleanLauncherCache();
ControlManager.getInstance().setDefaultApp();
Log.e(TAG, "onReceive: " + "action = " + action);

View File

@@ -143,13 +143,14 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
case Intent.ACTION_USER_PRESENT:
case Intent.ACTION_SCREEN_ON:
mHandler.post(heartBeatRunnable);//开启心跳检测
sendMsg(1);
// sendMsg(1);
break;
case Intent.ACTION_SCREEN_OFF:
case Intent.ACTION_SHUTDOWN:
case Intent.ACTION_FACTORY_RESET:
case Intent.ACTION_MASTER_CLEAR:
sendMsg(0);
closeConnect();
// sendMsg(0);
break;
default:
break;
@@ -171,7 +172,8 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
* 初始化websocket连接
*/
private void initSocketClient() {
URI uri = URI.create(BuildConfig.WEBSOCKET_URL);
URI uri = URI.create("wss://as.fuyingy.com/wss/device?sn=" + Utils.getSerial());
// URI uri = URI.create(BuildConfig.WEBSOCKET_URL);
// URI uri = URI.create("ws://echo.websocket.org");
// URI uri = URI.create("ws://123.207.136.134:9010/ajaxchattest");
client = new JWebSocketClient(uri) {
@@ -184,7 +186,8 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
public void onOpen(ServerHandshake handshakedata) {
super.onOpen(handshakedata);
Log.i("JWebSocketClientService", "websocket连接成功");
sendMsg(1);
// sendMsg(1);
sendMsg();
}
@Override
@@ -240,19 +243,21 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
public void sendMsg() {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("sn", Utils.getSerial());
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (!pm.isScreenOn()) {
jsonObject.addProperty("online", 0);
//熄屏状态
} else {
jsonObject.addProperty("online", 1);
}
// PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
// if (!pm.isScreenOn()) {
// jsonObject.addProperty("online", 0);
// //熄屏状态
// } else {
// jsonObject.addProperty("online", 1);
// }
jsonObject.addProperty("type", "ping");
if (null != client) {
Log.i("JWebSocketClientService", "发送的消息:" + jsonObject.toString());
client.send(jsonObject.toString());
}
}
@Deprecated
public void sendMsg(int state) {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("sn", Utils.getSerial());

View File

@@ -95,7 +95,7 @@ public class MainService extends BaseRxService implements MainSContact.MainView,
Handler.getMain().postDelayed(new Runnable() {
@Override
public void run() {
·// NetInterfaceManager.getInstance().updateAdminInfo();
// NetInterfaceManager.getInstance().updateAdminInfo();
// if (JGYUtils.getInstance().isScreenOn()) {
Log.e(TAG, "getSnInfo1");
NetInterfaceManager.getInstance().getAppWhiteList(() -> {
@@ -206,6 +206,9 @@ public class MainService extends BaseRxService implements MainSContact.MainView,
Log.e(TAG, "onCreate: " + "upgrade successful");
try {
Settings.System.putString(getContentResolver(), CommonConfig.APP_SOURCE_WHITE_LIST, DEFAULT_SOURCE);
String aole_app_forbid = Settings.System.getString(getContentResolver(), CommonConfig.AOLE_ACTION_APP_FORBID);
ApkUtils.writeAppPackageList(MainService.this, aole_app_forbid);
new CacheUtils().cleanApplicationUserData(this, "com.aoleyun.os");
File file = new File(JGYUtils.getInstance().getDownLoadPath());
Log.e(TAG, "versionIsUpdate: " + file.getAbsolutePath());
@@ -215,6 +218,7 @@ public class MainService extends BaseRxService implements MainSContact.MainView,
Log.e(TAG, "versionIsUpdate: delete file " + path + " = " + new File(file.getAbsolutePath() + File.separator + path).delete());
}
}
} catch (Exception e) {
Log.e(TAG, "onReceive: " + e.getMessage());
e.printStackTrace();

View File

@@ -856,7 +856,7 @@ public class ApkUtils {
@SuppressLint("NewApi")
public static void writeAppPackageList(Context context, String result) {
Log.e(TAG, "writeAppPackageList: " + result);
addShortcut(context);//开机之后添加图标到桌面
// addShortcut(context);//开机之后添加图标到桌面
HashSet<String> factoryAppList = new HashSet<>();
factoryAppList.addAll(JGYUtils.getInstance().getOwnApp());
factoryAppList.addAll(JGYUtils.getInstance().getFXYApp());

View File

@@ -155,6 +155,10 @@ public class JGYUtils {
this.add(growthspace);
this.add(pandaabc);
this.add(qibenyi);
this.add(word);
this.add(xiyouread);
this.add("com.fuying.middle.english");
this.add("com.qijuqiyi");
}};
public static final String fxyywgj = "com.fuying.chinese";
@@ -168,6 +172,7 @@ public class JGYUtils {
public static final String pandaabc = "com.pandaabc.stu";
public static final String qibenyi = "com.goer.fuying";
public static final String word = "com.fuying.word";
public static final String xiyouread = "com.fuying.xiyouread";
public static Set<String> fuyingApp = new HashSet<String>() {{
this.add(fxyywgj);