|
@@ -203,6 +203,49 @@ object DataFactory {
|
|
|
return result
|
|
|
}
|
|
|
|
|
|
+ fun genSetting010DModesList(resource: Resources): MutableList<SettingModel> {
|
|
|
+ val result = mutableListOf<SettingModel>()
|
|
|
+ val resIdList = mutableListOf(
|
|
|
+ R.drawable.ic_setting_language,
|
|
|
+ R.drawable.ic_setting_wifi,
|
|
|
+// R.drawable.ic_setting_voice,
|
|
|
+// R.drawable.ic_setting_brightness,
|
|
|
+ R.drawable.ic_setting_user,
|
|
|
+// R.drawable.ic_setting_folder,
|
|
|
+ R.drawable.ic_setting_reset,
|
|
|
+ R.drawable.ic_setting_about,
|
|
|
+ )
|
|
|
+
|
|
|
+ val nameList = mutableListOf(
|
|
|
+ resource.getString(R.string.language), resource.getString(R.string.wifi),
|
|
|
+// resource.getString(R.string.sound),
|
|
|
+// resource.getString(R.string.brightness),
|
|
|
+ resource.getString(R.string.user_account),
|
|
|
+// resource.getString(R.string.storage),
|
|
|
+ resource.getString(R.string.reset), resource.getString(R.string.about)
|
|
|
+
|
|
|
+ )
|
|
|
+ val settingTypeList = mutableListOf(
|
|
|
+ SettingType.LANGUAGE, SettingType.WIFI,
|
|
|
+// SettingType.SOUND,
|
|
|
+// SettingType.BRIGHTNESS,
|
|
|
+ SettingType.USER_ACCOUNT,
|
|
|
+// SettingType.STORAGE,
|
|
|
+ SettingType.RESTORE_FACTORY_SETTINGS, SettingType.ABOUT
|
|
|
+ )
|
|
|
+
|
|
|
+ var tuyaConfig = ConfigUtils.loadTuyaConfig()
|
|
|
+ if(tuyaConfig != null){
|
|
|
+ settingTypeList.add(SettingType.TUYA)
|
|
|
+ nameList.add(resource.getString(R.string.tuya))
|
|
|
+ resIdList.add(R.drawable.ic_setting_tuya)
|
|
|
+ }
|
|
|
+
|
|
|
+ for (i in resIdList.indices) {
|
|
|
+ result.add(SettingModel(resIdList[i], nameList[i], settingTypeList[i]))
|
|
|
+ }
|
|
|
+ return result
|
|
|
+ }
|
|
|
|
|
|
fun genLocalRecipes(
|
|
|
categoryName: String,
|