diff options
author | 2025-02-25 10:34:07 -0800 | |
---|---|---|
committer | 2025-02-25 10:34:07 -0800 | |
commit | 06f77c0071ae9beed06da3e931d5f9b27ecfb0b8 (patch) | |
tree | 93ca9d18338f850bba6a8a3ef0a60316889e4afa /framework/java | |
parent | 297557b1c9ef940650bd3c18a7e3161ce70fe5b1 (diff) | |
parent | 259cc5ad4505b658447c542df81474b7889bb8d6 (diff) |
Merge "Add a method to check whether mainline supplicant is available." into main
Diffstat (limited to 'framework/java')
-rw-r--r-- | framework/java/android/net/wifi/util/Environment.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/framework/java/android/net/wifi/util/Environment.java b/framework/java/android/net/wifi/util/Environment.java index f98265845a..a20b24744d 100644 --- a/framework/java/android/net/wifi/util/Environment.java +++ b/framework/java/android/net/wifi/util/Environment.java @@ -46,6 +46,12 @@ public class Environment { new File("/apex", WIFI_APEX_NAME).getAbsolutePath(); /** + * Path to the mainline supplicant binary. + */ + private static final String MAINLINE_SUPPLICANT_BINARY_PATH = + WIFI_APEX_PATH + "/bin/wpa_supplicant_mainline"; + + /** * Wifi shared folder. */ public static File getWifiSharedDirectory() { @@ -69,6 +75,13 @@ public class Environment { } /** + * Returns true if the mainline supplicant binary is in the Wifi Apex. + */ + public static boolean isMainlineSupplicantBinaryInWifiApex() { + return new File(MAINLINE_SUPPLICANT_BINARY_PATH).isFile(); + } + + /** * Return whether the VNDK version of the vendor partition is newer than the given API level. * If the property is set to non-integer value, this means the vendor partition is using * current API level and true is returned. |