sqlcipher / sqlcipher-android-tests

A collection of tests that can be run on an emulator or device to verify SQLCipher for Android.
Other
94 stars 66 forks source link

Test code for PRAGMA cipher_migrate; #45

Closed niloct closed 5 months ago

niloct commented 5 months ago

Hello,

After some research on the web, I've found your repo test code for sqlcipher lib migration (i.e. which calls PRAGMA cipher_migrate;), and that helped me a lot. Thanks for it!

Then, I had a question on this line:

https://github.com/sqlcipher/sqlcipher-android-tests/blob/b4c93ae8007db476e0fe063accb28980fef74aa3/app/src/main/java/net/zetetic/tests/CipherMigrateTest.java#L18

Couldn't it just be:

boolean status = false;

And then treat the rest of the method code to update this variable ?

niloct commented 5 months ago

ok, I've figured it out, compiler alerted that the variable had to be final, so your solution is a way to allow it to be changed inside the post hook.