Revision 3e180b04 src/com/rackspacecloud/android/ListAccountsActivity.java
b/src/com/rackspacecloud/android/ListAccountsActivity.java | ||
---|---|---|
26 | 26 |
import android.content.Intent; |
27 | 27 |
import android.os.AsyncTask; |
28 | 28 |
import android.os.Bundle; |
29 |
import android.util.Log; |
|
29 | 30 |
import android.view.ContextMenu; |
30 | 31 |
import android.view.ContextMenu.ContextMenuInfo; |
31 | 32 |
import android.view.LayoutInflater; |
... | ... | |
92 | 93 |
loggedIn = false; |
93 | 94 |
} |
94 | 95 |
if (state != null && state.containsKey("authenticating") && state.getBoolean("authenticating")) { |
96 |
Log.d("info", "captin on restore show"); |
|
95 | 97 |
showDialog(); |
96 | 98 |
} else { |
97 | 99 |
hideDialog(); |
... | ... | |
108 | 110 |
loadAccounts(); |
109 | 111 |
} |
110 | 112 |
} |
111 |
|
|
113 |
|
|
112 | 114 |
@Override |
113 | 115 |
protected void onStart(){ |
114 | 116 |
super.onStart(); |
... | ... | |
121 | 123 |
protected void onStop(){ |
122 | 124 |
super.onStop(); |
123 | 125 |
if(authenticating){ |
126 |
Log.d("info", "captin onstop called"); |
|
124 | 127 |
hideDialog(); |
125 | 128 |
authenticating = true; |
126 | 129 |
} |
127 | 130 |
} |
131 |
|
|
128 | 132 |
|
129 | 133 |
/* |
130 | 134 |
* if the application is password protected, |
... | ... | |
366 | 370 |
public void onActivityResult(int requestCode, int resultCode, Intent data) { |
367 | 371 |
super.onActivityResult(requestCode, resultCode, data); |
368 | 372 |
|
373 |
if(requestCode == 187){ |
|
374 |
hideDialog(); |
|
375 |
} |
|
376 |
|
|
369 | 377 |
if (resultCode == RESULT_OK && requestCode == 78) { |
370 | 378 |
Account acc = new Account(); |
371 | 379 |
Bundle b = data.getBundleExtra("accountInfo"); |
... | ... | |
399 | 407 |
|
400 | 408 |
private void showDialog() { |
401 | 409 |
authenticating = true; |
402 |
dialog = ProgressDialog.show(ListAccountsActivity.this, "", "Authenticating...", true); |
|
410 |
if(dialog == null || !dialog.isShowing()){ |
|
411 |
dialog = ProgressDialog.show(ListAccountsActivity.this, "", "Authenticating...", true); |
|
412 |
} |
|
403 | 413 |
} |
404 | 414 |
|
405 | 415 |
private void hideDialog() { |
... | ... | |
413 | 423 |
|
414 | 424 |
@Override |
415 | 425 |
protected void onPreExecute(){ |
426 |
Log.d("info", "auth show called"); |
|
416 | 427 |
showDialog(); |
417 | 428 |
} |
418 | 429 |
|
... | ... | |
451 | 462 |
} |
452 | 463 |
Flavor.setFlavors(flavorMap); |
453 | 464 |
hideDialog(); |
454 |
startActivity(tabViewIntent);
|
|
465 |
startActivityForResult(tabViewIntent, 187);
|
|
455 | 466 |
} else { |
456 | 467 |
hideDialog(); |
457 | 468 |
showAlert("Login Failure", "There was a problem loading server flavors. Please try again."); |
Also available in: Unified diff