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 { official {
flavorDimensions "default" flavorDimensions "default"
versionCode 73 versionCode 74
versionName "3.3.3" 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; mContext = context;
// an Intent broadcast. // an Intent broadcast.
String action = intent.getAction(); String action = intent.getAction();
ApkUtils.addShortcut(context); // ApkUtils.addShortcut(context);
JGYUtils.getInstance().cleanLauncherCache(); JGYUtils.getInstance().cleanLauncherCache();
ControlManager.getInstance().setDefaultApp(); ControlManager.getInstance().setDefaultApp();
Log.e(TAG, "onReceive: " + "action = " + action); 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_USER_PRESENT:
case Intent.ACTION_SCREEN_ON: case Intent.ACTION_SCREEN_ON:
mHandler.post(heartBeatRunnable);//开启心跳检测 mHandler.post(heartBeatRunnable);//开启心跳检测
sendMsg(1); // sendMsg(1);
break; break;
case Intent.ACTION_SCREEN_OFF: case Intent.ACTION_SCREEN_OFF:
case Intent.ACTION_SHUTDOWN: case Intent.ACTION_SHUTDOWN:
case Intent.ACTION_FACTORY_RESET: case Intent.ACTION_FACTORY_RESET:
case Intent.ACTION_MASTER_CLEAR: case Intent.ACTION_MASTER_CLEAR:
sendMsg(0); closeConnect();
// sendMsg(0);
break; break;
default: default:
break; break;
@@ -171,7 +172,8 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
* 初始化websocket连接 * 初始化websocket连接
*/ */
private void initSocketClient() { 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://echo.websocket.org");
// URI uri = URI.create("ws://123.207.136.134:9010/ajaxchattest"); // URI uri = URI.create("ws://123.207.136.134:9010/ajaxchattest");
client = new JWebSocketClient(uri) { client = new JWebSocketClient(uri) {
@@ -184,7 +186,8 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
public void onOpen(ServerHandshake handshakedata) { public void onOpen(ServerHandshake handshakedata) {
super.onOpen(handshakedata); super.onOpen(handshakedata);
Log.i("JWebSocketClientService", "websocket连接成功"); Log.i("JWebSocketClientService", "websocket连接成功");
sendMsg(1); // sendMsg(1);
sendMsg();
} }
@Override @Override
@@ -240,19 +243,21 @@ public class StepService extends Service implements NetworkUtils.OnNetworkStatus
public void sendMsg() { public void sendMsg() {
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("sn", Utils.getSerial()); jsonObject.addProperty("sn", Utils.getSerial());
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); // PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (!pm.isScreenOn()) { // if (!pm.isScreenOn()) {
jsonObject.addProperty("online", 0); // jsonObject.addProperty("online", 0);
//熄屏状态 // //熄屏状态
} else { // } else {
jsonObject.addProperty("online", 1); // jsonObject.addProperty("online", 1);
} // }
jsonObject.addProperty("type", "ping");
if (null != client) { if (null != client) {
Log.i("JWebSocketClientService", "发送的消息:" + jsonObject.toString()); Log.i("JWebSocketClientService", "发送的消息:" + jsonObject.toString());
client.send(jsonObject.toString()); client.send(jsonObject.toString());
} }
} }
@Deprecated
public void sendMsg(int state) { public void sendMsg(int state) {
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("sn", Utils.getSerial()); jsonObject.addProperty("sn", Utils.getSerial());

View File

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

View File

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

View File

@@ -155,6 +155,10 @@ public class JGYUtils {
this.add(growthspace); this.add(growthspace);
this.add(pandaabc); this.add(pandaabc);
this.add(qibenyi); 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"; 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 pandaabc = "com.pandaabc.stu";
public static final String qibenyi = "com.goer.fuying"; public static final String qibenyi = "com.goer.fuying";
public static final String word = "com.fuying.word"; public static final String word = "com.fuying.word";
public static final String xiyouread = "com.fuying.xiyouread";
public static Set<String> fuyingApp = new HashSet<String>() {{ public static Set<String> fuyingApp = new HashSet<String>() {{
this.add(fxyywgj); this.add(fxyywgj);