Browse Source

fix: EuiccService should ignore negative slot IDs

Peter Cai 1 year ago
parent
commit
4914a35c3d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/src/main/java/im/angry/openeuicc/service/OpenEuiccService.kt

+ 1 - 1
app/src/main/java/im/angry/openeuicc/service/OpenEuiccService.kt

@@ -166,7 +166,7 @@ class OpenEuiccService : EuiccService(), OpenEuiccContextMarker {
 
     override fun onGetEuiccProfileInfoList(slotId: Int): GetEuiccProfileInfoListResult = withEuiccChannelManager {
         Log.i(TAG, "onGetEuiccProfileInfoList slotId=$slotId")
-        if (shouldIgnoreSlot(slotId)) {
+        if (slotId == -1 || shouldIgnoreSlot(slotId)) {
             Log.i(TAG, "ignoring slot $slotId")
             return GetEuiccProfileInfoListResult(RESULT_FIRST_USER, arrayOf(), true)
         }