Add config value to switch between Tether Settings UIs.

Adding this config value to make it easy to switch to developing
Tethering settings UI. Also, using this config value to make sure
that preferences from new AllInOneTetherSettings screen won't show up in
the search results.

Bug: 147915366
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TetherSettingsTest
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=TetehrPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSettingsTest

Change-Id: I8c88816a8f2b40fc219cae8d0d442454c5270b2b
This commit is contained in:
Zhen Zhang
2020-01-17 15:23:40 -08:00
parent 02dfed6846
commit 0ccc849de7
6 changed files with 35 additions and 7 deletions

View File

@@ -109,6 +109,10 @@ public class TetherPreferenceController extends AbstractPreferenceController imp
// Grey out if provisioning is not available.
mPreference.setEnabled(!TetherSettings.isProvisioningNeededButUnavailable(mContext));
if (mContext.getResources().getBoolean(R.bool.config_show_all_in_one_tether_settings)) {
mPreference.setFragment("com.android.settings.AllInOneTetherSettings");
}
}
}