ソースを参照

[11/n] lpac-jni: Fix validity check for LPA

none of the properties should be "by lazy" because we depend on whether
they error to detect if the LPA is still valid.
Peter Cai 2 年 前
コミット
d95341b764

+ 3 - 4
libs/lpac-jni/src/main/java/net/typeblog/lpac_jni/impl/LocalProfileAssistantImpl.kt

@@ -20,11 +20,10 @@ class LocalProfileAssistantImpl(
     }
 
     override val profiles: List<LocalProfileInfo>
-        get() = LpacJni.es10cGetProfilesInfo(contextHandle)!!.asList() // TODO: Maybe we need better error handling
+        get() = LpacJni.es10cGetProfilesInfo(contextHandle)!!.asList()
 
-    override val eID: String by lazy {
-        LpacJni.es10cGetEid(contextHandle)!!
-    }
+    override val eID: String
+        get() = LpacJni.es10cGetEid(contextHandle)!!
 
     override val euiccInfo2: EuiccInfo2?
         get() = LpacJni.es10cexGetEuiccInfo2(contextHandle)