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

Commit ae4fa5b7 authored by Meninblack007's avatar Meninblack007
Browse files

Revert "Revert "Wifi: Introduce additional APIs to support STA + SoftAp concurrency""

This reverts commit edbd6dbf.
parent d5484368
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -455,4 +455,13 @@ interface INetworkManagementService
    int removeRoutesFromLocalNetwork(in List<RouteInfo> routes);

    void setAllowOnlyVpnForUids(boolean enable, in UidRange[] uidRanges);
    /**
     * Create SoftAp Interface
     */
    void createSoftApInterface(String wlanIface);

     /**
     * Delete SoftAp Interface
     */
    void deleteSoftApInterface(String wlanIface);
}
+20 −0
Original line number Diff line number Diff line
@@ -1288,6 +1288,26 @@ public class NetworkManagementService extends INetworkManagementService.Stub
        }
    }

    @Override
    public void createSoftApInterface(String wlanIface) {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        try {
            mConnector.execute("softap", "create", wlanIface);
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
        }
    }

    @Override
    public void deleteSoftApInterface(String wlanIface) {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        try {
            mConnector.execute("softap", "remove", wlanIface);
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
        }
    }

    @Override
    public void startTethering(String[] dhcpRange) {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
+2 −0
Original line number Diff line number Diff line
@@ -169,5 +169,7 @@ interface IWifiManager
    void factoryReset();

    Network getCurrentNetwork();

    boolean getWifiStaSapConcurrency();
}
+15 −0
Original line number Diff line number Diff line
@@ -2706,6 +2706,21 @@ public class WifiManager {
        }
    }

    /**
     * get concurrency support
     *
     * @return true if concurrency is allowed.
     *
     * @hide no intent to publish
     */
    public boolean getWifiStaSapConcurrency() {
        try {
            return mService.getWifiStaSapConcurrency();
        } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Resets all wifi manager settings back to factory defaults.
     *