Return to home when overview command fails.

Returning a runnable list that doesn't get run later causes the overview command to be added to the pending command queue, but never gets removed. This causes following overview (and home on tablets) commands not to respond.

Test: forcefully caused the error condition programmatically; checked the queue is cleared and the user is sent home.
Fixes: 255851262
Change-Id: I9d2f54960c54963b1e7480a597d05911201c152b
This commit is contained in:
Schneider Victor-tulias
2022-11-10 11:22:33 -08:00
parent 1d253ac8e0
commit 0844f2e8ef
3 changed files with 12 additions and 6 deletions

View File

@@ -116,7 +116,7 @@ public class OverviewCommandHelper {
*/
@BinderThread
public void addCommand(int type) {
if (mPendingCommands.size() > MAX_QUEUE_SIZE) {
if (mPendingCommands.size() >= MAX_QUEUE_SIZE) {
return;
}
CommandInfo cmd = new CommandInfo(type);