/** Binds this task view to the task */
  public void onTaskBound(Task t) {
    mTask = t;
    mTask.setCallbacks(this);

    // Hide the action button if lock to app is disabled for this view
    int lockButtonVisibility = (!t.lockToTaskEnabled || !t.lockToThisTask) ? GONE : VISIBLE;
    if (mActionButtonView.getVisibility() != lockButtonVisibility) {
      mActionButtonView.setVisibility(lockButtonVisibility);
      requestLayout();
    }
  }
 @Override
 public void onTaskDataUnloaded() {
   if (mThumbnailView != null && mHeaderView != null) {
     // Unbind each of the views from the task data and remove the task callback
     mTask.setCallbacks(null);
     mThumbnailView.unbindFromTask();
     mHeaderView.unbindFromTask();
     // Unbind any listeners
     mHeaderView.mApplicationIcon.setOnClickListener(null);
     mHeaderView.mDismissButton.setOnClickListener(null);
     mActionButtonView.setOnClickListener(null);
     if (Constants.DebugFlags.App.EnableDevAppInfoOnLongPress) {
       mHeaderView.mApplicationIcon.setOnLongClickListener(null);
     }
   }
   mTaskDataLoaded = false;
 }