[Provider model] Add "Turn off/on Wi-Fi" link to Internet Panel

- Replace the left menu button with "Turn off/on Wi-Fi"
  - Remove the TurnOnWifiSlice

- Show "Wi-Fi is off" sub-title when Wi-Fi is disabled
  - Remove the "Wi\u-Fi is turned on" sub-title when APM is on.

Bug: 188710392
Test: manual test
atest -c InternetConnectivityPanelTest
make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.panel

Change-Id: I53e200f6cadf8b712bf794bcbd5ff79f0f239cc0
This commit is contained in:
Weng Su
2021-05-24 22:57:30 +08:00
parent 31389702ad
commit 7b8c367d4f
8 changed files with 90 additions and 358 deletions

View File

@@ -491,11 +491,11 @@ public class PanelFragment extends Fragment {
mPanelClosedKey = PanelClosedKeys.KEY_SEE_MORE;
final FragmentActivity activity = getActivity();
if (mPanel.isCustomizedButtonUsed()) {
mPanel.onClickCustomizedButton();
mPanel.onClickCustomizedButton(activity);
} else {
activity.startActivityForResult(mPanel.getSeeMoreIntent(), 0);
activity.finish();
}
activity.finish();
};
}