Browse Source

fix: ci

master
高志龙 1 week ago
parent
commit
ce2872452c
  1. 2
      .idea/compiler.xml
  2. 10
      .idea/deploymentTargetSelector.xml
  3. 7
      .idea/gradle.xml
  4. 10
      .idea/migrations.xml
  5. 2
      .idea/misc.xml
  6. 1
      .idea/vcs.xml
  7. 2
      app/build.gradle
  8. 17
      app/src/main/java/qianmu/container/handler/ContainerHandler.java
  9. 4
      app/src/main/java/qianmu/container/mqtt/MQTTService.java
  10. 2
      app/src/main/java/qianmu/container/service/ContainerService.java
  11. 2
      app/src/main/res/layout/activity_update_file.xml

2
.idea/compiler.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="CompilerConfiguration"> <component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
<bytecodeTargetLevel target="11" />
</component> </component>
</project> </project>

10
.idea/deploymentTargetSelector.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>

7
.idea/gradle.xml

@ -4,10 +4,8 @@
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />
@ -15,8 +13,7 @@
<option value="$PROJECT_DIR$/playerview" /> <option value="$PROJECT_DIR$/playerview" />
</set> </set>
</option> </option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
</component> </component>

10
.idea/migrations.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

2
.idea/misc.xml

@ -5,7 +5,7 @@
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" /> <configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
</configurations> </configurations>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

1
.idea/vcs.xml

@ -3,6 +3,5 @@
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="" vcs="svn" /> <mapping directory="" vcs="svn" />
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/.claude/worktrees/goofy-neumann-4695b0" vcs="Git" />
</component> </component>
</project> </project>

2
app/build.gradle

@ -12,7 +12,7 @@ android {
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 30 targetSdkVersion 30
versionCode 6 versionCode 6
versionName "V2.0.8.27"
versionName "V2.0.8.28"
// 2.0.8.2 // 2.0.8.2
// 2.0.8.3 mac修改 // 2.0.8.3 mac修改
// V2.0.8.5 // V2.0.8.5

17
app/src/main/java/qianmu/container/handler/ContainerHandler.java

@ -75,7 +75,7 @@ public class ContainerHandler extends Handler {
public static final int INIT_NOVA = 9; //获取时间戳 public static final int INIT_NOVA = 9; //获取时间戳
public static final int INIT_JXB = 10; //设置机械臂 public static final int INIT_JXB = 10; //设置机械臂
public static final int INIT_JXB2 = 11; //设置机械臂 public static final int INIT_JXB2 = 11; //设置机械臂
public long goNavTime =0;
public int goMemoryTime =0;
private WeakReference<ContainerService> weakReference; private WeakReference<ContainerService> weakReference;
@ -143,7 +143,11 @@ public class ContainerHandler extends Handler {
Constant.networkState = false; Constant.networkState = false;
} }
} ); } );
getMemory();
if(goMemoryTime>5){
goMemoryTime = 0;
getMemory();
}
goMemoryTime++;
// watchDog(); // watchDog();
getCoreServiceState(); getCoreServiceState();
// DeviceData.getPrimaryMachine(null, this::updateClientStateByIP); // DeviceData.getPrimaryMachine(null, this::updateClientStateByIP);
@ -215,15 +219,6 @@ public class ContainerHandler extends Handler {
// LoggerUtil.e("ContainerHandler","cpu使用率:"+cpuUsage+"%"); // LoggerUtil.e("ContainerHandler","cpu使用率:"+cpuUsage+"%");
// } // }
// if(totalPss/1024>1400 && DeviceData.getDeviceInfo(DeviceData.HINT_DEVICE_TYPE).equals("导视") && !Constant.whoActivity.equals(Constant.ROUTE_WEB_VIEW)){
// //内存超过了1G会出现卡顿
// long currentTime = System.currentTimeMillis();
// if(currentTime-goNavTime>360000){
// LoggerUtil.e("getMemory()","内存超过1000 进入导视释放内存");
// ARouter.getInstance().build(Constant.ROUTE_WEB_VIEW).withBoolean(Constant.KEY_LOAD_H5_URL, true).navigation();
// goNavTime = currentTime;
// }
// }
if(totalPss/1024>1200){ if(totalPss/1024>1200){
//内存超过了1G会出现卡顿,内存溢出问题。重启设备。 //内存超过了1G会出现卡顿,内存溢出问题。重启设备。
LoggerUtil.e("getMemory()","内存溢出重启软件"); LoggerUtil.e("getMemory()","内存溢出重启软件");

4
app/src/main/java/qianmu/container/mqtt/MQTTService.java

@ -278,6 +278,10 @@ public class MQTTService extends Service {
public void onSuccess(IMqttToken arg0) { public void onSuccess(IMqttToken arg0) {
LoggerUtil.e(TAG, "连接成功 "); LoggerUtil.e(TAG, "连接成功 ");
isConnected = true; isConnected = true;
try {
// 先取消旧订阅(防止重复累积)
client.unsubscribe(myTopic);
} catch (MqttException e) { /* ignore */ }
try { try {
// 订阅myTopic话题 // 订阅myTopic话题
client.subscribe(myTopic,2); client.subscribe(myTopic,2);

2
app/src/main/java/qianmu/container/service/ContainerService.java

@ -202,7 +202,7 @@ public class ContainerService extends Service {
|| "com.google.android.packageinstaller".equals(processName) || "com.google.android.packageinstaller".equals(processName)
|| "com.frogshealth.qianmu".equals(processName) || "com.frogshealth.qianmu".equals(processName)
|| "com.tencent.wmpf".equals(processName)) { || "com.tencent.wmpf".equals(processName)) {
if (info.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND) {
if (info.importance <= ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE) {
return; return;
} }
} }

2
app/src/main/res/layout/activity_update_file.xml

@ -12,7 +12,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimens_160"
android:layout_marginTop="@dimen/dimens_60"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">

Loading…
Cancel
Save