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

Commit a3cb77a9 authored by Sid Soundararajan's avatar Sid Soundararajan Committed by Android (Google) Code Review
Browse files

Merge "Add support for dismissing in Talkback Mode" into nyc-dev

parents fc2a7ce7 1103bfca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,5 +16,5 @@ limitations under the License.
<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <item format="float" type="integer" name="unselected_scale">1.0</item>
    <item format="float" type="integer" name="selected_scale">1.259</item>
    <item format="float" type="integer" name="dismiss_unselected_alpha">0.1</item>
    <item format="float" type="integer" name="dismiss_unselected_alpha">0.3</item>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ public class ViewFocusAnimator implements View.OnFocusChangeListener {

        mTargetView.getDismissIconView().setAlpha(mDismissIconAlpha * level);
        mTargetView.getThumbnailView().setZ(z);
        mTargetView.getDismissIconView().setZ(z);
    }

    public float getFocusProgress() {
+20 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ import android.widget.LinearLayout;
import android.widget.TextView;

import com.android.systemui.R;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.tv.animations.DismissAnimationsHolder;
import com.android.systemui.recents.tv.animations.RecentsRowFocusAnimationHolder;
import com.android.systemui.recents.tv.animations.ViewFocusAnimator;
@@ -85,6 +87,24 @@ public class TaskCardView extends LinearLayout {
        mCornerRadius = getResources().getDimensionPixelSize(
                R.dimen.recents_task_view_rounded_corners_radius);
        mRecentsRowFocusAnimationHolder = new RecentsRowFocusAnimationHolder(this, title);
        SystemServicesProxy ssp = Recents.getSystemServices();
        if (ssp.isTouchExplorationEnabled()) {
            mDismissIconView.setFocusable(true);
            mDismissIconView.setFocusableInTouchMode(true);
            mDismissIconView.setOnFocusChangeListener(new OnFocusChangeListener() {
                @Override
                public void onFocusChange(View v, boolean hasFocus) {
                    if (hasFocus) {
                        setDismissState(true);
                    } else {
                        setDismissState(false);
                    }
                }
            });
        } else {
            mDismissIconView.setFocusable(false);
            mDismissIconView.setFocusableInTouchMode(false);
        }
        mViewFocusAnimator = new ViewFocusAnimator(this);
    }