Changeset 11
- Timestamp:
- 03/12/07 23:22:11 (2 years ago)
- Files:
-
- MIDlet/bin/FreeAuth.jad (modified) (1 diff)
- MIDlet/bin/FreeAuth.jar (modified) (previous)
- MIDlet/bin/MANIFEST.MF (modified) (1 diff)
- MIDlet/src/FreeAuth.java (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
MIDlet/bin/FreeAuth.jad
r1 r11 4 4 MIDlet-Icon: /FreeAuth.png 5 5 MIDlet-Info-URL: http://www.freeauth.org/index.php/Free_Auth_MIDLet 6 MIDlet-Jar-Size: 12 24876 MIDlet-Jar-Size: 121967 7 7 MIDlet-Jar-URL: FreeAuth.jar 8 8 MIDlet-Name: FreeAuth 9 9 MIDlet-Permissions: javax.microedition.io.Connector.http 10 10 MIDlet-Vendor: FreeAuth.org 11 MIDlet-Version: 2.4. 311 MIDlet-Version: 2.4.4 12 12 MicroEdition-Configuration: CLDC-1.0 13 13 MicroEdition-Profile: MIDP-2.0 MIDlet/bin/MANIFEST.MF
r1 r11 5 5 MIDlet-Permissions: javax.microedition.io.Connector.http 6 6 MIDlet-Vendor: FreeAuth.org 7 MIDlet-Version: 2.4. 37 MIDlet-Version: 2.4.4 8 8 MicroEdition-Configuration: CLDC-1.0 9 9 MicroEdition-Profile: MIDP-2.0 MIDlet/src/FreeAuth.java
r4 r11 44 44 public class FreeAuth extends MIDlet implements CommandListener 45 45 { 46 private Command doNextCommand = new Command("Next", Command.SCREEN, 2); 47 46 48 private Command checkForDefaultsNoCommand = new Command("No", Command.SCREEN, 1); 47 49 private Command checkForDefaultsYesCommand = new Command("Yes", Command.SCREEN, 2); 48 50 private Command newAliasDeleteCommand = new Command("Delete", Command.SCREEN, 1); 49 private Command newAliasNextCommand = new Command("Next", Command.SCREEN, 2);50 51 private Command newManSecDeleteCommand = new Command("Delete", Command.SCREEN, 1); 51 private Command newManSecNextCommand = new Command("Next", Command.SCREEN, 2);52 52 private Command ManualSecretCommand = new Command("Manual Entry", Command.SCREEN, 2); 53 53 private Command aboutMainCommand = new Command("About", Command.SCREEN, 2); … … 64 64 private Command resetSecretCommand = new Command("Reset Secret", Command.SCREEN, 3); 65 65 private Command deleteSecretCommand = new Command("Delete Secret", Command.SCREEN, 3); 66 private Command resetNextCommand = new Command("Next", Command.SCREEN, 2);67 private Command deleteNextCommand = new Command("Next", Command.SCREEN, 2);68 66 private Command backupCommand = new Command("DB Backup", Command.SCREEN, 3); 69 67 private Command restoreCommand = new Command("DB Restore", Command.SCREEN, 3); … … 75 73 76 74 private String currentAction = ""; 75 private String nextAction = ""; 77 76 private String seed = ""; 78 77 private String secret = ""; … … 172 171 doAboutCommand(); 173 172 174 else if(c == newAliasNextCommand) 175 if(newalias.length() >= 1) 176 generateInit(); 177 else 178 newAlias(); 179 173 else if(c == doNextCommand) 174 { 175 if(nextAction == "newAliasNextCommand") 176 { 177 if(newalias.length() >= 1) 178 generateInit(); 179 else 180 newAlias(); 181 } else if(nextAction == "newManSecNextCommand") { 182 if(seed.length() < 16) 183 newManualSecret(); 184 else 185 newAlias(); 186 } else if(nextAction == "resetNextCommand") { 187 doresetNext(); 188 } else if(nextAction == "deleteNextCommand") { 189 dodeleteNext(); 190 } else if(nextAction == "wipeCommand") { 191 doDBWipe(); 192 } else if(nextAction == "testDefCommand") { 193 LoadTestDef(); 194 } 195 } 180 196 else if(c == newAliasDeleteCommand) 181 197 donewAliasDeleteCommand(); … … 188 204 } 189 205 190 else if(c == newManSecNextCommand)191 if(seed.length() < 16)192 newManualSecret();193 else194 newAlias();195 196 206 else if(c == newManSecDeleteCommand) 197 207 donewManSecDeleteCommand(); … … 201 211 202 212 else if(c == resetSecretCommand) 203 doresetSecret(); 204 205 else if(c == resetNextCommand) 206 doresetNext(); 207 213 { 214 nextAction = "resetNextCommand"; 215 doNext("You are about to reset this shared secret! Make sure this is what you really really want to do!"); 216 } 208 217 else if(c == deleteSecretCommand) 209 dodeleteSecret(); 210 211 else if(c == deleteNextCommand) 212 dodeleteNext(); 213 218 { 219 nextAction = "dodeleteSecret"; 220 doNext("You are about to delete this shared secret! Make sure this is what you really really want to do!"); 221 } 214 222 else if(c == mainMenuCommand) 215 223 { … … 221 229 222 230 else if(c == wipeCommand) 223 doDBWipe(); 224 231 { 232 nextAction = "wipeCommand"; 233 doNext("Are you sure you want to wipe the phones database?"); 234 } 225 235 else if(c == testDefCommand) 226 LoadTestDef(); 227 236 { 237 nextAction = "testDefCommand"; 238 doNext("Are you sure you want to wipe the phones database, and load the testing defaults?"); 239 } 228 240 else if(c == selectSecretCommand | c == List.SELECT_COMMAND) 229 241 doselectSecret(); … … 851 863 } 852 864 853 private void doresetSecret() 854 { 855 currentAction = "donewPassCode"; 865 private void doNext(final String message) 866 { 856 867 lowinput = new Canvas() 857 868 { … … 860 871 int w=getWidth(); 861 872 int h=getHeight(); 862 showString(h, w, g, "You are about to reset this shared secret! Make sure this is what you really really want to do!");873 showString(h, w, g, message); 863 874 } 864 875 }; 865 876 866 877 lowinput.addCommand(cancelCommand); 867 lowinput.addCommand(resetNextCommand); 868 lowinput.setCommandListener(this); 869 Display.getDisplay(this).setCurrent(lowinput); 870 } 871 872 private void dodeleteSecret() 873 { 874 currentAction = "donewPassCode"; 875 lowinput = new Canvas() 876 { 877 public void paint(Graphics g) 878 { 879 int w=getWidth(); 880 int h=getHeight(); 881 showString(h, w, g, "You are about to delete this shared secret! Make sure this is what you really really want to do!"); 882 } 883 }; 884 885 lowinput.addCommand(cancelCommand); 886 lowinput.addCommand(deleteNextCommand); 878 lowinput.addCommand(doNextCommand); 887 879 lowinput.setCommandListener(this); 888 880 Display.getDisplay(this).setCurrent(lowinput); … … 1022 1014 }; 1023 1015 1016 nextAction = "newAliasNextCommand"; 1024 1017 lowinput.addCommand(newAliasDeleteCommand); 1025 lowinput.addCommand( newAliasNextCommand);1018 lowinput.addCommand(doNextCommand); 1026 1019 lowinput.addCommand(aboutMenuCommand); 1027 1020 lowinput.addCommand(exitMenuCommand); … … 1179 1172 }; 1180 1173 1174 nextAction = "newManSecNextCommand"; 1181 1175 lowinput.addCommand(newManSecDeleteCommand); 1182 lowinput.addCommand( newManSecNextCommand);1176 lowinput.addCommand(doNextCommand); 1183 1177 lowinput.addCommand(aboutMenuCommand); 1184 1178 lowinput.addCommand(exitMenuCommand);
