ts_31_10x: add a class for CardApplicationXSIM
In change Id410489841bb9020ddbf74de9114d808b1d5adb6, the RuntimeState class automatically adds additional files to the CardApplications for ISIM and USIM. This works only once. The second time an exception will be thrown because the added files are already in the CardApplication. Currently there is no way generate new card applications during initialization because the card applications are just objects that are created once in ts_31_10x.py. Lets turn them into classes and create the objects during initialization. This way we get fresh objects when we re-initialize. Change-Id: Ibb4f6242e7a92af84a905daa727b1b87016e7819
This commit is contained in:
@@ -82,8 +82,8 @@ def init_card(sl):
|
||||
|
||||
# Create runtime state with card profile
|
||||
profile = CardProfileUICC()
|
||||
profile.add_application(CardApplicationUSIM)
|
||||
profile.add_application(CardApplicationISIM)
|
||||
profile.add_application(CardApplicationUSIM())
|
||||
profile.add_application(CardApplicationISIM())
|
||||
rs = RuntimeState(card, profile)
|
||||
|
||||
# FIXME: do this dynamically
|
||||
|
||||
@@ -1115,4 +1115,6 @@ sw_usim = {
|
||||
}
|
||||
}
|
||||
|
||||
CardApplicationUSIM = CardApplication('USIM', adf=ADF_USIM(), sw=sw_usim)
|
||||
class CardApplicationUSIM(CardApplication):
|
||||
def __init__(self):
|
||||
super().__init__('USIM', adf=ADF_USIM(), sw=sw_usim)
|
||||
|
||||
@@ -223,4 +223,6 @@ sw_isim = {
|
||||
}
|
||||
}
|
||||
|
||||
CardApplicationISIM = CardApplication('ISIM', adf=ADF_ISIM(), sw=sw_isim)
|
||||
class CardApplicationISIM(CardApplication):
|
||||
def __init__(self):
|
||||
super().__init__('ISIM', adf=ADF_ISIM(), sw=sw_isim)
|
||||
|
||||
Reference in New Issue
Block a user