KeyChain: Add grants for existing keys on upgrade
When the KeyChain database is created or upgraded, create entries in the
grants table for keys that already exist in KeyStore.
This fixes a bug where keys that were installed in KeyStore but never
used (in O) are accessible in newer releases.
Change-Id: Ic4935c80f37d77a3c83fea172f30fb42623b3ff6
Merged-In: Ic4935c80f37d77a3c83fea172f30fb42623b3ff6
Bug: 120039077
Test: m -j RunKeyChainRoboTests
Test: Manual, flashed a sailfish device with O, installed a key, upgraded to P, made sure it's user-selectable.
4 files changed