Merge branch 'master' of github.com:callback/callback-android

This commit is contained in:
Joe Bowser 2011-10-25 15:21:15 -07:00
commit 505081f42f

View File

@ -1410,6 +1410,7 @@ public class DroidGap extends PhonegapActivity {
* End this activity by calling finish for activity * End this activity by calling finish for activity
*/ */
public void endActivity() { public void endActivity() {
this.activityState = ACTIVITY_EXITING;
this.finish(); this.finish();
} }
@ -1445,6 +1446,7 @@ public class DroidGap extends PhonegapActivity {
// If not, then invoke behavior of super class // If not, then invoke behavior of super class
else { else {
this.activityState = ACTIVITY_EXITING;
return super.onKeyDown(keyCode, event); return super.onKeyDown(keyCode, event);
} }
} }
@ -1534,7 +1536,7 @@ public class DroidGap extends PhonegapActivity {
* @param description A String describing the error. * @param description A String describing the error.
* @param failingUrl The url that failed to load. * @param failingUrl The url that failed to load.
*/ */
public void onReceivedError(int errorCode, String description, String failingUrl) { public void onReceivedError(final int errorCode, final String description, final String failingUrl) {
final DroidGap me = this; final DroidGap me = this;
// If errorUrl specified, then load it // If errorUrl specified, then load it
@ -1551,9 +1553,13 @@ public class DroidGap extends PhonegapActivity {
// If not, then display error dialog // If not, then display error dialog
else { else {
me.runOnUiThread(new Runnable() {
public void run() {
me.appView.setVisibility(View.GONE); me.appView.setVisibility(View.GONE);
me.displayError("Application Error", description + " ("+failingUrl+")", "OK", true); me.displayError("Application Error", description + " ("+failingUrl+")", "OK", true);
} }
});
}
} }
/** /**