Encrypting database with Room createFromAsset() method

createFromAsset() copies the asset into position to serve as a database. Room handles that on its own — SupportFactory is not involved. Hence, if MyDatabase.db is not encrypted, the result of createFromAsset() should be an unencrypted database, and that will not work with SupportFactory.

I have filed an issue to try to get Room to support this scenario better.

It is theoretically possible that there is a way to craft some sort of hook SQL that can detect this scenario and encrypt the database on first use, but I have not researched how to pull that off.