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

Commit e3932622 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Start drawing QS slashes rather than using AVDS"

parents 57c32d93 395617fd
Loading
Loading
Loading
Loading
+35 −1
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ public interface QSTile {
        public boolean dualTarget = false;
        public boolean isTransient = false;
        public String expandedAccessibilityClassName;
        public SlashState slash;

        public boolean copyTo(State other) {
            if (other == null) throw new IllegalArgumentException();
@@ -126,7 +127,8 @@ public interface QSTile {
                    || !Objects.equals(other.disabledByPolicy, disabledByPolicy)
                    || !Objects.equals(other.state, state)
                    || !Objects.equals(other.isTransient, isTransient)
                    || !Objects.equals(other.dualTarget, dualTarget);
                    || !Objects.equals(other.dualTarget, dualTarget)
                    || !Objects.equals(other.slash, slash);
            other.icon = icon;
            other.label = label;
            other.contentDescription = contentDescription;
@@ -136,6 +138,7 @@ public interface QSTile {
            other.state = state;
            other.dualTarget = dualTarget;
            other.isTransient = isTransient;
            other.slash = slash != null ? slash.copy() : null;
            return changed;
        }

@@ -155,6 +158,7 @@ public interface QSTile {
            sb.append(",dualTarget=").append(dualTarget);
            sb.append(",isTransient=").append(isTransient);
            sb.append(",state=").append(state);
            sb.append(",slash=\"").append(slash).append("\"");
            return sb.append(']');
        }

@@ -246,4 +250,34 @@ public interface QSTile {
        }
    }

    @ProvidesInterface(version = SlashState.VERSION)
    public static class SlashState {
        public static final int VERSION = 2;

        public boolean isSlashed;
        public float rotation;

        @Override
        public String toString() {
            return "isSlashed=" + isSlashed + ",rotation=" + rotation;
        }

        @Override
        public boolean equals(Object o) {
            if (o == null) return false;
            try {
                return (((SlashState) o).rotation == rotation)
                        && (((SlashState) o).isSlashed == isSlashed);
            } catch (ClassCastException e) {
                return false;
            }
        }

        public SlashState copy() {
            SlashState state = new SlashState();
            state.rotation = rotation;
            state.isSlashed = isSlashed;
            return state;
        }
    }
}
+10 −12
Original line number Diff line number Diff line
@@ -18,12 +18,10 @@ Copyright (C) 2014 The Android Open Source Project
    android:height="29.5dp"
    android:viewportWidth="26.0"
    android:viewportHeight="24.0">
    <group
        android:translateY="2">
        <path
            android:fillColor="#FFFFFFFF"
        android:pathData="M17.500000,16.500000L5.800000,3.400000c0.000000,0.000000 0.000000,0.000000 0.000000,0.000000l-2.700000,-3.000000L1.600000,1.800000l2.200000,2.500000c-2.000000,1.000000 -3.200000,2.000000 -3.400000,2.200000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l3.200000,-3.900000l2.400000,2.700000l1.500000,-1.400000L17.500000,16.500000L17.500000,16.500000z"
        android:fillAlpha=".3"/>
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000c-1.900000,0.000000 -3.600000,0.300000 -5.200000,0.700000L18.700001,15.000000L25.600000,6.500000z"
        android:fillAlpha=".3"/>
            android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
    </group>
</vector>
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@
            <group
                android:name="plane"
                android:translateX="23.481"
                android:translateY="18.71151" >
                android:translateY="15.71151" >
                <path
                    android:name="plane_1"
                    android:pathData="M 18.9439849854,7.98849487305 c 0.0,0.0 0.0,-4.0 0.0,-4.0 c 0.0,0.0 -16.0,-10.0 -16.0,-10.0 c 0.0,0.0 0.0,-11.0 0.0,-11.0 c 0.0,-1.70001220703 -1.30000305176,-3.0 -3.0,-3.0 c -1.69999694824,0.0 -3.0,1.29998779297 -3.0,3.0 c 0.0,0.0 0.0,11.0 0.0,11.0 c 0.0,0.0 -16.0,10.0 -16.0,10.0 c 0.0,0.0 0.0,4.0 0.0,4.0 c 0.0,0.0 16.0,-5.0 16.0,-5.0 c 0.0,0.0 0.0,11.0 0.0,11.0 c 0.0,0.0 -4.0,3.0 -4.0,3.0 c 0.0,0.0 0.0,3.0 0.0,3.0 c 0.0,0.0 7.0,-2.0 7.0,-2.0 c 0.0,0.0 7.0,2.0 7.0,2.0 c 0.0,0.0 0.0,-3.0 0.0,-3.0 c 0.0,0.0 -4.0,-3.0 -4.0,-3.0 c 0.0,0.0 0.0,-11.0 0.0,-11.0 c 0.0,0.0 16.0,5.0 16.0,5.0 Z"
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
    <item type="id" name="shadow_alpha_animator_start_value_tag"/>
    <item type="id" name="doze_saved_filter_tag"/>
    <item type="id" name="qs_icon_tag"/>
    <item type="id" name="qs_slash_tag"/>
    <item type="id" name="scrim"/>
    <item type="id" name="scrim_target"/>
    <item type="id" name="scrim_alpha_start"/>
+2 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import com.android.systemui.R;
import com.android.systemui.plugins.qs.QSTile;
import com.android.systemui.plugins.qs.QSTile.SignalState;
import com.android.systemui.qs.tileimpl.QSIconViewImpl;
import com.android.systemui.qs.tileimpl.SlashImageView;

/** View that represents a custom quick settings tile for displaying signal info (wifi/cell). **/
public class SignalTileView extends QSIconViewImpl {
@@ -61,7 +62,7 @@ public class SignalTileView extends QSIconViewImpl {
    @Override
    protected View createIcon() {
        mIconFrame = new FrameLayout(mContext);
        mSignal = new ImageView(mContext);
        mSignal = new SlashImageView(mContext);
        mIconFrame.addView(mSignal);
        return mIconFrame;
    }
Loading