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

Commit 083cf461 authored by Michaël Burtin's avatar Michaël Burtin Committed by Gerrit Code Review
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 9dd84b3f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -266,6 +266,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
@@ -265,6 +265,7 @@
  <java-symbol type="bool" name="config_sendAudioBecomingNoisy" />
  <java-symbol type="bool" name="config_enableScreenshotChord" />
  <java-symbol type="bool" name="config_bluetooth_default_profiles" />
  <java-symbol type="bool" name="config_wifiApFirmwareReload" />

  <java-symbol type="integer" name="config_cursorWindowSize" />
  <java-symbol type="integer" name="config_longPressOnPowerBehavior" />
+4 −1
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;
@@ -926,6 +927,8 @@ public class NetworkManagementService extends INetworkManagementService.Stub
            WifiConfiguration wifiConfig, String wlanIface, String softapIface) {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        try {
            Resources resources = mContext.getResources();
            if (resources.getBoolean(com.android.internal.R.bool.config_wifiApFirmwareReload))
                wifiFirmwareReload(wlanIface, "AP");
            if (wifiConfig == null) {
                mConnector.execute("softap", "set", wlanIface, softapIface);