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

Commit 7039b79e authored by Michaël Burtin's avatar Michaël Burtin Committed by Ricardo Cerqueira
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

Conflicts:

	core/res/res/values/public.xml
	services/java/com/android/server/NetworkManagementService.java
parent daeffe18
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -320,6 +320,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>

+1 −0
Original line number Diff line number Diff line
@@ -1810,4 +1810,5 @@

  <!-- Wifi -->
  <java-symbol type="bool" name="config_wifiApStartInterface" />
  <java-symbol type="bool" name="config_wifiApFirmwareReload" />
</resources>
+5 −2
Original line number Diff line number Diff line
@@ -36,6 +36,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.INetworkManagementEventObserver;
import android.net.InterfaceConfiguration;
import android.net.LinkAddress;
@@ -1075,8 +1076,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 (mContext.getResources().getBoolean(
                        com.android.internal.R.bool.config_wifiApStartInterface)) {
                mConnector.execute("softap", "start", wlanIface);