launcher3: Handle case where install session could be invalid.

If the install session comes back as invalid, we can fail to add
a promise icon which leads to icons not showing up on the workspace.

Bug: 419426642
Test: None yet
Flag: EXEMPT Bug fix
Change-Id: I592948eb2b60c2249bb5b141d499d1d5ea01aebc
This commit is contained in:
Adnan Begovic
2025-06-03 12:48:54 -07:00
parent 6dcc0a10f3
commit 0e8be78021
2 changed files with 7 additions and 1 deletions
@@ -195,7 +195,8 @@ public class InstallSessionHelper {
@WorkerThread
public boolean promiseIconAddedForId(final int sessionId) {
return getPromiseIconIds().contains(sessionId);
// Make sure the session id is valid.
return sessionId != -1 && getPromiseIconIds().contains(sessionId);
}
@WorkerThread