|
@@ -13,6 +13,8 @@ import androidx.recyclerview.widget.RecyclerView
|
|
import com.develop.base.ext.load
|
|
import com.develop.base.ext.load
|
|
import com.alibaba.android.arouter.facade.annotation.Route
|
|
import com.alibaba.android.arouter.facade.annotation.Route
|
|
import com.blankj.utilcode.util.ToastUtils
|
|
import com.blankj.utilcode.util.ToastUtils
|
|
|
|
+import com.develop.base.ext.getSN
|
|
|
|
+import com.develop.base.ext.isBrand036I
|
|
import com.develop.base.ext.navigateTo
|
|
import com.develop.base.ext.navigateTo
|
|
import com.develop.base.ext.resId2Dimension
|
|
import com.develop.base.ext.resId2Dimension
|
|
import com.develop.base.ext.src
|
|
import com.develop.base.ext.src
|
|
@@ -46,9 +48,13 @@ class SettingMainActivity : CommonBindingActivity<ActivitySettingMainBinding>()
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
super.onCreate(savedInstanceState)
|
|
super.onCreate(savedInstanceState)
|
|
var ctx = this
|
|
var ctx = this
|
|
- dataList = DataFactory.genSettingModesList(resources)
|
|
|
|
|
|
+ dataList = if (getSN().startsWith("010D")) {
|
|
|
|
+ DataFactory.genSetting010DModesList(resources)
|
|
|
|
+ } else {
|
|
|
|
+ DataFactory.genSettingModesList(resources)
|
|
|
|
+ }
|
|
binding.tvTitle.updateText(getString(com.develop.common.R.string.settings))
|
|
binding.tvTitle.updateText(getString(com.develop.common.R.string.settings))
|
|
- binding.ivClose.setImageResource( com.develop.common.R.drawable.ic_close)
|
|
|
|
|
|
+ binding.ivClose.setImageResource(com.develop.common.R.drawable.ic_close)
|
|
binding.ivClose.setOnClickListener {
|
|
binding.ivClose.setOnClickListener {
|
|
finish()
|
|
finish()
|
|
}
|
|
}
|
|
@@ -113,14 +119,17 @@ class SettingMainActivity : CommonBindingActivity<ActivitySettingMainBinding>()
|
|
SettingType.STORAGE -> {
|
|
SettingType.STORAGE -> {
|
|
openFileManager()
|
|
openFileManager()
|
|
}
|
|
}
|
|
|
|
+
|
|
SettingType.TUYA -> {
|
|
SettingType.TUYA -> {
|
|
|
|
|
|
- if(CofarSDK.devInfo().status !== DevStatus.STOP.toInt()){
|
|
|
|
|
|
+ if (CofarSDK.devInfo().status !== DevStatus.STOP.toInt()) {
|
|
ToastUtils.showShort(getString(com.develop.common.R.string.change_lang_tips))
|
|
ToastUtils.showShort(getString(com.develop.common.R.string.change_lang_tips))
|
|
- }else{
|
|
|
|
- if( NetworkInfo.DetailedState.CONNECTED == WifiHelp.Build(ctx).build().getDetailedState()){
|
|
|
|
|
|
+ } else {
|
|
|
|
+ if (NetworkInfo.DetailedState.CONNECTED == WifiHelp.Build(ctx)
|
|
|
|
+ .build().getDetailedState()
|
|
|
|
+ ) {
|
|
navigateTo(Screens.Setting.TUYA)
|
|
navigateTo(Screens.Setting.TUYA)
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
navigateTo(Screens.Setting.WIFI) {
|
|
navigateTo(Screens.Setting.WIFI) {
|
|
val bundle = Bundle()
|
|
val bundle = Bundle()
|
|
bundle.putBoolean(WIFI_FROM_MAIN_SETTING, true)
|
|
bundle.putBoolean(WIFI_FROM_MAIN_SETTING, true)
|
|
@@ -130,9 +139,6 @@ class SettingMainActivity : CommonBindingActivity<ActivitySettingMainBinding>()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|