Commit d015ede7 authored by Ricki Hirner's avatar Ricki Hirner

Specify account when updating all events

parent d0adb639
......@@ -93,7 +93,9 @@ abstract class AndroidCalendar<out T: AndroidEvent>(
// unassign colors from events
val values = ContentValues(1)
values.putNull(Events.EVENT_COLOR_KEY)
provider.update(syncAdapterURI(Events.CONTENT_URI, account), values, "${Events.EVENT_COLOR_KEY} IS NOT NULL", null)
provider.update(syncAdapterURI(Events.CONTENT_URI, account), values,
"${Events.EVENT_COLOR_KEY} IS NOT NULL AND ${Events.ACCOUNT_TYPE}=? AND ${Events.ACCOUNT_NAME}=?",
arrayOf(account.type, account.name))
// remove color entries
provider.delete(syncAdapterURI(Colors.CONTENT_URI, account), null, null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment