pySim-shell: add ADF.ISIM / ADF.USIM dynamically

currently ADF.ISIM and ADF.USIM are always added regardless if there is
a matching application on the card or not. Lets check what applications
are actually installed and add ADF.ISIM and ADF.USIM dynamically.

Change-Id: I42ee23375f98e6322708c1c4db6d65e1425feecd
Related: OS#4963
diff --git a/pySim-shell.py b/pySim-shell.py
index 946b3e5..e7bb7c0 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -58,8 +58,6 @@
 		self.card = card
 		self.rs = rs
 		self.py_locals = { 'card': self.card, 'rs' : self.rs }
-		self.card.read_aids()
-		self.poutput('AIDs on card: %s' % (self.card._aids))
 		self.numeric_path = False
 		self.add_settable(cmd2.Settable('numeric_path', bool, 'Print File IDs instead of names',
 						  onchange_cb=self._onchange_numeric_path))
@@ -254,13 +252,14 @@
 		sys.exit(2)
 
 	profile = CardProfileUICC()
+	profile.add_application(ADF_USIM())
+	profile.add_application(ADF_ISIM())
+
 	rs = RuntimeState(card, profile)
 
 	# FIXME: do this dynamically
 	rs.mf.add_file(DF_TELECOM())
 	rs.mf.add_file(DF_GSM())
-	rs.mf.add_application(ADF_USIM())
-	rs.mf.add_application(ADF_ISIM())
 
 	app = PysimApp(card, rs)
 	rs.select('MF', app)