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

Commit 20828864 authored by Andreas Schneider's avatar Andreas Schneider Committed by Gerrit Code Review
Browse files

services: Fix tethering (softap) startup.

The interface must be started after firmware reload. If it's not
started, the driver is unable to configure it.

Thanks to Emerson Pinter <dev@pinter.com.br> for the jb version of this.

Change-Id: If8819d463d8c3820e2e159cd365f8ba4af8c0064
parent de3f375e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -305,6 +305,10 @@
         Default value is 2 minutes. -->
    <integer translatable="false" name="config_wifi_driver_stop_delay">120000</integer>

    <!-- Boolean indicating whether the start command should be called on the wireless interface
         when starting the SoftAp -->
    <bool name="config_wifiApStartInterface">false</bool>

    <!-- Flag indicating whether the we should enable the automatic brightness in Settings.
         Software implementation will be used if config_hardware_auto_brightness_available is not set -->
    <bool name="config_automatic_brightness_available">false</bool>
+2 −0
Original line number Diff line number Diff line
@@ -1887,4 +1887,6 @@
  <java-symbol type="string" name="toast_rotation_unlocked" />
  <java-symbol type="string" name="toast_rotation_locked" />

  <!-- Wifi -->
  <java-symbol type="bool" name="config_wifiApStartInterface" />
</resources>
+5 −0
Original line number Diff line number Diff line
@@ -1012,6 +1012,11 @@ public class NetworkManagementService extends INetworkManagementService.Stub
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        try {
            wifiFirmwareReload(wlanIface, "AP");

            if (mContext.getResources().getBoolean(
                        com.android.internal.R.bool.config_wifiApStartInterface)) {
                mConnector.execute("softap", "start", wlanIface);
            }
            if (wifiConfig == null) {
                mConnector.execute("softap", "set", wlanIface);
            } else {