]> hydra-www.ietfng.org Git - android-vcpass-oisafe/commitdiff
OI Safe: Fix issue 197, by moving initService() from onCreate() to onResume().
authorpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Fri, 30 Jan 2009 09:45:47 +0000 (09:45 +0000)
committerpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Fri, 30 Jan 2009 09:45:47 +0000 (09:45 +0000)
git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1878 72b678ce-9140-0410-bee8-679b907dd61a

src/org/openintents/safe/IntentHandler.java

index 371a0414b84287cbf84a3934c0402bf1233901a0..483824affd1565a22ccfea15b0698174aa5d12ed 100644 (file)
@@ -74,7 +74,8 @@ public class IntentHandler extends Activity {
                super.onCreate(icicle);\r
                mServiceIntent = null;\r
                mPreferences = PreferenceManager.getDefaultSharedPreferences(this);\r
-               initService(); // start up the PWS service so other applications can query.\r
+               \r
+               // The service is launched in onResume()\r
        }\r
 \r
        \r
@@ -422,7 +423,8 @@ public class IntentHandler extends Activity {
                if (dbHelper == null) {\r
                        dbHelper = new DBHelper(this);\r
                }\r
-\r
+               \r
+               initService(); // start up the PWS service so other applications can query.\r
        }\r
        \r
        @Override\r
@@ -476,10 +478,10 @@ public class IntentHandler extends Activity {
                                return;\r
                        }\r
                        \r
-                       boolean promptforpassword = getIntent().getBooleanExtra(CryptoIntents.EXTRA_PROMPT, true);\r
-                       if (debug) Log.d(TAG, "Prompt for password: " + promptforpassword);\r
                        try {\r
                                if (service.getPassword() == null) {\r
+                                       boolean promptforpassword = getIntent().getBooleanExtra(CryptoIntents.EXTRA_PROMPT, true);\r
+                                       if (debug) Log.d(TAG, "Prompt for password: " + promptforpassword);\r
                                        if (promptforpassword) {\r
                                                if (debug) Log.d(TAG, "ask for password");\r
                                                // the service isn't running\r