mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Fix incorrect reporting of launch failure
- Launcher uses the same consumer to handle task launch failure and animation-cancel, so only show the notification when it is an actual launch failure. Bug: 79209142 Change-Id: I6b708ac9888673056f2c6de1d5aee4a281c61027
This commit is contained in:
@@ -1160,15 +1160,18 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
||||
onTaskLaunched(result);
|
||||
tv.setVisibility(VISIBLE);
|
||||
getOverlay().remove(drawable);
|
||||
if (!result) {
|
||||
tv.notifyTaskLaunchFailed(TAG);
|
||||
}
|
||||
};
|
||||
|
||||
mPendingAnimation = new PendingAnimation(anim);
|
||||
mPendingAnimation.addEndListener((onEndListener) -> {
|
||||
if (onEndListener.isSuccess) {
|
||||
tv.launchTask(false, onTaskLaunchFinish, getHandler());
|
||||
Consumer<Boolean> onLaunchResult = (result) -> {
|
||||
onTaskLaunchFinish.accept(result);
|
||||
if (!result) {
|
||||
tv.notifyTaskLaunchFailed(TAG);
|
||||
}
|
||||
};
|
||||
tv.launchTask(false, onLaunchResult, getHandler());
|
||||
Task task = tv.getTask();
|
||||
if (task != null) {
|
||||
mActivity.getUserEventDispatcher().logTaskLaunchOrDismiss(
|
||||
|
||||
Reference in New Issue
Block a user