[Verizon Samsung Galaxy S6] gr8nole:
What does this mod do?

This mod disables the popup that warns about disabling wifi when you enable the Hotspot feature from the Notification panel quicksetting toggle. The popup normally only occurs when wifi is enabled, so this will prevent that popup.

This does not disable the warning if you enable hotspot from the Settings menu.

What app needs modifying?

SecSettings2.apk - must be deodexed app because we will be editing smali code.

The mod:

Decompile your deodexed SecSettings2.apk

Open smali\com\android\settings\wifi\mobileap\WifiApWarning.smali with a text editor

Search for

.local v1, "wifiState":I

Enter the following code on a new line just below that line

goto :cond_5

Save and recompile.

Final code should look like this:

.local v1, "wifiState":I

[COLOR="Blue"]goto :cond_5[/COLOR]

if-eq v1, v5, :cond_4

if-eqz v1, :cond_4

const/4 v2, 0x4

if-eq v1, v2, :cond_4

.line 786
invoke-direct {p0, v6}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V

goto :goto_0

.line 787
:cond_4
invoke-direct {p0}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->isP2pEnabled()Z

move-result v2

if-eqz v2, :cond_5

.line 788
const-string v2, "WifiApWarning"

const-string v3, "WiFi p2p on. Create dailog"

invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

.line 789
invoke-direct {p0, v7}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V

goto :goto_0

.line 791
:cond_5
invoke-direct {p0, v4}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->startProvisioningIfNecessary(I)V

goto :goto_0
.end method

The entire disableWifiDialog method is here:

.method private disableWifiDialog()V
.locals 8

.prologue
const/16 v7, 0x1f

const/16 v6, 0x1e

const/4 v5, 0x1

const/4 v4, 0x0

.line 771
const-string v2, "TMO"

const-string v3, "VZW"

invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v2

if-nez v2, :cond_0

const-string v2, "NEWCO"

const-string v3, "VZW"

invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v2

if-eqz v2, :cond_3

.line 773
:cond_0
iget-object v2, p0, Lcom/android/settings/wifi/mobileap/WifiApWarning;->mConnectivityManager:Landroid/net/ConnectivityManager;

invoke-virtual {v2, v5}, Landroid/net/ConnectivityManager;->getNetworkInfo(I)Landroid/net/NetworkInfo;

move-result-object v0

.line 774
.local v0, "netInfo":Landroid/net/NetworkInfo;
sget-object v2, Landroid/net/NetworkInfo$DetailedState;->CONNECTED:Landroid/net/NetworkInfo$DetailedState;

invoke-virtual {v0}, Landroid/net/NetworkInfo;->getDetailedState()Landroid/net/NetworkInfo$DetailedState;

move-result-object v3

invoke-virtual {v2, v3}, Landroid/net/NetworkInfo$DetailedState;->equals(Ljava/lang/Object;)Z

move-result v2

if-eqz v2, :cond_1

.line 775
invoke-direct {p0, v6}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V

.line 794
.end local v0 # "netInfo":Landroid/net/NetworkInfo;
:goto_0
return-void

.line 776
.restart local v0 # "netInfo":Landroid/net/NetworkInfo;
:cond_1
invoke-direct {p0}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->isP2pConnected()Z

move-result v2

if-eqz v2, :cond_2

.line 777
const-string v2, "WifiApWarning"

const-string v3, "WiFi p2p is connected. Create dailog"

invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

.line 778
invoke-direct {p0, v7}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V

goto :goto_0

.line 780
:cond_2
invoke-direct {p0, v4}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->startProvisioningIfNecessary(I)V

goto :goto_0

.line 783
.end local v0 # "netInfo":Landroid/net/NetworkInfo;
:cond_3
iget-object v2, p0, Lcom/android/settings/wifi/mobileap/WifiApWarning;->mWifiManager:Landroid/net/wifi/WifiManager;

invoke-virtual {v2}, Landroid/net/wifi/WifiManager;->getWifiState()I

move-result v1

.line 784
.local v1, "wifiState":I

[COLOR="Blue"]goto :cond_5[/COLOR]

if-eq v1, v5, :cond_4

if-eqz v1, :cond_4

const/4 v2, 0x4

if-eq v1, v2, :cond_4

.line 786
invoke-direct {p0, v6}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V

goto :goto_0

.line 787
:cond_4
invoke-direct {p0}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->isP2pEnabled()Z

move-result v2

if-eqz v2, :cond_5

.line 788
const-string v2, "WifiApWarning"

const-string v3, "WiFi p2p on. Create dailog"

invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

.line 789
invoke-direct {p0, v7}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->showNextHotspotDialog(I)V

goto :goto_0

.line 791
:cond_5
invoke-direct {p0, v4}, Lcom/android/settings/wifi/mobileap/WifiApWarning;->startProvisioningIfNecessary(I)V

goto :goto_0
.end method

How does this mod work?

When the hotspot is enabled, a check is performed to see if wifi is enabled, and if it is, a popup message is displayed to warn the user that wifi will be disabled while the hotspot is enabled.

By inserting the "goto :cond_5", the comparision checks of "wifiState" are skipped, so the warning does not get created.

Tips:

If you have trouble recompiling the resources after making the mod:

The classes.dex normally get compiled before the resources

Simply find the newly compiled classes.dex in the output folder and copy it back into the old deodexed app (7zip).

Disclaimer:

While there are many other threads about this type of mod for KitKat and earlier versions, I could not find any thread for Lollipop. I am not responsible for any mods that you make to your phone. Always make a backup first.