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

Commit eba6e6c7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move the lock item for the QS WifiPicker."

parents 6d4d9b80 ff0f1086
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -20,10 +20,10 @@ Copyright (C) 2014 The Android Open Source Project
    android:viewportHeight="72.0"
    android:tint="?android:attr/textColorPrimary">
    <group
        android:translateX="52.0"
        android:translateY="42.0" >
        android:translateX="28.0"
        android:translateY="10.5" >
        <path
            android:fillColor="#FFFFFFFF"
            android:pathData="M18.0,8.0l-1.0,0.0L17.0,6.0c0.0,-2.76 -2.24,-5.0 -5.0,-5.0S7.0,3.24 7.0,6.0l0.0,2.0L6.0,8.0c-1.1,0.0 -2.0,0.9 -2.0,2.0l0.0,10.0c0.0,1.0 0.9,2.0 2.0,2.0l12.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L20.0,10.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0zm-6.0,9.0c-1.1,0.0 -2.0,-0.9 -2.0,-2.0s0.9,-2.0 2.0,-2.0 2.0,0.9 2.0,2.0 -0.9,2.0 -2.0,2.0zm3.1,-9.0L8.9,8.0L8.9,6.0c0.0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0.0 3.1,1.39 3.1,3.1l0.0,2.0z"/>
            android:pathData="M36 16l-2 0 0 -4C34 6.48 29.52 2 24 2 18.48 2 14 6.48 14 12l0 4 -2 0c-2.21 0 -4 1.79 -4 4l0 20c0 2.21 1.79 4 4 4l24 0c2.21 0 4 -1.79 4 -4l0 -20c0 -2.21 -1.79 -4 -4 -4zM24 34c-2.21 0 -4 -1.79 -4 -4 0 -2.21 1.79 -4 4 -4 2.21 0 4 1.79 4 4 0 2.21 -1.79 4 -4 4zm6.2 -18l-12.4 0 0 -4c0 -3.42 2.78 -6.2 6.2 -6.2 3.42 0 6.2 2.78 6.2 6.2l0 4z"
            android:fillColor="#FFFFFF" />
    </group>
</vector>
+1 −2
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@
        android:focusable="true"
        android:scaleType="center"
        android:contentDescription="@*android:string/media_route_controller_disconnect"
        android:tint="?android:attr/textColorPrimary"
        android:src="@drawable/ic_qs_cancel" />
        android:tint="?android:attr/textColorPrimary" />

</LinearLayout>
+22 −9
Original line number Diff line number Diff line
@@ -203,9 +203,13 @@ public class QSDetailItems extends FrameLayout {
                    }
                }
            });
            final ImageView disconnect = (ImageView) view.findViewById(android.R.id.icon2);
            disconnect.setVisibility(item.canDisconnect ? VISIBLE : GONE);
            disconnect.setOnClickListener(new OnClickListener() {

            final ImageView icon2 = (ImageView) view.findViewById(android.R.id.icon2);
            if (item.canDisconnect) {
                icon2.setImageResource(R.drawable.ic_qs_cancel);
                icon2.setVisibility(VISIBLE);
                icon2.setClickable(true);
                icon2.setOnClickListener(new OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        if (mCallback != null) {
@@ -213,6 +217,14 @@ public class QSDetailItems extends FrameLayout {
                        }
                    }
                });
            } else if (item.icon2 != -1) {
                icon2.setVisibility(VISIBLE);
                icon2.setImageResource(item.icon2);
                icon2.setClickable(false);
            } else {
                icon2.setVisibility(GONE);
            }

            return view;
        }
    };
@@ -245,6 +257,7 @@ public class QSDetailItems extends FrameLayout {
        public CharSequence line2;
        public Object tag;
        public boolean canDisconnect;
        public int icon2 = -1;
    }

    public interface Callback {
+3 −3
Original line number Diff line number Diff line
@@ -372,9 +372,9 @@ public class WifiTile extends QSTile<QSTile.SignalState> {
                    item.icon = mWifiController.getIcon(ap);
                    item.line1 = ap.getSsid();
                    item.line2 = ap.isActive() ? ap.getSummary() : null;
                    item.overlay = ap.getSecurity() != AccessPoint.SECURITY_NONE
                            ? mContext.getDrawable(R.drawable.qs_ic_wifi_lock)
                            : null;
                    item.icon2 = ap.getSecurity() != AccessPoint.SECURITY_NONE
                            ? R.drawable.qs_ic_wifi_lock
                            : -1;
                    items[i] = item;
                }
            }