From: isaac.jones Date: Sun, 18 Jan 2009 01:01:39 +0000 (+0000) Subject: Fix bug where item gets created twice when user hits "save" since the X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=57c3952fdf7949b27e73006acb2a59258d2d9213;p=android-vcpass-oisafe Fix bug where item gets created twice when user hits "save" since the item is saved during onPause as well as saved. Repaired by setting the row id when adding the password for the first time since this prevents the 2nd time around from adding it again. git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1759 72b678ce-9140-0410-bee8-679b907dd61a --- diff --git a/src/org/openintents/safe/PassEdit.java b/src/org/openintents/safe/PassEdit.java index 3f1df13..58cf7f5 100644 --- a/src/org/openintents/safe/PassEdit.java +++ b/src/org/openintents/safe/PassEdit.java @@ -185,7 +185,7 @@ public class PassEdit extends Activity { } if (RowId == null || RowId == -1) { - dbHelper.addPassword(entry); + RowId = dbHelper.addPassword(entry); } else { PassEntry storedEntry = dbHelper.fetchPassword (RowId); //update fields that aren't set in the UI: