Commit 89be07e1 authored by topjohnwu's avatar topjohnwu

Update to libsu 2.0.3

parent c61c3ae0
...@@ -77,7 +77,7 @@ dependencies { ...@@ -77,7 +77,7 @@ dependencies {
fullImplementation "androidx.recyclerview:recyclerview:${rootProject.ext.androidXVersion}" fullImplementation "androidx.recyclerview:recyclerview:${rootProject.ext.androidXVersion}"
fullImplementation "androidx.cardview:cardview:${rootProject.ext.androidXVersion}" fullImplementation "androidx.cardview:cardview:${rootProject.ext.androidXVersion}"
fullImplementation "com.google.android.material:material:${rootProject.ext.androidXVersion}" fullImplementation "com.google.android.material:material:${rootProject.ext.androidXVersion}"
fullImplementation 'com.github.topjohnwu:libsu:2.0.2' fullImplementation 'com.github.topjohnwu:libsu:2.0.3'
fullImplementation 'com.atlassian.commonmark:commonmark:0.11.0' fullImplementation 'com.atlassian.commonmark:commonmark:0.11.0'
fullImplementation 'org.kamranzafar:jtar:2.3' fullImplementation 'org.kamranzafar:jtar:2.3'
......
...@@ -11,7 +11,7 @@ public class Module extends BaseModule { ...@@ -11,7 +11,7 @@ public class Module extends BaseModule {
public Module(String path) { public Module(String path) {
try { try {
parseProps(Shell.Sync.su("dos2unix < " + path + "/module.prop")); parseProps(Shell.su("dos2unix < " + path + "/module.prop").exec().getOut());
} catch (NumberFormatException ignored) {} } catch (NumberFormatException ignored) {}
mRemoveFile = new SuFile(path, "remove"); mRemoveFile = new SuFile(path, "remove");
...@@ -33,13 +33,11 @@ public class Module extends BaseModule { ...@@ -33,13 +33,11 @@ public class Module extends BaseModule {
} }
public void createDisableFile() { public void createDisableFile() {
mEnable = false; mEnable = !mDisableFile.createNewFile();
mDisableFile.createNewFile();
} }
public void removeDisableFile() { public void removeDisableFile() {
mEnable = true; mEnable = mDisableFile.delete();
mDisableFile.delete();
} }
public boolean isEnabled() { public boolean isEnabled() {
...@@ -47,13 +45,11 @@ public class Module extends BaseModule { ...@@ -47,13 +45,11 @@ public class Module extends BaseModule {
} }
public void createRemoveFile() { public void createRemoveFile() {
mRemove = true; mRemove = mRemoveFile.createNewFile();
mRemoveFile.createNewFile();
} }
public void deleteRemoveFile() { public void deleteRemoveFile() {
mRemove = false; mRemove = !mRemoveFile.delete();
mRemoveFile.delete();
} }
public boolean willBeRemoved() { public boolean willBeRemoved() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment