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

Commit df3ad8c5 authored by Jimmy Chen's avatar Jimmy Chen
Browse files

wifi: extend feature flag from int to long

WiFi features run out of all 32 bits of int.
Extend feature flag from int to long for more bits.

Bug: 122939035
Test: build
Test: atest frameworks/opt/net/wifi/tests/wifitests
Change-Id: I7e2bcc03d24940e95e22f5fc34070cf4aebfadfd
parent 0b2f7bab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ import android.os.WorkSource;
 */
interface IWifiManager
{
    int getSupportedFeatures();
    long getSupportedFeatures();

    WifiActivityEnergyInfo reportActivityInfo();

+2 −2
Original line number Diff line number Diff line
@@ -2055,7 +2055,7 @@ public class WifiManager {
    /** @hide */
    public static final int WIFI_FEATURE_DPP              = 0x80000000; // DPP (Easy-Connect)

    private int getSupportedFeatures() {
    private long getSupportedFeatures() {
        try {
            return mService.getSupportedFeatures();
        } catch (RemoteException e) {
@@ -2063,7 +2063,7 @@ public class WifiManager {
        }
    }

    private boolean isFeatureSupported(int feature) {
    private boolean isFeatureSupported(long feature) {
        return (getSupportedFeatures() & feature) == feature;
    }
    /**
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ public class BaseWifiService extends IWifiManager.Stub {
    private static final String TAG = BaseWifiService.class.getSimpleName();

    @Override
    public int getSupportedFeatures() {
    public long getSupportedFeatures() {
        throw new UnsupportedOperationException();
    }