Browse Source

032改动

zhangshenjie 1 year ago
parent
commit
b8e9543e02
25 changed files with 416 additions and 61 deletions
  1. 189 0
      BusinessAirFryer/src/main/assets/config_032.json
  2. 0 10
      BusinessAirFryer/src/main/assets/tuya_config.json
  3. 4 0
      BusinessAuth/src/main/java/com/develop/auth/ui/MemberLoginFragment.kt
  4. 1 1
      BusinessAuth/src/main/res/layout/activity_member_auth.xml
  5. 4 4
      BusinessAuth/src/main/res/layout/fragment_member_register.xml
  6. 4 0
      BusinessCommon/src/main/res/layout/dialog_loading.xml
  7. 8 2
      BusinessCommon/src/main/res/layout/dialog_share_qr_code.xml
  8. 33 0
      BusinessMain/src/main/java/com/develop/main/ui/HomeActivity.kt
  9. 38 2
      BusinessMain/src/main/java/com/develop/main/ui/RecipesFragment.kt
  10. 1 1
      BusinessMain/src/main/java/com/develop/main/viewmodel/HomeViewModel.kt
  11. 49 1
      BusinessSetting/src/main/java/com/develop/setting/ui/LanguageActivity.kt
  12. 5 0
      BusinessSetting/src/main/java/com/develop/setting/ui/RestoreActivity.kt
  13. 2 1
      BusinessSetting/src/main/res/layout/activity_privace_policy.xml
  14. 17 1
      BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt
  15. 1 0
      BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepActivity.kt
  16. 9 2
      BusinessStep/src/main/res/layout/activity_cook_detail.xml
  17. 1 1
      app/build.gradle
  18. 4 4
      app/src/main/assets/help/CZ/help-white-a.html
  19. 3 3
      app/src/main/assets/help/DE/help-white-a.html
  20. 4 4
      app/src/main/assets/help/ES/help-white-a.html
  21. 3 3
      app/src/main/assets/help/FR/help-white-a.html
  22. 3 3
      app/src/main/assets/help/IT/help-white-a.html
  23. 4 4
      app/src/main/assets/help/PT/help-white-a.html
  24. 28 13
      libBase/src/main/java/com/develop/base/ext/GlobaExt.kt
  25. 1 1
      libBase/src/main/java/com/develop/base/mvvm/FullScreenTransparentDialog.kt

+ 189 - 0
BusinessAirFryer/src/main/assets/config_032.json

@@ -0,0 +1,189 @@
+{
+  "baseQrUrl": "https://icook.cofarcn.com/h5/index.html",
+  "workModes": [
+    {
+      "type": "ADAPTED_COOKING",
+      "name": "adapted_cooking",
+      "bg": "ic_mode_diy",
+      "icon": "ic_grid_adapted_cooking",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "COOK_EGGS",
+      "name": "cook_eggs",
+      "bg": "cm_icon_cook_eggs_bg",
+      "icon": "cm_icon_cook_eggs",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "WIGHT",
+      "name": "wight",
+      "bg": "ic_mode_weight",
+      "icon": "ic_grid_weight",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "BOIL_WATER",
+      "name": "boil_water",
+      "bg": "ic_mode_boil_water",
+      "icon": "ic_grid_boil_water",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "CHOP",
+      "name": "chop",
+      "bg": "ic_mode_chop",
+      "icon": "ic_grid_chop",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "SLOW_COOK",
+      "name": "slow_cook",
+      "bg": "ic_mode_slow_cook",
+      "icon": "ic_grid_slow_cook",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "KNEAD_TOUGH",
+      "name": "knead_dough",
+      "bg": "ic_mode_knead_dough",
+      "icon": "ic_grid_knead_dough",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "STEAM",
+      "name": "steam",
+      "bg": "ic_mode_steam",
+      "icon": "ic_grid_steam",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "FOOD_PROCESSOR",
+      "name": "food_processor",
+      "bg": "ic_mode_food_processor",
+      "icon": "ic_grid_food_processor",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "TURBO",
+      "name": "turbo",
+      "bg": "ic_mode_turbo",
+      "icon": "ic_grid_turbo",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "AF_DIY",
+      "name": "af_diy",
+      "bg": "af_diy_bg",
+      "icon": "af_diy",
+      "devMode": "AIR_FRYER",
+      "listShow": false
+    },
+    {
+      "type": "AF_AIR_FRYER",
+      "name": "af_air_fryer",
+       "bg": "af_air_fryer_bg",
+      "icon": "af_air_fryer",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_BAKE",
+      "name": "af_bake",
+      "bg": "af_bake_bg",
+      "icon": "af_bake",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_DRUMSTICKS",
+      "name": "af_drumsticks",
+      "bg": "af_drumsticks_bg",
+      "icon": "af_drumsticks",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_EGG_TART",
+      "name": "af_egg_tart",
+      "bg": "af_egg_tart_bg",
+      "icon": "af_egg_tart",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_PIZZA",
+      "name": "af_pizza",
+      "bg": "af_pizza_bg",
+      "icon": "af_pizza",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_DEHYDRATE",
+      "name": "af_dehydrate",
+      "bg": "af_dehydrate_bg",
+      "icon": "af_dehydrate",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_REHEAT",
+      "name": "af_reheat",
+      "bg": "af_reheat_bg",
+      "icon": "af_reheat",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_CHICKEN_WING",
+      "name": "af_chicken_wing",
+      "bg": "af_chicken_wing_bg",
+      "icon": "af_chicken_wing",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_STEAK",
+      "name": "af_steak",
+      "bg": "af_steak_bg",
+      "icon": "af_steak",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_SEA_FOOD",
+      "name": "af_sea_food",
+      "bg": "af_sea_food_bg",
+      "icon": "af_sea_food",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_VEGETABLE",
+      "name": "af_vegetable",
+      "bg": "af_vegetable_bg",
+      "icon": "af_vegetable",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_MUTTON_CHOP",
+      "name": "af_mutton_chop",
+      "bg": "af_mutton_chop_bg",
+      "icon": "af_mutton_chop",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    }
+  ]
+}

+ 0 - 10
BusinessAirFryer/src/main/assets/tuya_config.json

@@ -285,16 +285,6 @@
       "uid": "uuid5c221a4957ad2f69",
       "ak": "ysx7mZoKndu12lNAqABH8AP31yW3Iv8v"
     },
-    "032D21060020123010190001": {
-      "pid": "ua4cifaz2yysnhvx",
-      "uid": "uuida2fe2befab0fd953",
-      "ak": "AtiUKJP1EqEWBzH5xfHKjJ8HnP2kyD0X"
-    },
-    "032D21060020123010190002": {
-      "pid": "ua4cifaz2yysnhvx",
-      "uid": "uuid51d88782ae882cd7",
-      "ak": "vLcW2HLzZUssv6m2TXnCBsYeCFeTHSud"
-    },
     "000A20020020123010190002": {
       "pid": "wy8ogbhchnzkmrup",
       "uid": "uuid7143531b44de5bb0",

+ 4 - 0
BusinessAuth/src/main/java/com/develop/auth/ui/MemberLoginFragment.kt

@@ -40,6 +40,10 @@ class MemberLoginFragment : CommonBVMFragment<FragmentMemberLoginBinding, Member
                 binding.etEmailId.text.toString(), binding.etPassword.text.toString()
             )
         }
+        //2024.01.04 032客户需要删除注册功能
+        if (getSN().startsWith("032")){
+            binding.tvRegister.visibility = View.INVISIBLE
+        }
         binding.tvRegister.setOnClickListener {
             viewModel.fragmentChangeLiveData.postValue(FragmentTag.MEMBER_REGISTER)
         }

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

@@ -35,7 +35,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="end|top"
-        android:layout_margin="@dimen/convert_20px"
+        android:layout_margin="@dimen/convert_15px"
         android:background="@drawable/bg_skip_text"
         android:text="@string/home_auth"
         android:paddingHorizontal="@dimen/convert_62px"

+ 4 - 4
BusinessAuth/src/main/res/layout/fragment_member_register.xml

@@ -16,7 +16,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginStart="@dimen/convert_80px"
-            android:layout_marginTop="@dimen/convert_104px"
+            android:layout_marginTop="@dimen/convert_108px"
             android:text="@string/sign_up_it_s_free"
             android:textColor="@color/profile_title"
             android:textSize="@dimen/convert_30px" />
@@ -27,7 +27,7 @@
             android:layout_height="@dimen/convert_88px"
             android:layout_gravity="center_horizontal"
             android:layout_marginHorizontal="@dimen/convert_40px"
-            android:layout_marginTop="@dimen/convert_24px"
+            android:layout_marginTop="@dimen/convert_20px"
             android:background="@drawable/forgot_input_stroke"
             android:hint="@string/enter_email_id"
             android:paddingHorizontal="@dimen/convert_40px"
@@ -40,7 +40,7 @@
             android:layout_height="@dimen/convert_88px"
             android:layout_gravity="center_horizontal"
             android:layout_marginHorizontal="@dimen/convert_40px"
-            android:layout_marginTop="@dimen/convert_24px"
+            android:layout_marginTop="@dimen/convert_20px"
             android:background="@drawable/forgot_input_stroke"
             android:digits="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
             android:hint="@string/enter_password"
@@ -55,7 +55,7 @@
             android:layout_height="@dimen/convert_88px"
             android:layout_gravity="center_horizontal"
             android:layout_marginHorizontal="@dimen/convert_40px"
-            android:layout_marginTop="@dimen/convert_24px"
+            android:layout_marginTop="@dimen/convert_20px"
             android:background="@drawable/forgot_input_stroke"
             android:digits="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
             android:hint="@string/enter_password_again"

+ 4 - 0
BusinessCommon/src/main/res/layout/dialog_loading.xml

@@ -27,6 +27,10 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="Loading"
+            android:layout_gravity="center"
+            android:gravity="center"
+            android:layout_marginLeft="@dimen/convert_5px"
+            android:layout_marginRight="@dimen/convert_5px"
             android:textColor="@color/black"
             android:textSize="@dimen/convert_42px"
             android:layout_marginTop="@dimen/convert_20px"/>

+ 8 - 2
BusinessCommon/src/main/res/layout/dialog_share_qr_code.xml

@@ -12,8 +12,8 @@
 
         <RelativeLayout
             android:id="@+id/cl_layer"
-            android:layout_width="@dimen/convert_580px"
-            android:layout_height="@dimen/convert_500px"
+            android:layout_width="@dimen/convert_600px"
+            android:layout_height="wrap_content"
             android:background="@drawable/bg_icon_page"
             android:gravity="center_horizontal"
             android:orientation="vertical"
@@ -26,6 +26,9 @@
                 android:layout_centerHorizontal="true"
                 android:layout_marginTop="@dimen/convert_49px"
                 android:includeFontPadding="false"
+                android:gravity="center"
+                android:layout_marginLeft="@dimen/convert_10px"
+                android:layout_marginRight="@dimen/convert_10px"
                 android:text="@string/share_with_more_people"
                 android:textColor="#F30101"
                 android:textSize="@dimen/convert_45px" />
@@ -38,6 +41,9 @@
                 android:layout_centerHorizontal="true"
                 android:layout_marginTop="@dimen/convert_48px"
                 android:includeFontPadding="false"
+                android:gravity="center"
+                android:layout_marginLeft="@dimen/convert_10px"
+                android:layout_marginRight="@dimen/convert_10px"
                 android:text="@string/scan_qr_code_with_camera"
                 android:textColor="#6B6B6B"
                 android:textSize="@dimen/convert_36px" />

+ 33 - 0
BusinessMain/src/main/java/com/develop/main/ui/HomeActivity.kt

@@ -2,7 +2,9 @@ package com.develop.main.ui
 
 import android.content.Intent
 import android.os.Bundle
+import android.util.Log
 import android.view.Gravity
+import android.view.KeyEvent
 import android.view.LayoutInflater
 import android.view.View
 import android.widget.LinearLayout
@@ -49,6 +51,7 @@ class HomeActivity : CommonBVMActivity<ActivityHomeBinding, HomeViewModel>() {
     private var newsLayout: NewsLayout? = null
 
     private var newsList = mutableListOf<NewsModel>()
+    var lastKeyTime = 0L
 
     private val newsPopupWindow by lazy {
         CommonPopupWindow.ViewBuilder<NewsLayout>().width(dp750)
@@ -323,6 +326,36 @@ class HomeActivity : CommonBVMActivity<ActivityHomeBinding, HomeViewModel>() {
 
     }
 
+
+
+//    override fun dispatchKeyEvent(event: KeyEvent): Boolean {
+//        var spend = (System.currentTimeMillis() - lastKeyTime);
+//        if (spend < 10) {
+//            return super.dispatchKeyEvent(event);
+//        }
+//        lastKeyTime = System.currentTimeMillis();
+//
+//
+//        if (event.action != KeyEvent.ACTION_UP) {
+//
+//            when (event.keyCode) {
+//                //旋转+
+//                TURN_UP_KEY_CODE -> {
+//                    Log.d("TAG aaaaaa", "TURN_UP_KEY_CODE : ${event.keyCode}")
+//                    viewModel.positionRecycle.postValue("TURN_UP_KEY_CODE")
+//                }
+//                //旋转-
+//                TURN_DOWN_KEY_CODE -> {
+//                    Log.d("TAG aaaaaa", "TURN_DOWN_KEY_CODE : ${event.keyCode}")
+//                    viewModel.positionRecycle.postValue("TURN_DOWN_KEY_CODE")
+//                }
+//            }
+//        }
+//        return super.dispatchKeyEvent(event)
+//    }
+
+
+
     class HomeBackClickEvent(showOnline:Boolean)
     override fun onDestroy() {
         super.onDestroy()

+ 38 - 2
BusinessMain/src/main/java/com/develop/main/ui/RecipesFragment.kt

@@ -75,6 +75,10 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
     private var letterStr = "A"
     private var letterPosition  : Int = -1
 
+
+    private var recyclePosition = 0
+    private var recycleBottom = false;
+
     private val filterPopupWindow by lazy {
         CommonPopupWindow.ViewBuilder<FilterSortViewLayout>().width(dp417).height(dp549)
             .outsideTouchable(true).focusable(true).alpha(0.5f).clippingEnabled(false)
@@ -317,15 +321,23 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
             addOnScrollListener(object : RecyclerView.OnScrollListener() {
                 override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
                     super.onScrollStateChanged(recyclerView, newState)
+                    var lastPosition = -1
                     when (newState) {
-
                         RecyclerView.SCROLL_STATE_IDLE -> {
                             if (!hostActivity.isDestroyed) {
                                 Glide.with(hostActivity).resumeRequests()
                             }
+                            val layoutManager = recyclerView.layoutManager as LinearLayoutManager?
+                            // 获取当前显示的第一个Item的位置
+                            val firstVisiblePosition = layoutManager!!.findFirstVisibleItemPosition()
+                            recyclePosition = firstVisiblePosition+1
+                            //时判断界面显示的最后item的position是否等于itemCount总数-1也就是最后一个item的position
+                            //如果相等则说明已经滑动到最后了
+                            recycleBottom = lastPosition == recyclerView.layoutManager?.itemCount!!-1
+                            Log.i("TAG ZM", "positionRecycle: "+recyclerView.layoutManager?.itemCount)
 
-                        }
 
+                        }
                         RecyclerView.SCROLL_STATE_DRAGGING, RecyclerView.SCROLL_STATE_SETTLING -> {
                             if (!hostActivity.isDestroyed) {
                                 Glide.with(hostActivity).pauseRequests()
@@ -383,6 +395,30 @@ class RecipesFragment : CommonBVMFragment<FragmentCommeListBinding, HomeViewMode
             }
         }
 
+        /**
+         * 旋转物理键
+         */
+        viewModel.positionRecycle.observe(viewLifecycleOwner){
+
+            if (it.equals("TURN_UP_KEY_CODE")){
+                if (recycleBottom){
+                    binding.page.autoRefresh()
+                    recyclePosition = recyclePosition
+                }else{
+                    recyclePosition++
+                }
+            }else if (it.equals("TURN_DOWN_KEY_CODE")){
+                if (recyclePosition==0){
+                    recyclePosition = 0
+                }else{
+                    recyclePosition--;
+                }
+            }
+            Log.e("TAG recyclePosition","recyclePosition :$recyclePosition")
+            binding.rv.smoothScrollToPosition(recyclePosition)
+        }
+
+
     }
 
 

+ 1 - 1
BusinessMain/src/main/java/com/develop/main/viewmodel/HomeViewModel.kt

@@ -25,7 +25,7 @@ import kotlinx.coroutines.Dispatchers
 import java.lang.reflect.Type
 
 class HomeViewModel : BaseViewModel() {
-
+    var positionRecycle = MutableLiveData<String>()
     val netFoodLiveData = MutableLiveData<Boolean>()
     val refreshRecipesLiveData = MutableLiveData<Boolean>()
     val localCategoryLiveData = MutableLiveData<MutableList<DevRecipeCategory>>()

+ 49 - 1
BusinessSetting/src/main/java/com/develop/setting/ui/LanguageActivity.kt

@@ -1,6 +1,9 @@
 package com.develop.setting.ui
 
+import android.annotation.SuppressLint
+import android.app.backup.BackupManager
 import android.content.Context
+import android.content.res.Configuration
 import android.os.Bundle
 import android.os.PowerManager
 import android.view.LayoutInflater
@@ -39,6 +42,7 @@ import com.drake.brv.utils.setup
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevStatus
 import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
 import org.greenrobot.eventbus.Subscribe
+import java.lang.reflect.Method
 import java.util.*
 
 @Route(path = Screens.Setting.LANGUAGE)
@@ -159,6 +163,7 @@ class LanguageActivity : BaseBindingActivity<ActivityLanguageBinding>() {
             if (isFromSetting) {
                 //相同语言的时候不可点击
                 if (language ==list[selectedPosition].value){
+                    finish()
                     return@setOnClickListener
                 }
                 if (isNightTheme() || isBrand036I()) {
@@ -207,7 +212,10 @@ class LanguageActivity : BaseBindingActivity<ActivityLanguageBinding>() {
         binding.languageRecycle.models?.get(index)?.apply {
             var l = this as ConfigUtils.Lang;
             MMkvUtils.save(CURRENT_LANGUAGE, l.value)
-//            SerialportUtils.updateLanguage(Locale(l.value.lowercase(),l.value.uppercase()))
+            if (isFromSetting){
+                  updateLanguage(Locale(l.value.lowercase(),l.value.uppercase()))
+            }
+
             LanguageUtils.applyLanguage(Locale(l.value.lowercase(),l.value.uppercase()))
         }
     }
@@ -243,4 +251,44 @@ class LanguageActivity : BaseBindingActivity<ActivityLanguageBinding>() {
         var dp6 = (com.develop.common.R.dimen.convert_6px).resId2Dimension()
     }
 
+
+    @SuppressLint("PrivateApi", "DiscouragedPrivateApi")
+    fun updateLanguage(locale: Locale) {
+        try {
+            val objIActMag: Any
+            val clzIActMag = Class.forName("android.app.IActivityManager")
+            val clzActMagNative = Class
+                .forName("android.app.ActivityManagerNative")
+            //amn = ActivityManagerNative.getDefault();
+            val `mtdActMagNative$getDefault`: Method = clzActMagNative
+                .getDeclaredMethod("getDefault")
+            objIActMag = `mtdActMagNative$getDefault`.invoke(clzActMagNative)!!
+            // objIActMag = amn.getConfiguration();
+            val `mtdIActMag$getConfiguration`: Method = clzIActMag
+                .getDeclaredMethod("getConfiguration")
+            val config: Configuration = `mtdIActMag$getConfiguration`
+                .invoke(objIActMag) as Configuration
+            // set the locale to the new value
+            config.locale = locale
+            //持久化  config.userSetLocale = true;
+            val clzConfig = Class
+                .forName("android.content.res.Configuration")
+            val userSetLocale = clzConfig
+                .getField("userSetLocale")
+            userSetLocale[config] = true
+            // 此处需要声明权限:android.permission.CHANGE_CONFIGURATION
+            // 会重新调用 onCreate();
+            val clzParams = arrayOf<Class<*>>(
+                Configuration::class.java
+            )
+            // objIActMag.updateConfiguration(config);
+            val `mtdIActMag$updateConfiguration`: Method = clzIActMag
+                .getDeclaredMethod("updateConfiguration", *clzParams)
+            `mtdIActMag$updateConfiguration`.invoke(objIActMag, config)
+            BackupManager.dataChanged("com.android.providers.settings")
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
+    }
+
 }

+ 5 - 0
BusinessSetting/src/main/java/com/develop/setting/ui/RestoreActivity.kt

@@ -8,11 +8,13 @@ import com.alibaba.android.arouter.facade.annotation.Route
 import com.develop.base.ext.updateText
 import com.develop.base.manager.WifiHelp
 import com.develop.base.scop.safeGlobalScope
+import com.develop.base.util.MMkvUtils
 import com.develop.common.data_repo.FoodDataProvider
 import com.develop.common.router.Screens
 import com.develop.common.ui.CommonBindingActivity
 import com.develop.common.dialog.CancelConfirmDialog
 import com.develop.common.tag.CURRENT_USER_ID
+import com.develop.common.tag.FIRST_IN
 import com.develop.setting.databinding.ActivityRestoreBinding
 import com.drake.net.utils.withMain
 import kotlinx.coroutines.Dispatchers
@@ -49,6 +51,8 @@ class RestoreActivity : CommonBindingActivity<ActivityRestoreBinding>() {
                     FoodDataProvider.getUserDatabase().devConfigDao().apply {
                         removeAllDevVersion()
                     }
+
+
                     val applicationDirectory = cacheDirectory.parent?.let { File(it) }
                     if (applicationDirectory?.exists() == true) {
 
@@ -60,6 +64,7 @@ class RestoreActivity : CommonBindingActivity<ActivityRestoreBinding>() {
                         }
                     }
                     withMain {
+//                        MMkvUtils.save(FIRST_IN, true)
                         val pm = getSystemService(Context.POWER_SERVICE) as PowerManager
                         pm.reboot("")
                     }

+ 2 - 1
BusinessSetting/src/main/res/layout/activity_privace_policy.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:background="@color/bg_color"
     android:layout_height="match_parent">

+ 17 - 1
BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt

@@ -420,7 +420,15 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
      * 物理键按下事件
      */
     override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
+
         if (keyCode == PRESS_DOWN_KEY_CODE) {
+//
+//            if (backRequestDialog.isShow){
+//                backRequestDialog.onConfirmClick()
+//            }else if (overrideModeDialog.isShow){
+//                overrideModeDialog.onConfirmClick()
+//            }
+
             //当前是turbo模式下
             if (viewModel.modeType == ModesType.TURBO.name) {
                 turboDownEvent()
@@ -451,7 +459,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         } else if (mRunningState == DevStatus.RUNNING.toInt() || currDevInfo.status == DevStatus.PAUSE.toInt()) {
             stopClick()
         } else if (mRunningState == DevStatus.STOP.toInt()) {
-            startClick()
+            finish()
+//            startClick()
         }
 
         return super.onKeyLongPress(keyCode, event)
@@ -1866,6 +1875,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
     private fun startClick(showStopTips: Boolean = true) {
         if (mRunningInstId != mSettingInstId) {
             overrideModeDialog.showDialog(supportFragmentManager, "overrideModeDialog")
+            overrideModeDialog.onConfirmClick()
         } else {
 
             //煮鸡蛋前需要设置时间,由于SDK没有设置转速,我这边用转速判断  COOK_EGGS 这里需要空格,sdk里面判断加了个空格
@@ -2117,6 +2127,12 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                     direction == DirectionView.Direction.LEFT, resources
                 )
             )
+
+            binding.flDirection.updateDirectionView(
+                if (direction == DirectionView.Direction.LEFT) DirectionView.Direction.LEFT
+                else DirectionView.Direction.RIGHT
+            )
+
             if (direction != DirectionView.Direction.RIGHT) {
                 CofarSDK.cfgMotorDirection(MotorDirections.REVERSE);
                 updateMotorDirectionUI(MotorDirections.REVERSE.toInt(), true);

+ 1 - 0
BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepActivity.kt

@@ -331,6 +331,7 @@ class CookStepActivity : CookStepBaseActivity() {
                     )
                 }
                 if (it.isWeightMode()) {
+                    binding.viewChangeCrush.setGone()
                     changeWeightPanel()
                     CofarSDK.stoptWeight()
                     CofarSDK.startWeight()

+ 9 - 2
BusinessStep/src/main/res/layout/activity_cook_detail.xml

@@ -196,7 +196,7 @@
             app:layout_constraintHorizontal_chainStyle="packed"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toTopOf="parent" />
-        <TextView
+        <com.develop.common.widget.MarqueeTextView
             android:id="@+id/tv_download"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -206,6 +206,11 @@
             android:text="@string/start_cooking"
             android:textColor="@color/cook_detail_info"
             android:textSize="@dimen/convert_36px"
+            android:ellipsize="marquee"
+            android:focusable="true"
+            android:focusableInTouchMode="true"
+            android:marqueeRepeatLimit="marquee_forever"
+            android:singleLine="true"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toEndOf="@+id/view_icon"
@@ -315,7 +320,9 @@
         android:layout_height="match_parent"
         android:background="#66000000"
         android:elevation="@dimen/convert_20px"
-        android:visibility="gone">
+        android:visibility="gone"
+
+        >
 
         <com.develop.common.widget.CircleBgImageView
             android:id="@+id/view_more_close"

+ 1 - 1
app/build.gradle

@@ -14,7 +14,7 @@ ext{
 //    versionCode=230617180
 //    brandCode="036I"
     brandCode="045A"
-    model="1039"
+    model="5037"
 
 }
 

+ 4 - 4
app/src/main/assets/help/CZ/help-white-a.html

@@ -20,16 +20,16 @@
     padding: 12px;
   }
 
-   p {
-      font-size: 24px;
+  p {
+      font-size: 26px;
     }
 
     h2 {
-      font-size: 44px;
+      font-size: 40px;
     }
 
     h3 {
-      font-size: 34px;
+      font-size: 30px;
     }
 
 

+ 3 - 3
app/src/main/assets/help/DE/help-white-a.html

@@ -21,15 +21,15 @@
   }
 
    p {
-      font-size: 24px;
+      font-size: 26px;
     }
 
     h2 {
-      font-size: 44px;
+      font-size: 40px;
     }
 
     h3 {
-      font-size: 34px;
+      font-size: 30px;
     }
 
   .item {

+ 4 - 4
app/src/main/assets/help/ES/help-white-a.html

@@ -20,16 +20,16 @@
     padding: 12px;
   }
 
-   p {
-      font-size: 24px;
+  p {
+      font-size: 26px;
     }
 
     h2 {
-      font-size: 44px;
+      font-size: 40px;
     }
 
     h3 {
-      font-size: 34px;
+      font-size: 30px;
     }
 
   .item {

+ 3 - 3
app/src/main/assets/help/FR/help-white-a.html

@@ -21,15 +21,15 @@
   }
 
     p {
-      font-size: 24px;
+      font-size: 26px;
     }
 
     h2 {
-      font-size: 44px;
+      font-size: 40px;
     }
 
     h3 {
-      font-size: 34px;
+      font-size: 30px;
     }
 
   .item {

+ 3 - 3
app/src/main/assets/help/IT/help-white-a.html

@@ -21,15 +21,15 @@
   }
 
   p {
-      font-size: 24px;
+      font-size: 26px;
     }
 
     h2 {
-      font-size: 44px;
+      font-size: 40px;
     }
 
     h3 {
-      font-size: 34px;
+      font-size: 30px;
     }
 
   .item {

+ 4 - 4
app/src/main/assets/help/PT/help-white-a.html

@@ -20,16 +20,16 @@
     padding: 12px;
   }
 
-  p {
-      font-size: 24px;
+   p {
+      font-size: 26px;
     }
 
     h2 {
-      font-size: 44px;
+      font-size: 40px;
     }
 
     h3 {
-      font-size: 34px;
+      font-size: 30px;
     }
 
   .item {

+ 28 - 13
libBase/src/main/java/com/develop/base/ext/GlobaExt.kt

@@ -20,6 +20,7 @@ import androidx.core.content.ContextCompat
 import com.bumptech.glide.Glide
 import com.bumptech.glide.load.engine.DiskCacheStrategy
 import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
+import com.develop.base.BuildConfig
 import com.develop.base.app.BaseApp
 import com.develop.base.util.MMkvUtils
 import kotlinx.serialization.decodeFromString
@@ -186,7 +187,8 @@ fun getBrandNum(): String {
 fun getSN(): String {
     var serial: String
 
-    return "045A21030020123010190001"
+    if (BuildConfig.DEBUG) {
+        return "045A21030020123010190001"
 //    return "000A30150020123010190001"
 //     return "002A30150020123010190001"
 //     return "000A10390020123010190001"
@@ -199,20 +201,26 @@ fun getSN(): String {
 //    return "010D10390020123010190001"
 //    return "000A10390020123010190009"
 //    return  "032D21060020123010190001"
-    //通过反射获取sn号
-    try {
-        val c = Class.forName("android.os.SystemProperties")
-        val get = c.getMethod("get", String::class.java)
-        serial = get.invoke(c, "ro.serialno") as String
-        if (serial != "" && serial != "unknown") return serial
-
-        //9.0及以上无法获取到sn,此方法为补充,能够获取到多数高版本手机 sn
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) serial = Build.getSerial()
-    } catch (e: java.lang.Exception) {
-        serial = "unknown"
+
+//    return  "030A10390020123010190002"
+    } else {
+        //通过反射获取sn号
+        try {
+            val c = Class.forName("android.os.SystemProperties")
+            val get = c.getMethod("get", String::class.java)
+            serial = get.invoke(c, "ro.serialno") as String
+            if (serial != "" && serial != "unknown") return serial
+
+            //9.0及以上无法获取到sn,此方法为补充,能够获取到多数高版本手机 sn
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) serial = Build.getSerial()
+        } catch (e: java.lang.Exception) {
+            serial = "unknown"
+        }
+
+        return serial
     }
 
-    return serial
+
 }
 
 fun ImageView.load(data: Any?) {
@@ -231,24 +239,30 @@ fun ImageView.load(data: Any?, width: Int, height: Int) {
         .dontAnimate()
         .into(this)
 }
+
 fun ImageView.load(data: Any?, error: Int) {
     Glide.with(this.context).load(data)
         .error(error)
         .transition(DrawableTransitionOptions.withCrossFade())
         .into(this)
 }
+
 fun isScreenWidth(): Int {
     return MMkvUtils.getInt("screen_width", 0)
 }
+
 fun isScreenHeight(): Int {
     return MMkvUtils.getInt("screen_height", 0)
 }
+
 fun setScreenWidth(width: Int) {
     MMkvUtils.save("screen_width", width)
 }
+
 fun setScreenHeight(height: Int) {
     MMkvUtils.save("screen_height", height)
 }
+
 fun isNightTheme(): Boolean {
     return MMkvUtils.getBool("nightTheme", false)
 }
@@ -276,6 +290,7 @@ fun setIsBrand011A(is011A: Boolean) {
 fun isBrand011A(): Boolean {
     return MMkvUtils.getBool("is011A", false)
 }
+
 fun setIsBrand054A(is054A: Boolean) {
     MMkvUtils.save("is054A", is054A)
 }

+ 1 - 1
libBase/src/main/java/com/develop/base/mvvm/FullScreenTransparentDialog.kt

@@ -12,7 +12,7 @@ import org.greenrobot.eventbus.EventBus
 
 abstract class FullScreenTransparentDialog : DialogFragment() {
 
-    private var isShow = false
+     var isShow = false
     override fun onCreateView(
         inflater: LayoutInflater,
         container: ViewGroup?,