Compare commits
No commits in common. "e493a8e885921bd58c0312ccc0f3f5c4b3085672" and "c6dc44c0e3796ea301bd15de7c91ccb27f701f88" have entirely different histories.
e493a8e885
...
c6dc44c0e3
4 changed files with 5 additions and 38 deletions
|
@ -81,12 +81,10 @@ open class EuiccChannelManager(protected val context: Context) {
|
||||||
var euiccChannel: EuiccChannel? = tryOpenEuiccChannelPrivileged(uiccInfo, channelInfo)
|
var euiccChannel: EuiccChannel? = tryOpenEuiccChannelPrivileged(uiccInfo, channelInfo)
|
||||||
|
|
||||||
if (euiccChannel == null) {
|
if (euiccChannel == null) {
|
||||||
Log.i(TAG, "Trying OMAPI for slot ${uiccInfo.slotIndex}")
|
|
||||||
try {
|
try {
|
||||||
euiccChannel = OmapiChannel(seService!!, channelInfo)
|
euiccChannel = OmapiChannel(seService!!, channelInfo)
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: IllegalArgumentException) {
|
||||||
// Failed
|
// Failed
|
||||||
Log.w(TAG, "OMAPI APDU interface unavailable for slot ${uiccInfo.slotIndex}.")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,12 @@ class PrivilegedEuiccChannelManager(context: Context): EuiccChannelManager(conte
|
||||||
|
|
||||||
override fun tryOpenEuiccChannelPrivileged(uiccInfo: UiccCardInfo, channelInfo: EuiccChannelInfo): EuiccChannel? {
|
override fun tryOpenEuiccChannelPrivileged(uiccInfo: UiccCardInfo, channelInfo: EuiccChannelInfo): EuiccChannel? {
|
||||||
if (uiccInfo.isEuicc && !uiccInfo.isRemovable) {
|
if (uiccInfo.isEuicc && !uiccInfo.isRemovable) {
|
||||||
Log.i(TAG, "Trying TelephonyManager for slot ${uiccInfo.slotIndex}")
|
Log.d(TAG, "Using TelephonyManager for slot ${uiccInfo.slotIndex}")
|
||||||
// TODO: On Tiramisu, we should also connect all available "ports" for MEP support
|
// TODO: On Tiramisu, we should also connect all available "ports" for MEP support
|
||||||
try {
|
try {
|
||||||
return TelephonyManagerChannel(channelInfo, tm)
|
return TelephonyManagerChannel(channelInfo, tm)
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: IllegalArgumentException) {
|
||||||
// Failed
|
// Failed
|
||||||
Log.w(TAG, "TelephonyManager APDU interface unavailable for slot ${uiccInfo.slotIndex}, falling back")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
|
|
@ -12,12 +12,6 @@ android {
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
|
|
||||||
externalNativeBuild {
|
|
||||||
ndkBuild {
|
|
||||||
arguments '-j4'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
@ -1,29 +1,14 @@
|
||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
# function to find all *.c files under a directory
|
# function to find all *.c files under a directory
|
||||||
# Detecting the operating system
|
|
||||||
ifeq ($(OS),Windows_NT)
|
|
||||||
# Windows-specific commands
|
|
||||||
define all-c-files-under
|
define all-c-files-under
|
||||||
$(patsubst .\%,%, \
|
$(patsubst ./%,%, \
|
||||||
$(shell cd $(LOCAL_PATH) & \
|
$(shell cd $(LOCAL_PATH) ; \
|
||||||
dir /b/s $(subst /,\,$(1))\*.c) \
|
find $(1) -name "*.c" -and -not -name ".*" -maxdepth 1) \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
else
|
|
||||||
# UNIX commands
|
|
||||||
define all-c-files-under
|
|
||||||
$(patsubst ./%,%, \
|
|
||||||
$(shell cd $(LOCAL_PATH) ; \
|
|
||||||
find $(1) -name "*.c" -and -not -name ".*" -maxdepth 1) \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_SHORT_COMMANDS := true
|
|
||||||
APP_SHORT_COMMANDS := true
|
|
||||||
|
|
||||||
# libcjson
|
# libcjson
|
||||||
LOCAL_MODULE := lpac-cjson
|
LOCAL_MODULE := lpac-cjson
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
|
@ -31,9 +16,6 @@ LOCAL_SRC_FILES := \
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_SHORT_COMMANDS := true
|
|
||||||
APP_SHORT_COMMANDS := true
|
|
||||||
|
|
||||||
# libasn1c, the ASN parser component from lpac
|
# libasn1c, the ASN parser component from lpac
|
||||||
LOCAL_MODULE := lpac-asn1c
|
LOCAL_MODULE := lpac-asn1c
|
||||||
LOCAL_C_INCLUDES := \
|
LOCAL_C_INCLUDES := \
|
||||||
|
@ -44,9 +26,6 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_SHORT_COMMANDS := true
|
|
||||||
APP_SHORT_COMMANDS := true
|
|
||||||
|
|
||||||
# libeuicc component from lpac, which contains the actual implementation
|
# libeuicc component from lpac, which contains the actual implementation
|
||||||
LOCAL_MODULE := lpac-euicc
|
LOCAL_MODULE := lpac-euicc
|
||||||
LOCAL_STATIC_LIBRARIES := lpac-asn1c lpac-cjson
|
LOCAL_STATIC_LIBRARIES := lpac-asn1c lpac-cjson
|
||||||
|
@ -57,9 +36,6 @@ LOCAL_SRC_FILES := \
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_SHORT_COMMANDS := true
|
|
||||||
APP_SHORT_COMMANDS := true
|
|
||||||
|
|
||||||
LOCAL_MODULE := lpac-jni
|
LOCAL_MODULE := lpac-jni
|
||||||
LOCAL_STATIC_LIBRARIES := lpac-euicc
|
LOCAL_STATIC_LIBRARIES := lpac-euicc
|
||||||
LOCAL_C_INCLUDES := \
|
LOCAL_C_INCLUDES := \
|
||||||
|
|
Loading…
Add table
Reference in a new issue