Add tether preferences into AllInOneTetherSettings
These preferences are for user to toggle a specific tethering option, like USB, BT or WIFI. Bug: 147323306 Test: CodeInspectionTest, AllInOneTetherSettingsTest, TetherEnablerTest Change-Id: I1229ffd2dd12b39e9c6e48dc29c6e46ce9ad7634
This commit is contained in:
@@ -31,6 +31,7 @@ import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settingslib.TetherUtil;
|
||||
|
||||
/**
|
||||
* This controller helps to manage the switch state and visibility of wifi tether disable switch
|
||||
@@ -84,7 +85,8 @@ public final class WifiTetherDisablePreferenceController extends BasePreferenceC
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
final String[] wifiRegexs = mCm.getTetherableWifiRegexs();
|
||||
if (wifiRegexs == null || wifiRegexs.length == 0 || !shouldShow()) {
|
||||
if (wifiRegexs == null || wifiRegexs.length == 0 || !shouldShow()
|
||||
|| !TetherUtil.isTetherAvailable(mContext)) {
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
} else {
|
||||
return AVAILABLE;
|
||||
|
Reference in New Issue
Block a user