Merge "KeyStore: stop using state()"