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

Commit f4dff961 authored by Michaël Burtin's avatar Michaël Burtin Committed by David Hacker
Browse files

frameworks/base: support devices with SoftAp that don't require firmware reload

Partial forward port from ICS.
Original Change-Id: If2db6e8ce675c3214ce645231c7a354f41ea0cc6

Change-Id: Iacb2498ec0f567a0a7c4e0dbf9127b70f09223bd
parent 70349642
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -330,6 +330,9 @@
         note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
    <string translatable="false" name="config_tether_apndata"></string>

    <!-- Boolean indicating whether Softap requires reloading AP firmware -->
    <bool name="config_wifiApFirmwareReload">true</bool>

    <!-- Boolean indicating whether the wifi chipset has dual frequency band support -->
    <bool translatable="false" name="config_wifi_dual_band_support">false</bool>

+2 −0
Original line number Diff line number Diff line
@@ -2170,4 +2170,6 @@
  <java-symbol type="bool" name="config_softap_extention" />

  <java-symbol type="bool" name="config_enable_mms_with_mobile_data_off" />

  <java-symbol type="bool" name="config_wifiApFirmwareReload" />
</resources>
+5 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import static com.android.server.NetworkManagementService.NetdResponseCode.TtyLi
import static com.android.server.NetworkManagementSocketTagger.PROP_QTAGUID_ENABLED;

import android.content.Context;
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.INetworkManagementEventObserver;
import android.net.InterfaceConfiguration;
@@ -1403,7 +1404,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub
            WifiConfiguration wifiConfig, String wlanIface) {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        try {
            if (mContext.getResources().getBoolean(
                        com.android.internal.R.bool.config_wifiApFirmwareReload)) {
                wifiFirmwareReload(wlanIface, "AP");
            }
            if (wifiConfig == null) {
                mConnector.execute("softap", "set", wlanIface);
            } else {