Delete scope list file if no app
This commit is contained in:
parent
a2f40cf27a
commit
ec08cc85e6
|
|
@ -353,6 +353,9 @@ public class AppHelper {
|
||||||
@SuppressLint("WorldReadableFiles")
|
@SuppressLint("WorldReadableFiles")
|
||||||
static boolean saveScopeList(String modulePackageName, List<String> list) {
|
static boolean saveScopeList(String modulePackageName, List<String> list) {
|
||||||
File file = new File(BASE_PATH + String.format(SCOPE_LIST_PATH, modulePackageName));
|
File file = new File(BASE_PATH + String.format(SCOPE_LIST_PATH, modulePackageName));
|
||||||
|
if (list.size() == 0) {
|
||||||
|
return file.delete();
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
PrintWriter pr = new PrintWriter(new FileWriter(file));
|
PrintWriter pr = new PrintWriter(new FileWriter(file));
|
||||||
for (String line : list) {
|
for (String line : list) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue