use of com.android.systemui.recents.events.ui.ShowApplicationInfoEvent in project platform_frameworks_base by android.
the class TaskViewHeader method onClick.
@Override
public void onClick(View v) {
if (v == mIconView) {
// In accessibility, a single click on the focused app info button will show it
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mDismissButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
tv.dismissTask();
// Keep track of deletions by the dismiss button
MetricsLogger.histogram(getContext(), "overview_task_dismissed_source", Constants.Metrics.DismissSourceHeaderButton);
} else if (v == mMoveTaskButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
Rect bounds = mMoveTaskTargetStackId == FREEFORM_WORKSPACE_STACK_ID ? new Rect(mTaskViewRect) : new Rect();
EventBus.getDefault().send(new LaunchTaskEvent(tv, mTask, bounds, mMoveTaskTargetStackId, false));
} else if (v == mAppInfoView) {
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mAppIconView) {
hideAppOverlay(false);
}
}
use of com.android.systemui.recents.events.ui.ShowApplicationInfoEvent in project android_frameworks_base by AOSPA.
the class TaskViewHeader method onClick.
@Override
public void onClick(View v) {
if (v == mIconView) {
// In accessibility, a single click on the focused app info button will show it
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mDismissButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
if (!Recents.sLockedTasks.contains(tv.getTask())) {
tv.dismissTask();
// Keep track of deletions by the dismiss button
MetricsLogger.histogram(getContext(), "overview_task_dismissed_source", Constants.Metrics.DismissSourceHeaderButton);
}
} else if (v == mMoveTaskButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
EventBus.getDefault().send(new LaunchTaskEvent(tv, mTask, null, mMoveTaskTargetStackId, false));
} else if (v == mAppInfoView) {
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mAppIconView) {
hideAppOverlay(false);
} else if (v == mLockTaskButton) {
if (Recents.sLockedTasks.contains(mTask)) {
Recents.sLockedTasks.remove(mTask);
} else {
Recents.sLockedTasks.add(mTask);
}
updateLockTaskDrawable();
}
}
use of com.android.systemui.recents.events.ui.ShowApplicationInfoEvent in project android_frameworks_base by crdroidandroid.
the class TaskViewHeader method onClick.
@Override
public void onClick(View v) {
if (v == mIconView) {
// In accessibility, a single click on the focused app info button will show it
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mDismissButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
tv.dismissTask();
// Keep track of deletions by the dismiss button
MetricsLogger.histogram(getContext(), "overview_task_dismissed_source", Constants.Metrics.DismissSourceHeaderButton);
} else if (v == mPinButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
tv.screenPinning();
} else if (v == mMoveTaskButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
EventBus.getDefault().send(new LaunchTaskEvent(tv, mTask, null, mMoveTaskTargetStackId, false));
} else if (v == mAppInfoView) {
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mAppIconView) {
hideAppOverlay(false);
} else if (v == mLockTaskButton) {
if (mTask.isLockedTask) {
mLockTaskHelper.removeTask(mTask.packageName);
} else {
mLockTaskHelper.addTask(mTask.packageName);
}
mTask.isLockedTask = !mTask.isLockedTask;
updateLockTaskDrawable();
EventBus.getDefault().send(new LockTaskStateChangedEvent(true));
}
}
use of com.android.systemui.recents.events.ui.ShowApplicationInfoEvent in project android_frameworks_base by DirtyUnicorns.
the class TaskViewHeader method onClick.
@Override
public void onClick(View v) {
if (v == mIconView) {
// In accessibility, a single click on the focused app info button will show it
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mDismissButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
if (!Recents.sLockedTasks.contains(tv.getTask())) {
tv.dismissTask();
// Keep track of deletions by the dismiss button
MetricsLogger.histogram(getContext(), "overview_task_dismissed_source", Constants.Metrics.DismissSourceHeaderButton);
}
} else if (v == mPinButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
tv.screenPinning();
} else if (v == mMoveTaskButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
EventBus.getDefault().send(new LaunchTaskEvent(tv, mTask, null, mMoveTaskTargetStackId, false));
} else if (v == mAppInfoView) {
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mAppIconView) {
hideAppOverlay(false);
} else if (v == mLockTaskButton) {
if (Recents.sLockedTasks.contains(mTask)) {
Recents.sLockedTasks.remove(mTask);
} else {
Recents.sLockedTasks.add(mTask);
}
updateLockTaskDrawable();
}
}
use of com.android.systemui.recents.events.ui.ShowApplicationInfoEvent in project android_frameworks_base by ResurrectionRemix.
the class TaskViewHeader method onClick.
@Override
public void onClick(View v) {
if (v == mIconView) {
// In accessibility, a single click on the focused app info button will show it
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mDismissButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
if (!Recents.sLockedTasks.contains(tv.getTask())) {
tv.dismissTask();
// Keep track of deletions by the dismiss button
MetricsLogger.histogram(getContext(), "overview_task_dismissed_source", Constants.Metrics.DismissSourceHeaderButton);
}
} else if (v == mMoveTaskButton) {
TaskView tv = Utilities.findParent(this, TaskView.class);
EventBus.getDefault().send(new LaunchTaskEvent(tv, mTask, null, mMoveTaskTargetStackId, false));
} else if (v == mAppInfoView) {
EventBus.getDefault().send(new ShowApplicationInfoEvent(mTask));
} else if (v == mAppIconView) {
hideAppOverlay(false);
} else if (v == mLockTaskButton) {
if (Recents.sLockedTasks.contains(mTask)) {
Recents.sLockedTasks.remove(mTask);
} else {
Recents.sLockedTasks.add(mTask);
}
updateLockTaskDrawable();
}
}
Aggregations