(To the tune of “I kissed a girl”)

I fixed a bug, and I liked it (Android has a max bundle size).

I fixed a bug, you should try it (import six thousand public keys).

It’s a terrible hack, it’s a Hashmap. But hey, it works.

It violates bundle life times, but that doesn’t matter.

Okay, so more seriously: OpenKeychain had a bug that meant that importing a REALLY big keychain would fail spectacularly because the Android platform only allows for moving bundles up to 1MB in size. I fixed this by identifying the thing that was causing the actual problem (the log generated from key import was greater than 1MB when serialized for a bundle) so I built a log cache of the import and its results. When you un-bundled the bundle, it would re-attach the previously detached log archive. This was only needed for one small point during import, and wasn’t used anywhere else, so I felt comfortable with the trade-off that came with it.