From: peli0101 Date: Mon, 2 Feb 2009 00:38:22 +0000 (+0000) Subject: OI Notepad, OI Safe: Update DialogHostingActivity so that dialog stays open after... X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=83a03b6c8a8d0deef35d9aed820ffe0983877c1d;p=android-vcpass-oisafe OI Notepad, OI Safe: Update DialogHostingActivity so that dialog stays open after screen orientation change. git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1896 72b678ce-9140-0410-bee8-679b907dd61a --- diff --git a/src/org/openintents/safe/dialog/DialogHostingActivity.java b/src/org/openintents/safe/dialog/DialogHostingActivity.java index 9f22bbc..35a26c5 100644 --- a/src/org/openintents/safe/dialog/DialogHostingActivity.java +++ b/src/org/openintents/safe/dialog/DialogHostingActivity.java @@ -187,10 +187,19 @@ public class DialogHostingActivity extends Activity { protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (debug) Log.d(TAG, "onSaveInstanceState"); + // It is important to set mIsPausing here, so that + // the dialog does not get closed on orientation changes. mIsPausing = true; if (debug) Log.d(TAG, "onSaveInstanceState. Pausing: " + mIsPausing); } - + @Override + protected void onResume() { + if (debug) Log.d(TAG, "onResume"); + super.onResume(); + // In case another activity is called, and we are resumed, + // mIsPausing should be reset to its original state. + mIsPausing = false; + } }