Refactor repo class and SharedPref

This commit is contained in:
topjohnwu
2016-09-21 11:29:43 +08:00
parent baae3592d3
commit 0addbaa9a8
11 changed files with 374 additions and 443 deletions
@@ -7,16 +7,13 @@ import java.util.List;
public abstract class BaseModule {
protected String mId, mName, mVersion, mDescription, mSupportUrl, mDonateUrl, mAuthor;
protected String mId, mName, mVersion, mAuthor, mDescription, mSupportUrl, mDonateUrl;
protected boolean mIsCacheModule = false;
protected int mVersionCode = 0;
public BaseModule(List<String> props) {
this(props.toArray(new String[props.size()]));
}
protected void parseProps(List<String> props) { parseProps(props.toArray(new String[props.size()])); }
public BaseModule(String[] props) {
protected void parseProps(String[] props) {
for (String line : props) {
String[] prop = line.split("=", 2);
if (prop.length != 2) {
@@ -93,11 +90,11 @@ public abstract class BaseModule {
return mVersionCode;
}
public String getmDonateUrl() {
public String getDonateUrl() {
return mDonateUrl;
}
public String getmSupportUrl() {
public String getSupportUrl() {
return mSupportUrl;
}
}