Fix: Handle back press in pinned mode to prevent splash screen lockup [chromium/src : main]

0 views
Skip to first unread message

Matěj Trakal (Gerrit)

unread,
Jun 9, 2026, 3:38:22 AMJun 9
to Sinan Sahin, chromium...@chromium.org, Peter Beverloo, lizeb+watch...@chromium.org
Attention needed from Sinan Sahin

Matěj Trakal voted and added 1 comment

Votes added by Matěj Trakal

Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Matěj Trakal . resolved

Hello, please try to look on this bugfix. It's a small change in Android part. Please also start Dry run for me (I'm new here). Thanks a lot

Open in Gerrit

Related details

Attention is currently required from:
  • Sinan Sahin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I69f8d60f525aedfa7f9914afe000bcb4b3befd34
Gerrit-Change-Number: 7911242
Gerrit-PatchSet: 2
Gerrit-Owner: Matěj Trakal <mtr...@gmail.com>
Gerrit-Reviewer: Matěj Trakal <mtr...@gmail.com>
Gerrit-Reviewer: Sinan Sahin <sinan...@google.com>
Gerrit-CC: Peter Beverloo <pe...@chromium.org>
Gerrit-Attention: Sinan Sahin <sinan...@google.com>
Gerrit-Comment-Date: Tue, 09 Jun 2026 07:38:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sinan Sahin (Gerrit)

unread,
Jun 9, 2026, 6:53:34 PMJun 9
to Matěj Trakal, Peter Conn, Chromium LUCI CQ, chromium...@chromium.org, Peter Beverloo, lizeb+watch...@chromium.org
Attention needed from Matěj Trakal and Peter Conn

Sinan Sahin added 1 comment

Patchset-level comments
Sinan Sahin . resolved

Peter, can I ask you to take a look? This involves the web app splash screen.

Open in Gerrit

Related details

Attention is currently required from:
  • Matěj Trakal
  • Peter Conn
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I69f8d60f525aedfa7f9914afe000bcb4b3befd34
Gerrit-Change-Number: 7911242
Gerrit-PatchSet: 2
Gerrit-Owner: Matěj Trakal <mtr...@gmail.com>
Gerrit-Reviewer: Matěj Trakal <mtr...@gmail.com>
Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
Gerrit-CC: Peter Beverloo <pe...@chromium.org>
Gerrit-CC: Sinan Sahin <sinan...@google.com>
Gerrit-Attention: Peter Conn <pec...@chromium.org>
Gerrit-Attention: Matěj Trakal <mtr...@gmail.com>
Gerrit-Comment-Date: Tue, 09 Jun 2026 22:53:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Helmut Januschka (Gerrit)

unread,
7:36 AM (7 hours ago) 7:36 AM
to Matěj Trakal, Peter Conn, Sinan Sahin, Chromium LUCI CQ, chromium...@chromium.org, Peter Beverloo, lizeb+watch...@chromium.org
Attention needed from Matěj Trakal and Peter Conn

Helmut Januschka added 5 comments

Patchset-level comments
Helmut Januschka . unresolved

This fix mitigates the symptom in the CCT back-press path, but the underlying corrupted splash state is still reachable through other exits (system kill, config change, notification return). The real bug appears to be in SplashController#bringSplashBackToFront() not guarding on mWasSplashHideAnimationStarted, and in TwaFinishHandler reporting success before the async WebAPK IPC completes.

Could you either (a) fix it there, or (b) leave a TODO(crbug/40746880) and file a follow-up so this doesn't get forgotten?

Commit Message
Line 9, Patchset 2 (Latest):Bug: 40746880
Helmut Januschka . unresolved

put `Bug: 40746880` at the bottom, below `Change-Id`

File chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/CustomTabActivityNavigationController.java
Line 296, Patchset 2 (Latest): if (isScreenPinned()) return true;
Helmut Januschka . unresolved

there is cases where this path hit without being a PWA/TWA/WebAPK like Auth Tab, Payment Handler, are we sure this is not too broad?

can we add tests for it?
`ShadowActivityManager.setLockTaskModeState(...)` in covers this cleanly; add cases for LOCK_TASK_MODE_NONE, LOCK_TASK_MODE_PINNED, and LOCK_TASK_MODE_LOCKED against TWA + plain CCT intent providers.

Line 297, Patchset 2 (Latest):
Helmut Januschka . unresolved

optional nit: wonder if these could be simplified and condensed?
it kinda duplicates the isScreenPinned documentation.

Line 339, Patchset 2 (Latest): return am != null && am.getLockTaskModeState() == ActivityManager.LOCK_TASK_MODE_PINNED;
Helmut Januschka . unresolved

getLockTaskModeState() also returns LOCK_TASK_MODE_LOCKED for kiosk mode, in which finish() is blocked identically. Either compare against != LOCK_TASK_MODE_NONE (and rename isScreenPinned() -> isInLockTaskMode()), or justify pinned-only in the Javadoc.

Open in Gerrit

Related details

Attention is currently required from:
  • Matěj Trakal
  • Peter Conn
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I69f8d60f525aedfa7f9914afe000bcb4b3befd34
    Gerrit-Change-Number: 7911242
    Gerrit-PatchSet: 2
    Gerrit-Owner: Matěj Trakal <mtr...@gmail.com>
    Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
    Gerrit-Reviewer: Matěj Trakal <mtr...@gmail.com>
    Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
    Gerrit-CC: Peter Beverloo <pe...@chromium.org>
    Gerrit-CC: Sinan Sahin <sinan...@google.com>
    Gerrit-Attention: Peter Conn <pec...@chromium.org>
    Gerrit-Attention: Matěj Trakal <mtr...@gmail.com>
    Gerrit-Comment-Date: Sat, 11 Jul 2026 11:36:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages