Browse Source

提交人:jtm
提交内容:bug fixed

江天明 1 year ago
parent
commit
525594cabf

+ 1 - 0
BusinessAuth/src/main/res/layout/activity_member_auth.xml

@@ -4,6 +4,7 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/white"
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <ImageView

+ 1 - 1
BusinessCommon/src/main/res/values-fr/strings.xml

@@ -276,5 +276,5 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="dian_zi_cheng_tong_xin_yi_chan">Attention : la balance a été endommagée. </string>
     <string name="ntc_yi_chan">Attention : Le NTC ne fonctionne pas. Veuillez contacter le service technique.</string>
     <string name="mei_fang_guo_yi_chan">Attention: Bol non détecté. Veuillez replacer le bol sur la base.</string>
-
+    <string name="dev_error">Atención: Le robot ne fonctionne pas correctement. Effectuez un contrôle.</string>
 </resources>

+ 1 - 0
BusinessCommon/src/main/res/values/strings.xml

@@ -287,6 +287,7 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="please_fill_in_the_password">Please fill in the password</string>
     <string name="password_uncorrect">Password uncorrect</string>
     <string name="password">Password</string>
+    <string name="dev_error">Attention: The device is abnormal, please check the device</string>
 
 
 </resources>

+ 1 - 0
BusinessSetting/src/main/res/layout/activity_wifi_list.xml

@@ -2,6 +2,7 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
+    android:background="@color/bg_color"
     android:layout_height="match_parent">
 
 

+ 2 - 2
app/src/main/AndroidManifest.xml

@@ -42,7 +42,7 @@
         android:requestLegacyExternalStorage="true"
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
-        android:theme="@style/Theme.FoodCooking"
+        android:theme="@style/SplashNightTheme"
         android:largeHeap="true"
         tools:targetApi="31">
         <activity
@@ -52,7 +52,7 @@
             android:theme="@style/SplashNightTheme">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
-<!--                <category android:name="android.intent.category.HOME" />-->
+                <category android:name="android.intent.category.HOME" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>

+ 16 - 0
app/src/main/java/com/develop/foodcooking/FoodCookingApp.kt

@@ -29,7 +29,9 @@ import com.develop.common.utils.compat.StartViewCompat
 import com.drake.net.convert.NetConverter
 import com.drake.net.interceptor.RequestInterceptor
 import com.drake.net.interfaces.NetErrorHandler
+import com.drake.net.time.Interval
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevStatus
+import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevPromptEvent
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevStatusEvent
 import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
 import org.alee.component.skin.compat.ConstraintLayoutCompat
@@ -38,9 +40,11 @@ import org.alee.component.skin.service.Config
 import org.alee.component.skin.service.IOptionFactory
 import org.alee.component.skin.service.IThemeSkinOption
 import org.alee.component.skin.service.ThemeSkinService
+import org.greenrobot.eventbus.EventBus
 import org.greenrobot.eventbus.Subscribe
 import java.io.File
 import java.lang.reflect.Method
+import java.util.concurrent.TimeUnit
 
 
 class FoodCookingApp : BaseApp() {
@@ -59,6 +63,7 @@ class FoodCookingApp : BaseApp() {
     var mWakeLock: PowerManager.WakeLock? = null
     private lateinit var pm: PowerManager
     var minute = 0
+    private lateinit var heartBeatInterval :Interval
     override fun onCreate() {
         hookWebView()
         super.onCreate()
@@ -97,6 +102,16 @@ class FoodCookingApp : BaseApp() {
         val uri: Uri = Settings.System
             .getUriFor(Settings.System.SCREEN_OFF_TIMEOUT)
         contentResolver.notifyChange(uri, null)
+        heartBeatInterval = Interval(1,1,TimeUnit.SECONDS,5).finish {
+            //设备不通讯异常
+           EventBus.getDefault().post(
+                DevPromptEvent.builder()
+                    .showCancelBtn(false)
+                    .msg("dev_error")
+                    .focus(true)
+                    .build()
+            )
+        }.start()
     }
 
 
@@ -171,6 +186,7 @@ class FoodCookingApp : BaseApp() {
     @Subscribe
     @Synchronized
     fun globalCoverEvent(event: DevStatusEvent) {
+        heartBeatInterval.stop()
         val devInfo = event.devInfo;
         val pm = getSystemService(POWER_SERVICE) as PowerManager
         if (devInfo.status == DevStatus.RUNNING.toInt() || devInfo.isWeightStatus) {