Remove unused files

This commit is contained in:
topjohnwu
2019-08-08 00:29:27 -07:00
parent 5ba5f5f94e
commit 48395ba860
22 changed files with 29 additions and 269 deletions
@@ -1,26 +0,0 @@
package com.topjohnwu.magisk.utils;
import android.util.Log;
import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.Const;
public class Logger {
public static void debug(String line) {
if (BuildConfig.DEBUG)
Log.d(Const.DEBUG_TAG, "DEBUG: " + line);
}
public static void debug(String fmt, Object... args) {
debug(Utils.INSTANCE.fmt(fmt, args));
}
public static void error(String line) {
Log.e(Const.DEBUG_TAG, "ERROR: " + line);
}
public static void error(String fmt, Object... args) {
error(Utils.INSTANCE.fmt(fmt, args));
}
}
@@ -153,7 +153,6 @@ class RootUtils : Shell.Initializer() {
companion object {
@JvmStatic
fun rmAndLaunch(rm: String, component: ComponentName) {
Shell.su("(rm_launch $rm ${component.flattenToString()})").exec()
}
@@ -11,7 +11,6 @@ import com.topjohnwu.magisk.data.database.PolicyDao
import com.topjohnwu.magisk.data.repository.LogRepository
import com.topjohnwu.magisk.extensions.inject
import com.topjohnwu.magisk.model.entity.MagiskPolicy
import com.topjohnwu.magisk.model.entity.Policy
import com.topjohnwu.magisk.model.entity.toLog
import com.topjohnwu.magisk.model.entity.toPolicy
import java.util.*
@@ -20,7 +19,6 @@ object SuLogger {
private val context: Context by inject()
@JvmStatic
fun handleLogs(intent: Intent) {
val fromUid = intent.getIntExtra("from.uid", -1)
@@ -72,7 +70,7 @@ object SuLogger {
if (policy.notification && Config.suNotification == Config.Value.NOTIFICATION_TOAST) {
Utils.toast(
context.getString(
if (policy.policy == Policy.ALLOW)
if (policy.policy == MagiskPolicy.ALLOW)
R.string.su_allow_toast
else
R.string.su_deny_toast, policy.appName
@@ -1,43 +0,0 @@
package com.topjohnwu.magisk.utils;
import androidx.annotation.NonNull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ValueSortedMap<K, V extends Comparable<? super V>> extends HashMap<K, V> {
private List<V> sorted = new ArrayList<>();
@NonNull
@Override
public Collection<V> values() {
if (sorted.isEmpty()) {
sorted.addAll(super.values());
Collections.sort(sorted);
}
return sorted;
}
@Override
public V put(K key, V value) {
sorted.clear();
return super.put(key, value);
}
@Override
public void putAll(Map<? extends K, ? extends V> m) {
sorted.clear();
super.putAll(m);
}
@Override
public V remove(Object key) {
sorted.clear();
return super.remove(key);
}
}
@@ -1,16 +0,0 @@
package com.topjohnwu.magisk.utils.feature
@Retention(AnnotationRetention.SOURCE)
annotation class WIP
@Retention(AnnotationRetention.SOURCE)
annotation class Beta
@Retention(AnnotationRetention.SOURCE)
annotation class Alpha
@Retention(AnnotationRetention.SOURCE)
annotation class Unstable