]> hydra-www.ietfng.org Git - android-vcpass-oisafe/commitdiff
OI Notepad, OI Safe: Update DialogHostingActivity so that dialog stays open after...
authorpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Mon, 2 Feb 2009 00:38:22 +0000 (00:38 +0000)
committerpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Mon, 2 Feb 2009 00:38:22 +0000 (00:38 +0000)
git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1896 72b678ce-9140-0410-bee8-679b907dd61a

src/org/openintents/safe/dialog/DialogHostingActivity.java

index 9f22bbc04eabfd56a6932c2c107cae4d54352f4c..35a26c5a9fe727fcb90155309f9194fa06337d67 100644 (file)
@@ -187,10 +187,19 @@ public class DialogHostingActivity extends Activity {
        protected void onSaveInstanceState(Bundle outState) {\r
                super.onSaveInstanceState(outState);\r
                if (debug) Log.d(TAG, "onSaveInstanceState");\r
+               // It is important to set mIsPausing here, so that\r
+               // the dialog does not get closed on orientation changes.\r
                mIsPausing = true;\r
                if (debug) Log.d(TAG, "onSaveInstanceState. Pausing: " + mIsPausing);\r
        }\r
        \r
-       \r
+       @Override\r
+       protected void onResume() {\r
+               if (debug) Log.d(TAG, "onResume");\r
+               super.onResume();\r
+               // In case another activity is called, and we are resumed,\r
+               // mIsPausing should be reset to its original state.\r
+               mIsPausing = false;\r
+       }\r
        \r
 }\r