Additional notice for Module updates

This commit is contained in:
topjohnwu
2016-09-29 03:37:57 +08:00
parent 35e3a479cd
commit 692b993eee
7 changed files with 21 additions and 14 deletions
@@ -6,9 +6,8 @@ import com.topjohnwu.magisk.utils.Utils;
public class Module extends BaseModule {
private String mRemoveFile;
private String mDisableFile;
private boolean mEnable, mRemove;
private String mRemoveFile, mDisableFile, mUpdateFile;
private boolean mEnable, mRemove, mUpdated;
public Module(String path) {
@@ -16,6 +15,7 @@ public class Module extends BaseModule {
mRemoveFile = path + "/remove";
mDisableFile = path + "/disable";
mUpdateFile = path + "/update";
if (mId == null) {
int sep = path.lastIndexOf('/');
@@ -29,6 +29,7 @@ public class Module extends BaseModule {
mEnable = !Utils.itemExist(mDisableFile);
mRemove = Utils.itemExist(mRemoveFile);
mUpdated = Utils.itemExist(mUpdateFile);
}
@@ -56,4 +57,8 @@ public class Module extends BaseModule {
return mRemove;
}
public boolean isUpdated() {
return mUpdated;
}
}