Check whether Ethernet is connected or not before updating InternetTile

Bug: 266897044
Test: atest -c com.android.systemui.qs.tiles.InternetTileTest
Change-Id: I278ecc4f7f5daf764c5354f644375f12779ced47
This commit is contained in:
Ying Xu
2023-01-31 14:00:19 -08:00
parent c8df321b15
commit e941ae9eef

View File

@@ -531,6 +531,9 @@ public class InternetTile extends QSTileImpl<SignalState> {
if (DEBUG) {
Log.d(TAG, "handleUpdateEthernetState: " + "EthernetCallbackInfo = " + cb.toString());
}
if (!cb.mConnected) {
return;
}
final Resources r = mContext.getResources();
state.label = r.getString(R.string.quick_settings_internet_label);
state.state = Tile.STATE_ACTIVE;