[AutofillAi][HoT] Fix back button navigation in 2 fragments. [chromium/src : main]

0 views
Skip to first unread message

Josef Raska (Gerrit)

unread,
Jul 9, 2026, 11:41:33 AM (2 days ago) Jul 9
to Timofey Chudakov, Chromium LUCI CQ, Moe Adel, chromium...@chromium.org, Jinsuk Kim, browser-comp...@chromium.org
Attention needed from Timofey Chudakov

Josef Raska voted and added 1 comment

Votes added by Josef Raska

Code-Review+1

1 comment

File chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/settings/personal_context/AutofillPersonalContextFragment.java
Line 65, Patchset 2 (Latest): .addMenuProvider(new AutofillHelpMenuProvider(this), this, Lifecycle.State.RESUMED);
Josef Raska . unresolved

Curious: How this fixes the back button?

Open in Gerrit

Related details

Attention is currently required from:
  • Timofey Chudakov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement 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: Idb29be5c840685de817fe4970eca778e782af5fa
Gerrit-Change-Number: 8063937
Gerrit-PatchSet: 2
Gerrit-Owner: Timofey Chudakov <tchu...@google.com>
Gerrit-Reviewer: Josef Raska <josef...@google.com>
Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
Gerrit-CC: Jinsuk Kim <jins...@chromium.org>
Gerrit-CC: Moe Adel <ad...@google.com>
Gerrit-Attention: Timofey Chudakov <tchu...@google.com>
Gerrit-Comment-Date: Thu, 09 Jul 2026 15:41:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Timofey Chudakov (Gerrit)

unread,
Jul 10, 2026, 9:39:15 AM (yesterday) Jul 10
to Josef Raska, Chromium LUCI CQ, Moe Adel, chromium...@chromium.org, Jinsuk Kim, browser-comp...@chromium.org
Attention needed from Josef Raska

Timofey Chudakov voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Josef Raska
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: Idb29be5c840685de817fe4970eca778e782af5fa
    Gerrit-Change-Number: 8063937
    Gerrit-PatchSet: 4
    Gerrit-Owner: Timofey Chudakov <tchu...@google.com>
    Gerrit-Reviewer: Josef Raska <josef...@google.com>
    Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
    Gerrit-CC: Jinsuk Kim <jins...@chromium.org>
    Gerrit-CC: Moe Adel <ad...@google.com>
    Gerrit-Attention: Josef Raska <josef...@google.com>
    Gerrit-Comment-Date: Fri, 10 Jul 2026 13:38:56 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Timofey Chudakov (Gerrit)

    unread,
    Jul 10, 2026, 9:45:50 AM (yesterday) Jul 10
    to Josef Raska, Chromium LUCI CQ, Moe Adel, chromium...@chromium.org, Jinsuk Kim, browser-comp...@chromium.org
    Attention needed from Josef Raska

    Timofey Chudakov added 1 comment

    File chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/settings/personal_context/AutofillPersonalContextFragment.java
    Line 65, Patchset 2: .addMenuProvider(new AutofillHelpMenuProvider(this), this, Lifecycle.State.RESUMED);
    Josef Raska . unresolved

    Curious: How this fixes the back button?

    Timofey Chudakov

    The bug has to do with the setHasOptionsMenu(true).

    By looking at the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java;l=1333;drc=c6e699ed89869035210a281f78b1065a51d5a0b8), this method sets the `mHasMenu` member variable.

    When the menu is clicked and the click is handled, the `onOptionsItemSelected` is [invoked](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java;l=3264;drc=c6e699ed89869035210a281f78b1065a51d5a0b8). I haven't figured out the exact reason why it breaks the back button navigation, because calling `onOptionsItemSelected` for the back button should return `false`, the `AutofillOptionsFragment` doesn't [handle](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/settings/options/AutofillOptionsFragment.java;l=188-196;drc=25829d5b45397a4ae3d243ff77c468981493c39a) this item.

    Gerrit-Comment-Date: Fri, 10 Jul 2026 13:45:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Josef Raska <josef...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Josef Raska (Gerrit)

    unread,
    Jul 10, 2026, 10:50:23 AM (yesterday) Jul 10
    to Timofey Chudakov, Chromium LUCI CQ, Moe Adel, chromium...@chromium.org, Jinsuk Kim, browser-comp...@chromium.org
    Attention needed from Timofey Chudakov

    Josef Raska added 1 comment

    File chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/settings/personal_context/AutofillPersonalContextFragment.java
    Line 65, Patchset 2: .addMenuProvider(new AutofillHelpMenuProvider(this), this, Lifecycle.State.RESUMED);
    Josef Raska . resolved

    Curious: How this fixes the back button?

    Timofey Chudakov

    The bug has to do with the setHasOptionsMenu(true).

    By looking at the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java;l=1333;drc=c6e699ed89869035210a281f78b1065a51d5a0b8), this method sets the `mHasMenu` member variable.

    When the menu is clicked and the click is handled, the `onOptionsItemSelected` is [invoked](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java;l=3264;drc=c6e699ed89869035210a281f78b1065a51d5a0b8). I haven't figured out the exact reason why it breaks the back button navigation, because calling `onOptionsItemSelected` for the back button should return `false`, the `AutofillOptionsFragment` doesn't [handle](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/settings/options/AutofillOptionsFragment.java;l=188-196;drc=25829d5b45397a4ae3d243ff77c468981493c39a) this item.

    Josef Raska

    Ok, thanks for checking, explaining and fixing the bug at the first place! 😊

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Timofey Chudakov
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: Idb29be5c840685de817fe4970eca778e782af5fa
      Gerrit-Change-Number: 8063937
      Gerrit-PatchSet: 4
      Gerrit-Owner: Timofey Chudakov <tchu...@google.com>
      Gerrit-Reviewer: Josef Raska <josef...@google.com>
      Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
      Gerrit-CC: Jinsuk Kim <jins...@chromium.org>
      Gerrit-CC: Moe Adel <ad...@google.com>
      Gerrit-Attention: Timofey Chudakov <tchu...@google.com>
      Gerrit-Comment-Date: Fri, 10 Jul 2026 14:50:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Josef Raska <josef...@google.com>
      Comment-In-Reply-To: Timofey Chudakov <tchu...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Josef Raska (Gerrit)

      unread,
      Jul 10, 2026, 10:50:26 AM (yesterday) Jul 10
      to Timofey Chudakov, Chromium LUCI CQ, Moe Adel, chromium...@chromium.org, Jinsuk Kim, browser-comp...@chromium.org
      Attention needed from Timofey Chudakov

      Josef Raska voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Timofey Chudakov
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement 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: Idb29be5c840685de817fe4970eca778e782af5fa
        Gerrit-Change-Number: 8063937
        Gerrit-PatchSet: 4
        Gerrit-Owner: Timofey Chudakov <tchu...@google.com>
        Gerrit-Reviewer: Josef Raska <josef...@google.com>
        Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
        Gerrit-CC: Jinsuk Kim <jins...@chromium.org>
        Gerrit-CC: Moe Adel <ad...@google.com>
        Gerrit-Attention: Timofey Chudakov <tchu...@google.com>
        Gerrit-Comment-Date: Fri, 10 Jul 2026 14:50:11 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Timofey Chudakov (Gerrit)

        unread,
        Jul 10, 2026, 11:41:54 AM (yesterday) Jul 10
        to Josef Raska, Chromium LUCI CQ, Moe Adel, chromium...@chromium.org, Jinsuk Kim, browser-comp...@chromium.org
        Attention needed from Josef Raska

        Timofey Chudakov voted

        Auto-Submit+1
        Commit-Queue+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Josef Raska
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement 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: Idb29be5c840685de817fe4970eca778e782af5fa
          Gerrit-Change-Number: 8063937
          Gerrit-PatchSet: 5
          Gerrit-Owner: Timofey Chudakov <tchu...@google.com>
          Gerrit-Reviewer: Josef Raska <josef...@google.com>
          Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
          Gerrit-CC: Jinsuk Kim <jins...@chromium.org>
          Gerrit-CC: Moe Adel <ad...@google.com>
          Gerrit-Attention: Josef Raska <josef...@google.com>
          Gerrit-Comment-Date: Fri, 10 Jul 2026 15:41:36 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Josef Raska (Gerrit)

          unread,
          7:12 AM (7 hours ago) 7:12 AM
          to Timofey Chudakov, Chromium LUCI CQ, Moe Adel, chromium...@chromium.org, Jinsuk Kim, browser-comp...@chromium.org
          Attention needed from Timofey Chudakov

          Josef Raska voted

          Code-Review+1
          Commit-Queue+2
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Timofey Chudakov
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement 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: Idb29be5c840685de817fe4970eca778e782af5fa
            Gerrit-Change-Number: 8063937
            Gerrit-PatchSet: 5
            Gerrit-Owner: Timofey Chudakov <tchu...@google.com>
            Gerrit-Reviewer: Josef Raska <josef...@google.com>
            Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
            Gerrit-CC: Jinsuk Kim <jins...@chromium.org>
            Gerrit-CC: Moe Adel <ad...@google.com>
            Gerrit-Attention: Timofey Chudakov <tchu...@google.com>
            Gerrit-Comment-Date: Sat, 11 Jul 2026 11:12:07 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Chromium LUCI CQ (Gerrit)

            unread,
            7:16 AM (7 hours ago) 7:16 AM
            to Timofey Chudakov, Josef Raska, Moe Adel, chromium...@chromium.org, Jinsuk Kim, browser-comp...@chromium.org

            Chromium LUCI CQ submitted the change

            Change information

            Commit message:
            [AutofillAi][HoT] Fix back button navigation in 2 fragments.

            This CL fixes a bug where the back button was a no-op in the
            AutofillOptionsFragment and AutofillPersonalContextFragment.
            Bypass-Check-License: Files were moved.
            Bug: 514254170
            Change-Id: Idb29be5c840685de817fe4970eca778e782af5fa
            Auto-Submit: Timofey Chudakov <tchu...@google.com>
            Commit-Queue: Josef Raska <josef...@google.com>
            Reviewed-by: Josef Raska <josef...@google.com>
            Cr-Commit-Position: refs/heads/main@{#1660717}
            Files:
            • M chrome/browser/autofill/android/BUILD.gn
            • M chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/settings/options/AutofillOptionsFragment.java
            • M chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/settings/personal_context/AutofillPersonalContextFragment.java
            • M chrome/browser/autofill/android/junit/src/org/chromium/chrome/browser/autofill/settings/options/AutofillOptionsTest.java
            Change size: M
            Delta: 4 files changed, 14 insertions(+), 52 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by Josef Raska
            Open in Gerrit
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: merged
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Idb29be5c840685de817fe4970eca778e782af5fa
            Gerrit-Change-Number: 8063937
            Gerrit-PatchSet: 6
            Gerrit-Owner: Timofey Chudakov <tchu...@google.com>
            Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Reviewer: Josef Raska <josef...@google.com>
            Gerrit-Reviewer: Timofey Chudakov <tchu...@google.com>
            open
            diffy
            satisfied_requirement
            Reply all
            Reply to author
            Forward
            0 new messages