aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-02-21 10:06:14 +0100
committerOliver Smith <osmith@sysmocom.de>2020-02-21 11:20:49 +0100
commite28705aff54cc55ceaaa890867a8cc98397d8679 (patch)
tree5d61eafc850ff3ce6df547775827f35728803075
parentc6a2ba99d0813855036eb2f7ed64c08fbb119890 (diff)
IMSIPseudo.java: show hello world on LU
-rwxr-xr-xsim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java b/sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java
index f418846..7242449 100755
--- a/sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java
+++ b/sim-applet/src/org/osmocom/IMSIPseudo/IMSIPseudo.java
@@ -16,9 +16,8 @@ public class IMSIPseudo extends Applet implements ToolkitInterface, ToolkitConst
// which has a limited number of write cycles.
private byte helloMenuItem;
- static byte[] welcomeMsg = new byte[] { 'W', 'e', 'l', 'c', 'o', 'm', 'e', ' ',
- 't', 'o', ' ', 'T', 'o', 'o', 'r', 'C',
- 'a', 'm', 'p', ' ', '2', '0', '1', '2' };
+ static byte[] welcomeMsg = new byte[] { 'H', 'e', 'l', 'l', 'o', ',', ' ',
+ 'W', 'o', 'r', 'l', 'd', '!' };
static byte[] menuItemText = new byte[] { 'I', 'M', 'S', 'I', ' ', 'P', 's', 'e', 'u', 'd', 'o', 'n', 'y', 'm',
'i', 'z', 'a', 't', 'i', 'o', 'n'};
@@ -30,12 +29,14 @@ public class IMSIPseudo extends Applet implements ToolkitInterface, ToolkitConst
// Define the applet Menu Entry
helloMenuItem = reg.initMenuEntry(menuItemText, (short)0, (short)menuItemText.length,
PRO_CMD_SELECT_ITEM, false, (byte)0, (short)0);
+ reg.setEvent(EVENT_EVENT_DOWNLOAD_LOCATION_STATUS);
}
// This method is called by the card when the applet is installed. You must
// instantiate your applet and register it here.
public static void install(byte[] bArray, short bOffset, byte bLength) {
IMSIPseudo applet = new IMSIPseudo();
+
applet.register();
}
@@ -58,6 +59,13 @@ public class IMSIPseudo extends Applet implements ToolkitInterface, ToolkitConst
showHello();
}
}
+
+ if (event == EVENT_EVENT_DOWNLOAD_LOCATION_STATUS) {
+ /* TODO: count the location updates done with the same
+ * pseudo IMSI, and warn the user if it becomes too
+ * high */
+ showHello();
+ }
}
private void showHello() {