Skip to content

Commit

Permalink
Make inheritable
Browse files Browse the repository at this point in the history
  • Loading branch information
ikws4 committed May 20, 2020
1 parent c68f55a commit c3b3af4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.ikws4.kxposedhelper

@Suppress("UNCHECKED_CAST")
class MethodReplacement<T>(private val replaceHookedMethod: T.(param: MethodHookParam) -> Any? = {}) :
open class MethodReplacement<T>(private val replaceHookedMethod: T.(param: MethodHookParam) -> Any? = {}) :
MethodHook<T>(beforeHookedMethod = { param ->
try {
val result = replaceHookedMethod.invoke(param.thisObject as T, param)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import android.content.Context
import android.content.Intent
import android.content.IntentFilter

abstract class KXBroadcastReceiver : BroadcastReceiver() {

abstract val intentFilter: IntentFilter
open class KXBroadcastReceiver(private val intentFilter: IntentFilter) : BroadcastReceiver() {

private var listener: OnReceiveListener? = null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.content.ContentResolver
import android.net.Uri
import android.os.Bundle

class KXSharedPreferences(
open class KXSharedPreferences(
private val contentResolver: ContentResolver, private val prefName: String
) {
private val uri =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import android.database.Cursor
import android.net.Uri
import android.os.Bundle

class KXSharedPreferencesProvider : ContentProvider() {
open class KXSharedPreferencesProvider : ContentProvider() {

private var sharedPreferences: SharedPreferences? = null

Expand Down

0 comments on commit c3b3af4

Please sign in to comment.