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

Commit 1ce6d4d9 authored by Adithya R's avatar Adithya R Committed by Michael Bestas
Browse files

Settings: Reset tether offload developer setting correctly

Tethering offload is enabled by default, i.e tether_offload_disabled is 0.
When developer settings is disabled, we want it set back to 0 i.e
tethering offload enabled.

Change-Id: I71b7fd04cf01b0cfa40b36568169e444f8e32a22
parent 2640224b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ public class TetheringHardwareAccelPreferenceController extends DeveloperOptions
    public void updateState(Preference preference) {
        final int tetheringMode = Settings.Global.getInt(
                mContext.getContentResolver(),
                Settings.Global.TETHER_OFFLOAD_DISABLED, 0 /* default */);
                Settings.Global.TETHER_OFFLOAD_DISABLED, SETTING_VALUE_ON);
        ((TwoStatePreference) mPreference).setChecked(tetheringMode != SETTING_VALUE_OFF);
    }

@@ -68,7 +68,7 @@ public class TetheringHardwareAccelPreferenceController extends DeveloperOptions
    protected void onDeveloperOptionsSwitchDisabled() {
        super.onDeveloperOptionsSwitchDisabled();
        Settings.Global.putInt(mContext.getContentResolver(),
                Settings.Global.TETHER_OFFLOAD_DISABLED, SETTING_VALUE_OFF);
                Settings.Global.TETHER_OFFLOAD_DISABLED, SETTING_VALUE_ON);
        ((TwoStatePreference) mPreference).setChecked(false);
    }
}