summaryrefslogtreecommitdiff
path: root/wifi
diff options
context:
space:
mode:
author Gabriel Biren <gbiren@google.com> 2024-02-09 22:24:40 +0000
committer Gabriel Biren <gbiren@google.com> 2024-02-13 18:31:35 +0000
commitf7be7833c39bb98136a6b836ab92cde79b8d93f7 (patch)
tree89b65b27e6abbda825cc53fe1e21756456fc0463 /wifi
parent72dc708c55a89080e0a6ae529b818fbe6e034e55 (diff)
Upgrade WifiKeystore to @SystemApi.
Previously, these APIs were annoted with @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES). Bug: 324601616 Bug: 296077015 Test: Manual test - create local shell command to write/read to WifiKeystore. Verify that all operations work as expected. Change-Id: I59259019ad631472a87ebd6bdad3bced983ac8ef
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/src/android/net/wifi/WifiKeystore.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/wifi/java/src/android/net/wifi/WifiKeystore.java b/wifi/java/src/android/net/wifi/WifiKeystore.java
index ca86dde2fa45..1cda0326bf6c 100644
--- a/wifi/java/src/android/net/wifi/WifiKeystore.java
+++ b/wifi/java/src/android/net/wifi/WifiKeystore.java
@@ -16,6 +16,7 @@
package android.net.wifi;
import android.annotation.NonNull;
+import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.os.Process;
import android.os.ServiceManager;
@@ -24,9 +25,11 @@ import android.security.legacykeystore.ILegacyKeystore;
import android.util.Log;
/**
- * @hide This class allows wifi framework to store and access wifi certificate blobs.
+ * This class allows the storage and retrieval of non-standard Wifi certificate blobs.
+ * @hide
*/
-@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
+@SystemApi
+@SuppressLint("UnflaggedApi") // Promoting from @SystemApi(MODULE_LIBRARIES)
public final class WifiKeystore {
private static final String TAG = "WifiKeystore";
private static final String LEGACY_KEYSTORE_SERVICE_NAME = "android.security.legacykeystore";
@@ -48,7 +51,8 @@ public final class WifiKeystore {
* @return true if the blob was successfully added. False otherwise.
* @hide
*/
- @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
+ @SystemApi
+ @SuppressLint("UnflaggedApi")
public static boolean put(@NonNull String alias, @NonNull byte[] blob) {
try {
Log.i(TAG, "put blob. alias " + alias);
@@ -68,7 +72,8 @@ public final class WifiKeystore {
* Returns null if no blob was found.
* @hide
*/
- @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
+ @SystemApi
+ @SuppressLint("UnflaggedApi")
public static @NonNull byte[] get(@NonNull String alias) {
try {
Log.i(TAG, "get blob. alias " + alias);
@@ -89,7 +94,8 @@ public final class WifiKeystore {
* @return True if a blob was removed. False if no such blob was found.
* @hide
*/
- @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
+ @SystemApi
+ @SuppressLint("UnflaggedApi")
public static boolean remove(@NonNull String alias) {
try {
getService().remove(alias, Process.WIFI_UID);
@@ -110,7 +116,8 @@ public final class WifiKeystore {
* The return value may be empty but never null.
* @hide
*/
- @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
+ @SystemApi
+ @SuppressLint("UnflaggedApi")
public static @NonNull String[] list(@NonNull String prefix) {
try {
final String[] aliases = getService().list(prefix, Process.WIFI_UID);
@@ -123,4 +130,4 @@ public final class WifiKeystore {
}
return new String[0];
}
-} \ No newline at end of file
+}