Skip to content

Update baseline profile with DeckPicker onResume journey#8

Open
Galal-20 wants to merge 1 commit intocriticalAY:baseline-profilesfrom
Galal-20:Baseline-Profile-Add-a-test
Open

Update baseline profile with DeckPicker onResume journey#8
Galal-20 wants to merge 1 commit intocriticalAY:baseline-profilesfrom
Galal-20:Baseline-Profile-Add-a-test

Conversation

@Galal-20
Copy link
Copy Markdown

Purpose / Description

Add a baseline profile test to ensure that DeckPicker.onResume() is executed and captured during profile generation.

Fixes

Approach

  • Added a new test confirmOnResumeIsCalled

  • The test performs:

    • App launch
    • Navigates from DeckPicker to PreferencesActivity via the navigation drawer
    • Returns back to DeckPicker using back navigation
  • This guarantees that DeckPicker.onResume() is triggered during the baseline profile collection

  • Verified that the method is included in the generated baseline profile: SPLcom/ichi2/anki/DeckPicker;->onResume()V

How Has This Been Tested?

Steps:

  1. Run: ./gradlew :AnkiDroid:generateBaselineProfile
  2. Launch on a physical device (API 28+)
  3. Observe the test flow:
  • App launch
  • (Optional) Dismiss introduction screen
  • Open navigation drawer → Settings
  • Press back → return to DeckPicker
  1. Check generated file: AnkiDroid/src/main/generated/baselineProfiles/baseline-prof.txt

Result:

  • Confirmed that DeckPicker.onResume() is present in the baseline profile:
    SPLcom/ichi2/anki/DeckPicker;->onResume()V
  • Successfully added 1,190 new rules to the profile (an increase of ~7.6%).
  • Verified that the navigation flow works correctly without flakiness.

Test Environment:

  • Device: Pixel 9 Pro
  • API Level: 28+

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title.
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the [Google Accessibility Scanner]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant