Removed update repos as it can be done via repository

This commit is contained in:
Viktor De Pasquale
2019-05-09 15:56:06 +02:00
parent e65f9740fb
commit 90d85eaf7d
7 changed files with 11 additions and 225 deletions

View File

@@ -12,14 +12,10 @@ import androidx.collection.ArraySet;
@Deprecated
public class Event {
public static final int MAGISK_HIDE_DONE = 0;
public static final int MODULE_LOAD_DONE = 1;
public static final int REPO_LOAD_DONE = 2;
public static final int UPDATE_CHECK_DONE = 3;
@Deprecated
public static final int LOCALE_FETCH_DONE = 4;
@IntDef({MAGISK_HIDE_DONE, MODULE_LOAD_DONE, REPO_LOAD_DONE,
UPDATE_CHECK_DONE, LOCALE_FETCH_DONE})
@IntDef(LOCALE_FETCH_DONE)
@Retention(RetentionPolicy.SOURCE)
public @interface EventID {}

View File

@@ -7,8 +7,6 @@ import android.content.res.Resources;
import android.os.Build;
import android.text.TextUtils;
import androidx.annotation.StringRes;
import com.topjohnwu.magisk.App;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.superuser.Shell;
@@ -20,9 +18,11 @@ import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import androidx.annotation.StringRes;
public class LocaleManager {
public static Locale locale = Locale.getDefault();
public final static Locale defaultLocale = Locale.getDefault();
public static final Locale defaultLocale = Locale.getDefault();
public static List<Locale> locales;
public static Locale forLanguageTag(String tag) {
@@ -44,7 +44,7 @@ public class LocaleManager {
default:
language = tok[0];
}
if ((language.length() != 2 && language.length() != 3))
if (language.length() != 2 && language.length() != 3)
return new Locale("");
if (tok.length == 1)
return new Locale(language);
@@ -114,6 +114,7 @@ public class LocaleManager {
return getLocaleContext(locale).getString(id);
}
@Deprecated
public static void loadAvailableLocales(@StringRes int compareId) {
Shell.EXECUTOR.execute(() -> {
locales = new ArrayList<>();

View File

@@ -85,24 +85,6 @@ public class Utils {
.replace("#", "").replace("@", "").replace("\\", "_");
}
@Deprecated
public static void loadModules() {
loadModules(true);
}
@Deprecated
public static void loadModules(boolean async) {
Event.reset(Event.MODULE_LOAD_DONE);
Runnable run = () -> {
Map<String, OldModule> moduleMap = loadModulesLeanback();
Event.trigger(Event.MODULE_LOAD_DONE, moduleMap);
};
if (async)
App.THREAD_POOL.execute(run);
else
run.run();
}
@WorkerThread
public static Map<String, OldModule> loadModulesLeanback() {
final Map<String, OldModule> moduleMap = new ValueSortedMap<>();