From ccaad3b0a978e66a83c98b34fcc46609db9c8657 Mon Sep 17 00:00:00 2001 From: crised Date: Fri, 18 Oct 2019 14:43:29 -0300 Subject: [PATCH] possible SQL wear-api bug --- .../org/microg/gms/wearable/ConfigurationDatabaseHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/play-services-core/src/main/java/org/microg/gms/wearable/ConfigurationDatabaseHelper.java b/play-services-core/src/main/java/org/microg/gms/wearable/ConfigurationDatabaseHelper.java index 01c8a1a8d5..0a605b571e 100644 --- a/play-services-core/src/main/java/org/microg/gms/wearable/ConfigurationDatabaseHelper.java +++ b/play-services-core/src/main/java/org/microg/gms/wearable/ConfigurationDatabaseHelper.java @@ -33,6 +33,8 @@ public class ConfigurationDatabaseHelper extends SQLiteOpenHelper { public static final String NULL_STRING = "NULL_STRING"; public static final String TABLE_NAME = "connectionConfigurations"; public static final String BY_NAME = "name=?"; + public static final String BY_NODE_ANDROID_ID = "androidId=?"; + public ConfigurationDatabaseHelper(Context context) { super(context, "connectionconfig.db", null, 2); @@ -96,7 +98,7 @@ public void putConfiguration(ConnectionConfiguration config, String oldNodeId) { if (oldNodeId == null) { getWritableDatabase().insert(TABLE_NAME, null, contentValues); } else { - getWritableDatabase().update(TABLE_NAME, contentValues, "nodeId=?", new String[]{oldNodeId}); + getWritableDatabase().update(TABLE_NAME, contentValues, BY_NODE_ANDROID_ID, new String[]{oldNodeId}); } }