We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
AndroidOS.Parcel
1 parent 6d1409e commit 2ae0b0aCopy full SHA for 2ae0b0a
Sources/AndroidOS/ParcelNDK.swift
@@ -10,7 +10,7 @@
10
import Android
11
#endif
12
import SwiftJava
13
-import CSwiftJavaJNI
+import SwiftJavaJNICore
14
import struct AndroidBinder.Parcel
15
16
// MARK: - NDK Parcel
@@ -25,7 +25,9 @@ public extension AndroidOS.Parcel {
25
/// Create a temporary NDK object and perform operatios on it.
26
@available(Android 30, *)
27
func withNDK<E, Result>(_ body: (borrowing NDK) throws(E) -> Result) throws(E) -> Result where E: Error {
28
- let ndk = NDK.fromJava(javaThis, environment: javaEnvironment)
+ guard let ndk = NDK.fromJava(javaThis, environment: javaEnvironment) else {
29
+ fatalError("Unable to create NDK type")
30
+ }
31
return try body(ndk)
32
}
33
0 commit comments