From: peli0101 Date: Fri, 30 Jan 2009 09:45:47 +0000 (+0000) Subject: OI Safe: Fix issue 197, by moving initService() from onCreate() to onResume(). X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=b33a20f4b0877f7fa29a148b7a34107f8b7d8e4f;p=android-vcpass-oisafe OI Safe: Fix issue 197, by moving initService() from onCreate() to onResume(). git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1878 72b678ce-9140-0410-bee8-679b907dd61a --- diff --git a/src/org/openintents/safe/IntentHandler.java b/src/org/openintents/safe/IntentHandler.java index 371a041..483824a 100644 --- a/src/org/openintents/safe/IntentHandler.java +++ b/src/org/openintents/safe/IntentHandler.java @@ -74,7 +74,8 @@ public class IntentHandler extends Activity { super.onCreate(icicle); mServiceIntent = null; mPreferences = PreferenceManager.getDefaultSharedPreferences(this); - initService(); // start up the PWS service so other applications can query. + + // The service is launched in onResume() } @@ -422,7 +423,8 @@ public class IntentHandler extends Activity { if (dbHelper == null) { dbHelper = new DBHelper(this); } - + + initService(); // start up the PWS service so other applications can query. } @Override @@ -476,10 +478,10 @@ public class IntentHandler extends Activity { return; } - boolean promptforpassword = getIntent().getBooleanExtra(CryptoIntents.EXTRA_PROMPT, true); - if (debug) Log.d(TAG, "Prompt for password: " + promptforpassword); try { if (service.getPassword() == null) { + boolean promptforpassword = getIntent().getBooleanExtra(CryptoIntents.EXTRA_PROMPT, true); + if (debug) Log.d(TAG, "Prompt for password: " + promptforpassword); if (promptforpassword) { if (debug) Log.d(TAG, "ask for password"); // the service isn't running