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

Commit a88af9d0 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Quicksettings accessibility." into nyc-dev am: 450f91b5 am:...

Merge "Merge "Quicksettings accessibility." into nyc-dev am: 450f91b5 am: 7af7a4f9 am: 4a0238ac"
parents 70c3000a 594c3f02
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -47,7 +47,8 @@
            android:textAppearance="@style/TextAppearance.QS.DetailButton"
            android:textColor="#64FFFFFF"
            android:focusable="true"
            android:text="@string/qs_edit" />
            android:text="@string/qs_edit"
            android:contentDescription="@string/accessibility_quick_settings_edit"/>

    </FrameLayout>

+11 −4
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
    android:clipChildren="false"
    android:clipToPadding="false"
    android:baselineAligned="false"
    android:clickable="false"
    >

    <LinearLayout
@@ -64,7 +65,7 @@
                android:layout_height="match_parent"
                android:background="@drawable/ripple_drawable"
                android:src="@drawable/ic_settings"
                android:contentDescription="@string/accessibility_desc_settings" />
                android:contentDescription="@string/accessibility_quick_settings_settings" />
            <com.android.systemui.statusbar.AlphaOptimizedImageView android:id="@+id/tuner_icon"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
@@ -102,7 +103,8 @@
        android:textAppearance="@style/TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
        android:text="@*android:string/emergency_calls_only"
        android:singleLine="true"
        android:gravity="center_vertical" />
        android:gravity="center_vertical"
        android:focusable="true" />

    <LinearLayout
        android:id="@+id/date_time_alarm_group"
@@ -118,7 +120,8 @@
            android:id="@+id/date_time_group"
            android:layout_width="wrap_content"
            android:layout_height="19dp"
            android:orientation="horizontal">
            android:orientation="horizontal"
            android:focusable="true" >

            <include layout="@layout/split_clock_view"
                android:layout_width="wrap_content"
@@ -176,7 +179,11 @@
        android:layout_marginEnd="12dp"
        android:layout_alignParentEnd="true"
        android:clipChildren="false"
        android:clipToPadding="false" />
        android:clipToPadding="false"
        android:importantForAccessibility="yes"
        android:focusable="true"
        android:accessibilityTraversalAfter="@id/date_time_group"
        android:accessibilityTraversalBefore="@id/expand_indicator" />

    <com.android.systemui.statusbar.AlphaOptimizedImageView
        android:id="@+id/qs_detail_header_progress"
+1 −0
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
        public TilePage(Context context, AttributeSet attrs) {
            super(context, attrs);
            updateResources();
            setContentDescription(mContext.getString(R.string.accessibility_desc_quick_settings));
        }

        @Override
+9 −5
Original line number Diff line number Diff line
@@ -277,13 +277,17 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
    }

    public void setTiles(Collection<QSTile<?>> tiles) {
        setTiles(tiles, false);
    }

    public void setTiles(Collection<QSTile<?>> tiles, boolean collapsedView) {
        for (TileRecord record : mRecords) {
            mTileLayout.removeTile(record);
            record.tile.removeCallback(record.callback);
        }
        mRecords.clear();
        for (QSTile<?> tile : tiles) {
            addTile(tile);
            addTile(tile, collapsedView);
        }
    }

@@ -291,14 +295,14 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
        r.tileView.onStateChanged(state);
    }

    protected QSTileBaseView createTileView(QSTile<?> tile) {
        return new QSTileView(mContext, tile.createTileView(mContext));
    protected QSTileBaseView createTileView(QSTile<?> tile, boolean collapsedView) {
        return new QSTileView(mContext, tile.createTileView(mContext), collapsedView);
    }

    protected void addTile(final QSTile<?> tile) {
    protected void addTile(final QSTile<?> tile, boolean collapsedView) {
        final TileRecord r = new TileRecord();
        r.tile = tile;
        r.tileView = createTileView(tile);
        r.tileView = createTileView(tile, collapsedView);
        final QSTile.Callback callback = new QSTile.Callback() {
            @Override
            public void onStateChanged(QSTile.State state) {
+17 −6
Original line number Diff line number Diff line
@@ -538,9 +538,12 @@ public abstract class QSTile<TState extends State> implements Listenable {
        public CharSequence label;
        public CharSequence contentDescription;
        public CharSequence dualLabelContentDescription;
        public CharSequence minimalContentDescription;
        public boolean autoMirrorDrawable = true;
        public boolean disabledByPolicy;
        public EnforcedAdmin enforcedAdmin;
        public String minimalAccessibilityClassName;
        public String expandedAccessibilityClassName;

        public boolean copyTo(State other) {
            if (other == null) throw new IllegalArgumentException();
@@ -551,12 +554,21 @@ public abstract class QSTile<TState extends State> implements Listenable {
                    || !Objects.equals(other.autoMirrorDrawable, autoMirrorDrawable)
                    || !Objects.equals(other.dualLabelContentDescription,
                    dualLabelContentDescription)
                    || !Objects.equals(other.minimalContentDescription,
                    minimalContentDescription)
                    || !Objects.equals(other.minimalAccessibilityClassName,
                    minimalAccessibilityClassName)
                    || !Objects.equals(other.expandedAccessibilityClassName,
                    expandedAccessibilityClassName)
                    || !Objects.equals(other.disabledByPolicy, disabledByPolicy)
                    || !Objects.equals(other.enforcedAdmin, enforcedAdmin);
            other.icon = icon;
            other.label = label;
            other.contentDescription = contentDescription;
            other.dualLabelContentDescription = dualLabelContentDescription;
            other.minimalContentDescription = minimalContentDescription;
            other.minimalAccessibilityClassName = minimalAccessibilityClassName;
            other.expandedAccessibilityClassName = expandedAccessibilityClassName;
            other.autoMirrorDrawable = autoMirrorDrawable;
            other.disabledByPolicy = disabledByPolicy;
            if (enforcedAdmin == null) {
@@ -580,6 +592,9 @@ public abstract class QSTile<TState extends State> implements Listenable {
            sb.append(",label=").append(label);
            sb.append(",contentDescription=").append(contentDescription);
            sb.append(",dualLabelContentDescription=").append(dualLabelContentDescription);
            sb.append(",minimalContentDescription=").append(minimalContentDescription);
            sb.append(",minimalAccessibilityClassName=").append(minimalAccessibilityClassName);
            sb.append(",expandedAccessibilityClassName=").append(expandedAccessibilityClassName);
            sb.append(",autoMirrorDrawable=").append(autoMirrorDrawable);
            sb.append(",disabledByPolicy=").append(disabledByPolicy);
            sb.append(",enforcedAdmin=").append(enforcedAdmin);
@@ -606,8 +621,7 @@ public abstract class QSTile<TState extends State> implements Listenable {
        }
    }

    public static final class SignalState extends State {
        public boolean enabled;
    public static final class SignalState extends BooleanState {
        public boolean connected;
        public boolean activityIn;
        public boolean activityOut;
@@ -618,12 +632,10 @@ public abstract class QSTile<TState extends State> implements Listenable {
        @Override
        public boolean copyTo(State other) {
            final SignalState o = (SignalState) other;
            final boolean changed = o.enabled != enabled
                    || o.connected != connected || o.activityIn != activityIn
            final boolean changed = o.connected != connected || o.activityIn != activityIn
                    || o.activityOut != activityOut
                    || o.overlayIconId != overlayIconId
                    || o.isOverlayIconWide != isOverlayIconWide;
            o.enabled = enabled;
            o.connected = connected;
            o.activityIn = activityIn;
            o.activityOut = activityOut;
@@ -636,7 +648,6 @@ public abstract class QSTile<TState extends State> implements Listenable {
        @Override
        protected StringBuilder toStringBuilder() {
            final StringBuilder rt = super.toStringBuilder();
            rt.insert(rt.length() - 1, ",enabled=" + enabled);
            rt.insert(rt.length() - 1, ",connected=" + connected);
            rt.insert(rt.length() - 1, ",activityIn=" + activityIn);
            rt.insert(rt.length() - 1, ",activityOut=" + activityOut);
Loading