Commit d48cf88d02a67372d559b57bf59bc5b748a72746
1 parent
eb7cb888
Exists in
master
and in
5 other branches
Melhorando inicialização do objeto
Showing
2 changed files
with
12 additions
and
13 deletions
Show diff stats
android/src/br/com/bb/pw3270/PW3270Activity.java
| @@ -135,7 +135,6 @@ public class PW3270Activity extends Activity | @@ -135,7 +135,6 @@ public class PW3270Activity extends Activity | ||
| 135 | setContentView(host.view); | 135 | setContentView(host.view); |
| 136 | 136 | ||
| 137 | host.view.loadUrl("file:index.html"); | 137 | host.view.loadUrl("file:index.html"); |
| 138 | - host.initialize(); | ||
| 139 | } | 138 | } |
| 140 | 139 | ||
| 141 | @Override | 140 | @Override |
android/src/br/com/bb/pw3270/lib3270.java
| @@ -119,7 +119,18 @@ public abstract class lib3270 | @@ -119,7 +119,18 @@ public abstract class lib3270 | ||
| 119 | break; | 119 | break; |
| 120 | 120 | ||
| 121 | case 7: // ready | 121 | case 7: // ready |
| 122 | - dlgSysMessage.hide(); | 122 | + if(initialized) |
| 123 | + { | ||
| 124 | + dlgSysMessage.hide(); | ||
| 125 | + } | ||
| 126 | + else | ||
| 127 | + { | ||
| 128 | + initialized = true; | ||
| 129 | + if(settings.getString("hostname","") != "" && settings.getBoolean("autoconnect",false)) | ||
| 130 | + connect(); | ||
| 131 | + else | ||
| 132 | + dlgSysMessage.hide(); | ||
| 133 | + } | ||
| 123 | break; | 134 | break; |
| 124 | 135 | ||
| 125 | case 8: // busy | 136 | case 8: // busy |
| @@ -356,17 +367,6 @@ public abstract class lib3270 | @@ -356,17 +367,6 @@ public abstract class lib3270 | ||
| 356 | msg.obj = new popupMessageInfo(title, text, info); | 367 | msg.obj = new popupMessageInfo(title, text, info); |
| 357 | mHandler.sendMessage(msg); | 368 | mHandler.sendMessage(msg); |
| 358 | } | 369 | } |
| 359 | - | ||
| 360 | - void initialize() | ||
| 361 | - { | ||
| 362 | - if(initialized) | ||
| 363 | - return; | ||
| 364 | - | ||
| 365 | - initialized = true; | ||
| 366 | - | ||
| 367 | - if(settings.getString("hostname","") != "" && settings.getBoolean("autoconnect",false)) | ||
| 368 | - connect(); | ||
| 369 | - } | ||
| 370 | 370 | ||
| 371 | void setActivity(Activity act) | 371 | void setActivity(Activity act) |
| 372 | { | 372 | { |