ソースを参照

[7/n] Fix logical slot usage

Peter Cai 2 年 前
コミット
fc980cda43

+ 1 - 1
app-common/src/main/java/im/angry/openeuicc/core/EuiccChannelManager.kt

@@ -161,7 +161,7 @@ open class EuiccChannelManager(protected val context: Context) {
         seService = null
         seService = null
     }
     }
 
 
-    open fun notifyEuiccProfilesChanged(slotId: Int) {
+    open fun notifyEuiccProfilesChanged(logicalSlotId: Int) {
         // No-op for unprivileged
         // No-op for unprivileged
     }
     }
 }
 }

+ 1 - 1
app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt

@@ -85,7 +85,7 @@ open class EuiccManagementFragment : Fragment(), EuiccFragmentMarker, EuiccProfi
 
 
         lifecycleScope.launch {
         lifecycleScope.launch {
             val profiles = withContext(Dispatchers.IO) {
             val profiles = withContext(Dispatchers.IO) {
-                euiccChannelManager.notifyEuiccProfilesChanged(slotId)
+                euiccChannelManager.notifyEuiccProfilesChanged(channel.logicalSlotId)
                 channel.lpa.profiles
                 channel.lpa.profiles
             }
             }
 
 

+ 1 - 1
app-common/src/main/java/im/angry/openeuicc/ui/MainActivity.kt

@@ -85,7 +85,7 @@ open class MainActivity : AppCompatActivity() {
                 // Request the system to refresh the list of profiles every time we start
                 // Request the system to refresh the list of profiles every time we start
                 // Note that this is currently supposed to be no-op when unprivileged,
                 // Note that this is currently supposed to be no-op when unprivileged,
                 // but it could change in the future
                 // but it could change in the future
-                manager.notifyEuiccProfilesChanged(it.slotId)
+                manager.notifyEuiccProfilesChanged(it.logicalSlotId)
             }
             }
         }
         }
 
 

+ 2 - 2
app/src/main/java/im/angry/openeuicc/core/PrivilegedEuiccChannelManager.kt

@@ -45,9 +45,9 @@ class PrivilegedEuiccChannelManager(context: Context): EuiccChannelManager(conte
         }
         }
     }
     }
 
 
-    override fun notifyEuiccProfilesChanged(slotId: Int) {
+    override fun notifyEuiccProfilesChanged(logicalSlotId: Int) {
         (context.applicationContext as OpenEuiccApplication).subscriptionManager.apply {
         (context.applicationContext as OpenEuiccApplication).subscriptionManager.apply {
-            findEuiccChannelBySlotBlocking(slotId)?.let {
+            findEuiccChannelBySlotBlocking(logicalSlotId)?.let {
                 tryRefreshCachedEuiccInfo(it.cardId)
                 tryRefreshCachedEuiccInfo(it.cardId)
             }
             }
         }
         }