Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36437d7d authored by Narayan Kamath's avatar Narayan Kamath Committed by Android (Google) Code Review
Browse files

Merge "CastTile : Cosmetic changes to the cast tile UX."

parents 47c4d9d6 b040df78
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -776,7 +776,7 @@
    <!-- QuickSettings: Wifi secondary label shown when the wifi is being enabled [CHAR LIMIT=NONE] -->
    <string name="quick_settings_wifi_secondary_label_transient">Turning on&#8230;</string>
    <!-- QuickSettings: Cast title [CHAR LIMIT=NONE] -->
    <string name="quick_settings_cast_title">Cast</string>
    <string name="quick_settings_cast_title">Screen Cast</string>
    <!-- QuickSettings: Cast detail panel, status text when casting [CHAR LIMIT=NONE] -->
    <string name="quick_settings_casting">Casting</string>
    <!-- QuickSettings: Cast detail panel, default device name [CHAR LIMIT=NONE] -->
+7 −5
Original line number Diff line number Diff line
@@ -161,21 +161,23 @@ public class CastTile extends QSTileImpl<BooleanState> {
        for (CastDevice device : devices) {
            if (device.state == CastDevice.STATE_CONNECTED) {
                state.value = true;
                state.label = getDeviceName(device);
                state.secondaryLabel = getDeviceName(device);
                state.contentDescription = state.contentDescription + "," +
                        mContext.getString(R.string.accessibility_cast_name, state.label);
            } else if (device.state == CastDevice.STATE_CONNECTING) {
                connecting = true;
            }
        }
        if (!state.value && connecting) {
            state.label = mContext.getString(R.string.quick_settings_connecting);
        if (connecting && !state.value) {
            state.secondaryLabel = mContext.getString(R.string.quick_settings_connecting);
        }
        state.icon = ResourceIcon.get(state.value ? R.drawable.ic_qs_cast_on
                : R.drawable.ic_qs_cast_off);
        if (mWifiConnected) {
        if (mWifiConnected || state.value) {
            state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
            if (!state.value) {
                state.secondaryLabel = "";
            }
            state.contentDescription = state.contentDescription + ","
                    + mContext.getString(R.string.accessibility_quick_settings_open_details);
            state.expandedAccessibilityClassName = Button.class.getName();