Introduce new Disconnect functionality for Wifi networks in Internet

Panel only

- Display the close icon on the Wi-Fi network connected to the Internet,
and performs the same action as tapping on the carrier network when
tapped it.

- Display the cog icon on the Wi-Fi network if it has no the Internet
access.

- Screenshot:
  https://screenshot.googleplex.com/YBQ8onG2dFJ8Q2a

Bug: 187995278
Test: manual test
atest -c ProviderModelSliceTest

Change-Id: Id54a94c1fdfc37aff5cc37d6fb9f5478c0dccb00
This commit is contained in:
Weng Su
2021-05-19 01:52:05 +08:00
parent f6712e330a
commit 3d2950c8af
4 changed files with 70 additions and 4 deletions

View File

@@ -183,7 +183,7 @@ public class WifiSlice implements CustomSliceable {
return Utils.createIconWithDrawable(drawable);
}
private IconCompat getEndIcon(WifiSliceItem wifiSliceItem) {
protected IconCompat getEndIcon(WifiSliceItem wifiSliceItem) {
if (wifiSliceItem.getConnectedState() != WifiEntry.CONNECTED_STATE_DISCONNECTED) {
return IconCompat.createWithResource(mContext, R.drawable.ic_settings_24dp);
}
@@ -194,7 +194,7 @@ public class WifiSlice implements CustomSliceable {
return null;
}
private SliceAction getWifiEntryAction(WifiSliceItem wifiSliceItem, IconCompat icon,
protected SliceAction getWifiEntryAction(WifiSliceItem wifiSliceItem, IconCompat icon,
CharSequence title) {
final int requestCode = wifiSliceItem.getKey().hashCode();