From 23da30e29c15ac47aab3fa7ec7091d22dbf86177 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 26 Oct 2010 15:18:44 +0100 Subject: Implement the "Delete Profile" button in the AutoFill editor. Sync a null profile to BrowserSettings and remove the current profile data from the editor UI and database. Change-Id: I9ee911640882841b500914be5c381f686bc20e81 --- src/com/android/browser/AutoFillProfileDatabase.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/com/android/browser/AutoFillProfileDatabase.java') diff --git a/src/com/android/browser/AutoFillProfileDatabase.java b/src/com/android/browser/AutoFillProfileDatabase.java index 0204d7e90..3345e9258 100644 --- a/src/com/android/browser/AutoFillProfileDatabase.java +++ b/src/com/android/browser/AutoFillProfileDatabase.java @@ -142,6 +142,12 @@ public class AutoFillProfileDatabase { null, null, null, "1"); } + public void dropProfile(int id) { + final String sql = "DELETE FROM " + PROFILES_TABLE_NAME +" WHERE " + Profiles._ID + " = ?;"; + final Object[] params = { id }; + getDatabase(true).execSQL(sql, params); + } + public void close() { mOpenHelper.close(); } -- cgit v1.2.3