RecentsConfiguration mConfig;
// Header views
+ ImageView mMoveTaskButton;
ImageView mDismissButton;
ImageView mApplicationIcon;
TextView mActivityDescription;
}
@Override
- public boolean onTouchEvent(MotionEvent event) {
- // We ignore taps on the task bar except on the filter and dismiss buttons
- if (!Constants.DebugFlags.App.EnableTaskBarTouchEvents) return true;
-
- return super.onTouchEvent(event);
- }
-
- @Override
protected void onFinishInflate() {
// Initialize the icon and description views
mApplicationIcon = (ImageView) findViewById(R.id.application_icon);
mActivityDescription = (TextView) findViewById(R.id.activity_description);
mDismissButton = (ImageView) findViewById(R.id.dismiss_task);
+ mMoveTaskButton = (ImageView) findViewById(R.id.move_task);
+ if (mConfig.multiStackEnabled) {
+ mMoveTaskButton.setVisibility(View.VISIBLE);
+ }
// Hide the backgrounds if they are ripple drawables
if (!Constants.DebugFlags.App.EnableTaskFiltering) {
mApplicationIcon.setImageDrawable(t.applicationIcon);
}
mApplicationIcon.setContentDescription(t.activityLabel);
- if (!mActivityDescription.getText().toString().equals(t.activityLabel)) {
+ // Always update when multi stack debugging is enabled as the stack id can change
+ if (mConfig.multiStackEnabled) {
+ mActivityDescription.setText("[" + t.key.stackId + "] " + t.activityLabel);
+ } else if (!mActivityDescription.getText().toString().equals(t.activityLabel)) {
mActivityDescription.setText(t.activityLabel);
}
// Try and apply the system ui tint
- int existingBgColor = (getBackground() instanceof ColorDrawable) ?
- ((ColorDrawable) getBackground()).getColor() : 0;
+ int existingBgColor = getBackgroundColor();
if (existingBgColor != t.colorPrimary) {
mBackgroundColorDrawable.setColor(t.colorPrimary);
mBackgroundColor = t.colorPrimary;