[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

@@ -20,6 +20,7 @@ import android.content.Intent;
import android.net.Uri;
import androidx.core.graphics.drawable.IconCompat;
import androidx.fragment.app.FragmentActivity;
import com.android.settingslib.core.instrumentation.Instrumentable;
@@ -94,8 +95,11 @@ public interface PanelContent extends Instrumentable {
/**
* Implement the click event for custom button.
*
* @param panelActivity the FragmentActivity from PanelFragment, the user can decide whether
* to finish activity or not.
*/
default void onClickCustomizedButton() {}
default void onClickCustomizedButton(FragmentActivity panelActivity) {}
/**
* Register to start receiving callbacks for custom button events.