KeyStore: stop using state()

Change-Id: I36c726efb5af3534ddc53e293adb1654564de42a