callbackIntent = getSetPassword (thisIntent, callbackIntent);\r
callbackResult = RESULT_OK;\r
} catch (CryptoHelperException e) {\r
- Log.e(TAG, e.toString());\r
+ Log.e(TAG, e.toString(), e);\r
Toast.makeText(FrontDoor.this,\r
"There was a crypto error while retreiving the requested password: " + e.getMessage(),\r
Toast.LENGTH_SHORT).show();\r
} catch (Exception e) {\r
- Log.e(TAG, e.toString());\r
+ Log.e(TAG, e.toString(), e);\r
//TODO: Turn this into a proper error dialog.\r
Toast.makeText(FrontDoor.this,\r
"There was an error in retreiving the requested password: " + e.getMessage(),\r
String clearUniqueName = thisIntent.getStringExtra (CryptoIntents.EXTRA_UNIQUE_NAME);\r
\r
if (clearUniqueName == null) throw new Exception ("EXTRA_UNIQUE_NAME not set.");\r
+ \r
+ if (dbHelper == null) {\r
+ // Need to open DBHelper here, because\r
+ // onResume() is called after onActivityResult()\r
+ dbHelper = new DBHelper(this);\r
+ }\r
\r
String uniqueName = ch.encrypt(clearUniqueName);\r
PassEntry row = dbHelper.fetchPassword(uniqueName);\r