Showing
2 changed files
with
15 additions
and
14 deletions
| ... | ... | @@ -4,9 +4,9 @@ import android.util.Log; |
| 4 | 4 | import android.widget.Toast; |
| 5 | 5 | import com.gimi.common.cinema.utils.Utils; |
| 6 | 6 | import com.google.gson.Gson; |
| 7 | +import com.google.gson.JsonSyntaxException; | |
| 7 | 8 | import com.qnbar.smc.application.MySampleAdvanceStrategy; |
| 8 | 9 | import com.qnbar.smc.service.TelinkLightService; |
| 9 | -import com.qnbar.smc.utils.FileSystem; | |
| 10 | 10 | import com.telink.TelinkApplication; |
| 11 | 11 | import com.telink.bluetooth.light.AdvanceStrategy; |
| 12 | 12 | import com.telink.bluetooth.light.model.Mesh; |
| ... | ... | @@ -37,9 +37,11 @@ public class FangTangApplication extends TelinkApplication { |
| 37 | 37 | *@see com.telink.bluetooth.light.model.Mesh#saveOrUpdate |
| 38 | 38 | */ |
| 39 | 39 | //save by json string |
| 40 | - if (FileSystem.exists(Mesh.MESH_FILE_NAME)) { | |
| 40 | + try { | |
| 41 | 41 | String string = Utils.getString(this, "mesh-config"); |
| 42 | 42 | this.mesh = new Gson().fromJson(string, Mesh.class); |
| 43 | + } catch (JsonSyntaxException e) { | |
| 44 | + e.printStackTrace(); | |
| 43 | 45 | } |
| 44 | 46 | |
| 45 | 47 | if (mesh == null) { | ... | ... |
| ... | ... | @@ -84,19 +84,18 @@ public class UpdateModelImpl implements IUpdateModel { |
| 84 | 84 | |
| 85 | 85 | @Override |
| 86 | 86 | public void updateAppVersion(Context context, boolean bool) { |
| 87 | - | |
| 88 | -// final AppUpgradeManager appUpgradeManager = new AppUpgradeManager(context, "com.xgimi.gimicinema", bool); | |
| 89 | -// if (appUpdateUtils == null) { | |
| 90 | -// appUpdateUtils = new AppUpdateUtils(context); | |
| 91 | -// } | |
| 92 | -// appUpdateUtils.setShowNoUpdate(bool); | |
| 93 | -// ThreadUtils.subThread(new ThreadUtils.DoSomeThing() { | |
| 94 | -// @Override | |
| 95 | -// public void doSomeThing() { | |
| 96 | -// appUpgradeManager.updateAppVersion(); | |
| 87 | + final AppUpgradeManager appUpgradeManager = new AppUpgradeManager(context, "com.xgimi.gimicinema", bool); | |
| 88 | + if (appUpdateUtils == null) { | |
| 89 | + appUpdateUtils = new AppUpdateUtils(context); | |
| 90 | + } | |
| 91 | + appUpdateUtils.setShowNoUpdate(bool); | |
| 92 | + ThreadUtils.subThread(new ThreadUtils.DoSomeThing() { | |
| 93 | + @Override | |
| 94 | + public void doSomeThing() { | |
| 95 | + appUpgradeManager.updateAppVersion(); | |
| 97 | 96 | // appUpdateUtils.updateAppVersion(); |
| 98 | -// } | |
| 99 | -// }); | |
| 97 | + } | |
| 98 | + }); | |
| 100 | 99 | } |
| 101 | 100 | |
| 102 | 101 | @Override | ... | ... |
Please
register
or
login
to post a comment