summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/layout/recents_task_view_header.xml1
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java1
3 files changed, 20 insertions, 5 deletions
diff --git a/packages/SystemUI/res/layout/recents_task_view_header.xml b/packages/SystemUI/res/layout/recents_task_view_header.xml
index 53047a3..477d9d7 100644
--- a/packages/SystemUI/res/layout/recents_task_view_header.xml
+++ b/packages/SystemUI/res/layout/recents_task_view_header.xml
@@ -21,6 +21,7 @@
android:layout_gravity="top|center_horizontal">
<com.android.systemui.recents.views.FixedSizeImageView
android:id="@+id/application_icon"
+ android:contentDescription="@string/recents_app_info_button_label"
android:layout_width="@dimen/recents_task_view_application_icon_size"
android:layout_height="@dimen/recents_task_view_application_icon_size"
android:layout_marginStart="8dp"
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index 01ed08a..4a5fef3 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -22,6 +22,7 @@ import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.*;
import android.util.AttributeSet;
+import android.view.accessibility.AccessibilityManager;
import android.view.View;
import android.view.ViewOutlineProvider;
import android.view.animation.AccelerateInterpolator;
@@ -672,7 +673,11 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
mThumbnailView.rebindToTask(mTask);
mHeaderView.rebindToTask(mTask);
// Rebind any listeners
- mHeaderView.mApplicationIcon.setOnClickListener(this);
+ AccessibilityManager am = (AccessibilityManager) getContext().
+ getSystemService(Context.ACCESSIBILITY_SERVICE);
+ if (Constants.DebugFlags.App.EnableTaskFiltering || (am != null && am.isEnabled())) {
+ mHeaderView.mApplicationIcon.setOnClickListener(this);
+ }
mHeaderView.mDismissButton.setOnClickListener(this);
if (mConfig.multiStackEnabled) {
mHeaderView.mMoveTaskButton.setOnClickListener(this);
@@ -718,9 +723,19 @@ public class TaskView extends FrameLayout implements Task.TaskCallbacks,
postDelayed(new Runnable() {
@Override
public void run() {
- if (Constants.DebugFlags.App.EnableTaskFiltering && v == mHeaderView.mApplicationIcon) {
- if (mCb != null) {
- mCb.onTaskViewAppIconClicked(tv);
+ if (v == mHeaderView.mApplicationIcon) {
+ if (Constants.DebugFlags.App.EnableTaskFiltering) {
+ if (mCb != null) {
+ mCb.onTaskViewAppIconClicked(tv);
+ }
+ } else {
+ AccessibilityManager am = (AccessibilityManager) getContext().
+ getSystemService(Context.ACCESSIBILITY_SERVICE);
+ if (am != null && am.isEnabled()) {
+ if (mCb != null) {
+ mCb.onTaskViewAppInfoClicked(tv);
+ }
+ }
}
} else if (v == mHeaderView.mDismissButton) {
dismissTask();
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
index f397bc3..82f0f31 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
@@ -190,7 +190,6 @@ public class TaskViewHeader extends FrameLayout {
} else if (t.applicationIcon != null) {
mApplicationIcon.setImageDrawable(t.applicationIcon);
}
- mApplicationIcon.setContentDescription(t.contentDescription);
if (!mActivityDescription.getText().toString().equals(t.activityLabel)) {
mActivityDescription.setText(t.activityLabel);
}