*/
public class AskPassword extends Activity {
- private boolean debug = true;
+ private boolean debug = false;
private static String TAG = "AskPassword";
public static String EXTRA_IS_LOCAL = "org.openintents.safe.bundle.EXTRA_IS_REMOTE";
private EditText nameText;
private Long RowId;
+ boolean populated = false;
Intent frontdoor;
private Intent restartTimerIntent=null;
-
+
BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(CryptoIntents.ACTION_CRYPTO_LOGGED_OUT)) {
});
}
-
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
}
}
+ @Override
+ protected void onRestoreInstanceState(Bundle inState) {
+ super.onRestoreInstanceState(inState);
+
+ if (debug) Log.d(TAG,"onRestoreInstanceState("+inState+")");
+ // because the various EditText automatically handle state
+ // when we come back there is no need to re-populate
+ populated=true;
+ }
+
@Override
protected void onPause() {
super.onPause();
super.onResume();
if (debug) Log.d(TAG, "onResume");
if (!CategoryList.isSignedIn()) {
- Intent frontdoor = new Intent(this, FrontDoor.class);
startActivity(frontdoor);
return;
}
*/
private void populateFields() {
if (debug) Log.d(TAG, "populateFields");
+ if (populated) {
+ return;
+ }
if ((RowId != null) && (RowId > 0)) {
CategoryEntry catEntry = Passwords.getCategoryEntry(RowId);
if (catEntry==null) {
}
nameText.setText(catEntry.plainName);
}
+ populated=true;
}
@Override
*/
public class CategoryList extends ListActivity {
- private static boolean debug = true;
+ private static boolean debug = false;
private static final String TAG = "CategoryList";
// Menu Item order
*/\r
public class IntentHandler extends Activity {\r
\r
- private static final boolean debug = true;\r
+ private static final boolean debug = false;\r
private static String TAG = "IntentHandler";\r
\r
private static final int REQUEST_CODE_ASK_PASSWORD = 1;\r
*/
public class PassEdit extends Activity {
- private static boolean debug = true;
+ private static boolean debug = false;
private static String TAG = "PassEdit";
public static final int REQUEST_GEN_PASS = 10;
if (debug) Log.d(TAG,"onResume()");
if (CategoryList.isSignedIn()==false) {
- if (Passwords.isCryptoInitialized()) {
- saveState();
- }
+// if (Passwords.isCryptoInitialized()) {
+// saveState();
+// }
startActivity(frontdoor);
return;
}
}
}
- /**
- * Get the text from an EditText field.
- *
- * @param e EditText to retrieve text from.
- * @return The field's text. If e==null returns null.
- */
- private String getTextFromField(EditText e) {
- if (e==null) {
- return null;
- }
- return e.getText().toString();
- }
-
@Override
public void onUserInteraction() {
super.onUserInteraction();
*/
public class PassList extends ListActivity {
- private static final boolean debug = true;
+ private static final boolean debug = false;
private static final String TAG = "PassList";
// Menu Item order
*/
public class PassView extends Activity implements View.OnClickListener {
- private static boolean debug = true;
+ private static boolean debug = false;
private static String TAG = "PassView";
public static final int EDIT_PASSWORD_INDEX = Menu.FIRST;
*/
public class Passwords {
- private static final boolean debug = true;
+ private static final boolean debug = false;
private static final String TAG = "Passwords";
private static HashMap<Long, PassEntry> passEntries=null;