Remove unused codes
This commit is contained in:
parent
105bce1042
commit
4fd1b206a7
|
|
@ -9,13 +9,11 @@ import android.os.Looper;
|
|||
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
|
||||
import io.github.lsposed.manager.ui.activity.CrashReportActivity;
|
||||
import io.github.lsposed.manager.util.CompileUtil;
|
||||
import io.github.lsposed.manager.util.ModuleUtil;
|
||||
import io.github.lsposed.manager.util.NotificationUtil;
|
||||
import io.github.lsposed.manager.util.RebootUtil;
|
||||
import rikka.shizuku.Shizuku;
|
||||
|
|
@ -80,15 +78,6 @@ public class App extends Application {
|
|||
return instance.pref;
|
||||
}
|
||||
|
||||
public static void mkdir(String dir) {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
new File(Constants.getBaseDir() + dir).mkdir();
|
||||
}
|
||||
|
||||
public static boolean supportScope() {
|
||||
return Constants.getXposedApiVersion() >= 92;
|
||||
}
|
||||
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
if (!BuildConfig.DEBUG) {
|
||||
|
|
@ -127,7 +116,6 @@ public class App extends Application {
|
|||
pref = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
NotificationUtil.init();
|
||||
ModuleUtil.getInstance();
|
||||
|
||||
Shizuku.addRequestPermissionResultListener(REQUEST_PERMISSION_RESULT_LISTENER);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import androidx.core.content.ContextCompat;
|
|||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -42,7 +41,6 @@ import java.util.Map;
|
|||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import io.github.lsposed.manager.App;
|
||||
import io.github.lsposed.manager.BuildConfig;
|
||||
import io.github.lsposed.manager.Constants;
|
||||
import io.github.lsposed.manager.R;
|
||||
|
|
@ -52,7 +50,6 @@ import io.github.lsposed.manager.databinding.ActivityModulesBinding;
|
|||
import io.github.lsposed.manager.util.GlideApp;
|
||||
import io.github.lsposed.manager.util.LinearLayoutManagerFix;
|
||||
import io.github.lsposed.manager.util.ModuleUtil;
|
||||
import io.github.lsposed.manager.util.NavUtil;
|
||||
import me.zhanghai.android.fastscroll.FastScrollerBuilder;
|
||||
|
||||
import static android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS;
|
||||
|
|
@ -320,18 +317,10 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
|
|||
startActivity(new Intent(Intent.ACTION_UNINSTALL_PACKAGE, Uri.fromParts("package", module.packageName, null)));
|
||||
return true;
|
||||
} else if (itemId == R.id.menu_scope) {
|
||||
if (App.supportScope()) {
|
||||
Intent intent = new Intent(this, AppListActivity.class);
|
||||
intent.putExtra("modulePackageName", module.packageName);
|
||||
intent.putExtra("moduleName", module.getAppName());
|
||||
startActivity(intent);
|
||||
} else {
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
.setMessage(R.string.scope_not_supported)
|
||||
.setPositiveButton(R.string.download_view_download, (dialog, which) -> NavUtil.startURL(this, getString(R.string.about_source)))
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show();
|
||||
}
|
||||
Intent intent = new Intent(this, AppListActivity.class);
|
||||
intent.putExtra("modulePackageName", module.packageName);
|
||||
intent.putExtra("moduleName", module.getAppName());
|
||||
startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
return super.onContextItemSelected(item);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@
|
|||
<string name="about_source_label">源代码</string>
|
||||
|
||||
<!-- DownloadView -->
|
||||
<string name="download_view_download">下载</string>
|
||||
|
||||
<!-- DownloadUtils -->
|
||||
|
||||
|
|
@ -141,7 +140,6 @@
|
|||
<string name="settings_group_theme">主题</string>
|
||||
<string name="material_design_2">惨白设计</string>
|
||||
<string name="menu_scope">作用域</string>
|
||||
<string name="scope_not_supported">您安装的 LSPosed 版本不支持模块作用域,下载新版本?</string>
|
||||
<string name="settings_enable_resources">启用资源钩子</string>
|
||||
<string name="settings_enable_resources_summary"><b>警告: </b> 资源钩子已被弃用</string>
|
||||
<string name="settings_variant">变体</string>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@
|
|||
<string name="about_source_label">源代碼</string>
|
||||
|
||||
<!-- DownloadView -->
|
||||
<string name="download_view_download">下載</string>
|
||||
|
||||
<!-- DownloadUtils -->
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@
|
|||
<string name="about_source_label">原始碼</string>
|
||||
|
||||
<!-- DownloadView -->
|
||||
<string name="download_view_download">下載</string>
|
||||
|
||||
<!-- DownloadUtils -->
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@
|
|||
<string name="about_source_label">Source code</string>
|
||||
|
||||
<!-- DownloadView -->
|
||||
<string name="download_view_download">Download</string>
|
||||
|
||||
<!-- DownloadUtils -->
|
||||
|
||||
|
|
@ -151,7 +150,6 @@
|
|||
<string name="settings_group_theme">Theme</string>
|
||||
<string name="material_design_2">Material Design 2</string>
|
||||
<string name="menu_scope">Scope</string>
|
||||
<string name="scope_not_supported">The version of LSPosed you installed does not support module scope, download new version?</string>
|
||||
<string name="settings_variant">Variant</string>
|
||||
<string name="menu_optimize">Optimize…</string>
|
||||
<string name="menu_show_system_apps">System apps</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue