Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c230e33f authored by Eric Biggers's avatar Eric Biggers
Browse files

Remove KeyStore#state()

Remove AndroidKeyStoreMaintenance#getState() and both overloads of
KeyStore#state().  None of these are used by platform code anymore.

The two KeyStore#state() methods do have @UnsupportedAppUsage, as do two
values of the State enum: UNLOCKED and LOCKED.  However, there is a
clear public API equivalent for apps that may be checking these states:
UserManager#isUserUnlocked().  Therefore, according to the policy on
unsupported usage of internal APIs, we can remove these internal APIs.

Also, the non-SDK dashboard has no runtime results for either method,
and only one static analysis result which is from unused code in one
app.  This is consistent with these methods being entirely unused.

Part of the motivation for removing these internal APIs is that upcoming
changes to the lifetime of keystore superencryption keys would change
the behavior of getState.  So it seems like a good time to remove this
unused/unsupported code instead of wasting time maintaining it.

Bug: 296464083
Test: atest -p --include-subdirs system/security/keystore2
Change-Id: Iff821bbdeac5ee0653c9c71867fd53d38cb4d48f
parent 7df13d67
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment