From 6092d7ca88510a06a3eea07fa55a6844ff5e9736 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 11 Oct 2020 05:10:02 -0700 Subject: [PATCH] Minor cleanups --- app/shared/src/main/AndroidManifest.xml | 8 +------- app/shared/src/main/java/a/p.java | 7 ------- .../com/topjohnwu/magisk/FileProvider.java | 10 ---------- .../topjohnwu/magisk/ProviderCallHandler.java | 8 -------- app/src/main/AndroidManifest.xml | 8 ++++++++ app/src/main/java/a/stubs.kt | 7 +++++-- .../java/com/topjohnwu/magisk/core/App.kt | 3 --- .../java/com/topjohnwu/magisk/core/Hacks.kt | 2 +- .../com/topjohnwu/magisk/core/Provider.kt | 19 +++++++++++++++++++ .../core/{GeneralReceiver.kt => Receiver.kt} | 2 +- .../magisk/core/su/SuCallbackHandler.kt | 9 +-------- stub/src/main/AndroidManifest.xml | 9 ++++++++- stub/src/main/java/a/a.java | 6 ------ 13 files changed, 44 insertions(+), 54 deletions(-) delete mode 100644 app/shared/src/main/java/a/p.java delete mode 100644 app/shared/src/main/java/com/topjohnwu/magisk/ProviderCallHandler.java create mode 100644 app/src/main/java/com/topjohnwu/magisk/core/Provider.kt rename app/src/main/java/com/topjohnwu/magisk/core/{GeneralReceiver.kt => Receiver.kt} (96%) delete mode 100644 stub/src/main/java/a/a.java diff --git a/app/shared/src/main/AndroidManifest.xml b/app/shared/src/main/AndroidManifest.xml index f8862c7f7..79cd798f9 100644 --- a/app/shared/src/main/AndroidManifest.xml +++ b/app/shared/src/main/AndroidManifest.xml @@ -12,12 +12,6 @@ android:supportsRtl="true" android:theme="@android:style/Theme.Translucent.NoTitleBar" tools:ignore="UnusedAttribute"> - - - + diff --git a/app/shared/src/main/java/a/p.java b/app/shared/src/main/java/a/p.java deleted file mode 100644 index 5cfd5256c..000000000 --- a/app/shared/src/main/java/a/p.java +++ /dev/null @@ -1,7 +0,0 @@ -package a; - -import com.topjohnwu.magisk.FileProvider; - -public class p extends FileProvider { - /* Stub */ -} diff --git a/app/shared/src/main/java/com/topjohnwu/magisk/FileProvider.java b/app/shared/src/main/java/com/topjohnwu/magisk/FileProvider.java index e8bc9aaf4..5f8bf5d37 100644 --- a/app/shared/src/main/java/com/topjohnwu/magisk/FileProvider.java +++ b/app/shared/src/main/java/com/topjohnwu/magisk/FileProvider.java @@ -8,7 +8,6 @@ import android.database.Cursor; import android.database.MatrixCursor; import android.net.Uri; import android.os.Build; -import android.os.Bundle; import android.os.Environment; import android.os.ParcelFileDescriptor; import android.provider.OpenableColumns; @@ -34,8 +33,6 @@ public class FileProvider extends ContentProvider { private PathStrategy mStrategy; - public static ProviderCallHandler callHandler; - @Override public boolean onCreate() { return true; @@ -131,13 +128,6 @@ public class FileProvider extends ContentProvider { return file.delete() ? 1 : 0; } - @Override - public Bundle call(String method, String arg, Bundle extras) { - if (callHandler != null) - return callHandler.call(getContext(), method, arg, extras); - return Bundle.EMPTY; - } - @Override public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { diff --git a/app/shared/src/main/java/com/topjohnwu/magisk/ProviderCallHandler.java b/app/shared/src/main/java/com/topjohnwu/magisk/ProviderCallHandler.java deleted file mode 100644 index c3ff5c447..000000000 --- a/app/shared/src/main/java/com/topjohnwu/magisk/ProviderCallHandler.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.topjohnwu.magisk; - -import android.content.Context; -import android.os.Bundle; - -public interface ProviderCallHandler { - Bundle call(Context context, String method, String arg, Bundle extras); -} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3a493af31..c44913ea7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -65,6 +65,14 @@ + + + + - + + + + diff --git a/stub/src/main/java/a/a.java b/stub/src/main/java/a/a.java deleted file mode 100644 index c3f431e83..000000000 --- a/stub/src/main/java/a/a.java +++ /dev/null @@ -1,6 +0,0 @@ -package a; - -import com.topjohnwu.magisk.MainActivity; - -public class a extends MainActivity { -}