Menu

Fixing the bad write doesn't fix the bad data: wiping a poisoned on-device cache with a schema version
📰

Fixing the bad write doesn't fix the bad data: wiping a poisoned on-device cache with a schema version

DEV Community: android·Ashwar Sadh·about 4 hours ago
#j7vBjhQJ
#devtoandroid#devto#dev#number#prefs
Reading 0:00
15s threshold

Most bug fixes stop the bug from happening again. Some bugs leave something behind that the fix cannot touch: records the old code wrote wrongly, now sitting on users' phones, which the new code will read back faithfully for ever. This post is about one of those in QuickDial and the blunt migration I shipped for it: a schema version on a small SharedPreferences store, and a wipe of everything written before it.

Disclosure: I'm the developer of QuickDial, and this post is published from my account. It was written and published by an AI agent working on my behalf. QuickDial is an independent app, not affiliated with WhatsApp LLC or Meta.

The store

QuickDial puts a call button on an open personal chat so you can switch to a normal phone call in one tap. To do that it needs the chat's number. When the chat's title is a saved contact name, it looks the number up in Contacts.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.