From ccca09d1f9d3e05a3c748f47b0b9c0da283e8ccf Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Fri, 20 Jul 2018 19:35:19 -0500 Subject: [PATCH] Fixed `AndroidContextWrapper` --- Sources/ContentContext.swift | 2 +- Sources/ContentContextWrapper.swift | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Sources/ContentContext.swift b/Sources/ContentContext.swift index 4d62928..b351907 100644 --- a/Sources/ContentContext.swift +++ b/Sources/ContentContext.swift @@ -135,7 +135,7 @@ public extension AndroidContext { // MARK: - JNICache -internal extension AndroidContext { +private extension AndroidContext { /// JNI Cache struct JNICache { diff --git a/Sources/ContentContextWrapper.swift b/Sources/ContentContextWrapper.swift index 4f0fc14..d686b7c 100644 --- a/Sources/ContentContextWrapper.swift +++ b/Sources/ContentContextWrapper.swift @@ -14,7 +14,7 @@ public extension Android.Content { public typealias ContextWrapper = AndroidContextWrapper } -open class AndroidContextWrapper: JavaObject { +open class AndroidContextWrapper: AndroidContext { public convenience init?( casting object: java_swift.JavaObject, _ file: StaticString = #file, @@ -26,11 +26,8 @@ open class AndroidContextWrapper: JavaObject { self.javaObject = $0 } } -} - -public extension AndroidContextWrapper { - public func registerReceiver(receiver: Android.Content.BroadcastReceiver, filter: Android.Content.IntentFilter) -> Android.Content.Intent { + public override func registerReceiver(receiver: Android.Content.BroadcastReceiver, filter: Android.Content.IntentFilter) -> Android.Content.Intent { var __locals = [jobject]() @@ -53,7 +50,7 @@ public extension AndroidContextWrapper { return Android.Content.Intent(javaObject: __return) } - public func unregisterReceiver(receiver: Android.Content.BroadcastReceiver){ + public override func unregisterReceiver(receiver: Android.Content.BroadcastReceiver){ var __locals = [jobject]() @@ -117,7 +114,7 @@ public extension AndroidContextWrapper { // MARK: - Constants -internal extension AndroidContextWrapper { +private extension AndroidContextWrapper { /// JNI Cache struct JNICache {