feat: hiding logs support when launch a project on built app

This commit is contained in:
hyb1996
2018-01-25 14:12:54 +08:00
parent 02f9145a80
commit 8713027efe
6 changed files with 62 additions and 16 deletions

View File

@@ -0,0 +1,21 @@
package com.stardust.autojs.project;
import com.google.gson.annotations.SerializedName;
/**
* Created by Stardust on 2018/1/25.
*/
public class LaunchConfig {
@SerializedName("hideLogs")
private boolean mHideLogs = false;
public boolean shouldHideLogs() {
return mHideLogs;
}
public void setHideLogs(boolean hideLogs) {
mHideLogs = hideLogs;
}
}

View File

@@ -41,6 +41,9 @@ public class ProjectConfig {
@SerializedName("assets")
private List<String> mAssets = new ArrayList<>();
@SerializedName("launchConfig")
private LaunchConfig mLaunchConfig;
public static ProjectConfig fromJson(String json) {
if (json == null) {
return null;
@@ -122,6 +125,9 @@ public class ProjectConfig {
}
public List<String> getAssets() {
if (mAssets == null) {
mAssets = new ArrayList<>();
}
return mAssets;
}
@@ -129,6 +135,17 @@ public class ProjectConfig {
mAssets = assets;
}
public LaunchConfig getLaunchConfig() {
if (mLaunchConfig == null) {
mLaunchConfig = new LaunchConfig();
}
return mLaunchConfig;
}
public void setLaunchConfig(LaunchConfig launchConfig) {
mLaunchConfig = launchConfig;
}
public String toJson() {
return GSON.toJson(this);
}