Skip to content

Fix part of #6203: Migrate domain layer from LegacyProfileId to ProfileId#6254

Open
Kishan8548 wants to merge 14 commits into
oppia:developfrom
Kishan8548:issue-6203-migrate-profileid-v2
Open

Fix part of #6203: Migrate domain layer from LegacyProfileId to ProfileId#6254
Kishan8548 wants to merge 14 commits into
oppia:developfrom
Kishan8548:issue-6203-migrate-profileid-v2

Conversation

@Kishan8548

@Kishan8548 Kishan8548 commented May 11, 2026

Copy link
Copy Markdown

Explanation

Fixes part of #6203

This PR migrates the domain-layer controller public APIs from the deprecated LegacyProfileId to the new ProfileId proto. The UI layer (ViewModels, Fragments, and Presenters) is intentionally left unchanged in this PR as part of a gradual migration strategy — boundary conversions using toProfileIdPreservingZero() are applied at all call sites where the UI still uses LegacyProfileId.

Domain layer changes (migrated to ProfileId)

ProfileManagementController:

  • loginToProfile, getProfile, getAudioLanguage, markProfileOnboardingStarted,
    markProfileOnboardingEnded, updateName, updatePin, updateProfileAvatar,
    updateProfileType, updateAllowDownloadAccess, updateEnableInLessonQuickLanguageSwitching,
    updateAudioLanguage, updateReadingTextSize, updateWifiPermissionDeviceSettings,
    updateTopicAutomaticallyPermissionDeviceSettings, updateNewProfileDetails,
    initializeLearnerId, deleteProfile, getCurrentProfileId, fetchLearnerId,
    fetchContinueAnimationSeenStatus, markContinueButtonAnimationSeen,
    retrieveSurveyLastShownTimestamp, updateSurveyLastShownTimestamp,
    updateLastSelectedClassroomId, retrieveLastSelectedClassroomId

TranslationController:

  • getAppLanguage, getAppLanguageLocale, getAppLanguageSelection,
    getWrittenTranslationContentLanguage, getWrittenTranslationContentLocale,
    getWrittenTranslationContentLanguageSelection, getAudioLanguagePreselection,
    getAudioTranslationContentLanguage, getAudioTranslationContentLocale,
    getAudioTranslationContentLanguageSelection, updateAppLanguage,
    updateWrittenTranslationContentLanguage, updateAudioTranslationContentLanguage

App-layer boundary conversions

Applied .toProfileIdPreservingZero() at all unmigrated call sites in: AnalyticsController, TopicController, TopicListController, ClassroomController, ExplorationDataController, ExplorationProgressController, QuestionAssessmentProgressController, SurveyGatingController, ApplicationLifecycleObserver, and ~50 UI Fragments/ViewModels/Presenters.

BUILD.bazel updates

Added //utility/src/main/java/org/oppia/android/util/profile:profile_id_migration_util dependency to all affected Bazel targets.

Tests updated

Domain tests:

  • ProfileManagementControllerTest
  • TranslationControllerTest
  • TopicControllerTest
  • ExplorationProgressControllerTest
  • AnalyticsControllerTest
  • ApplicationLifecycleObserverTest
  • QuestionAssessmentProgressControllerTest
  • SurveyGatingControllerTest
  • AudioPlayerControllerTest

App tests:

  • ActivityLanguageLocaleHandlerTest
  • AppLanguageLocaleHandlerTest
  • AppLanguageResourceHandlerTest
  • AppLanguageWatcherMixinTest
  • ExplorationActivityLocalTest
  • StateFragmentLocalTest
  • AudioLanguageFragmentTest
  • ExplorationActivityTest
  • StateFragmentTest
  • ProfileEditFragmentTest
  • ConceptCardFragmentTest
  • QuestionPlayerActivityTest
  • RevisionCardActivityTest
  • RevisionCardFragmentTest

Note: This supersedes #6253 which was closed due to an accidental force push.

Essential Checklist

  • The PR title starts with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The explanation section above starts with "Fixes #bugnum: " (If this PR fixes part of an issue, use instead: "Fixes part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio.
  • The PR is made from a branch that's not called develop and is up-to-date with develop.
  • The PR is assigned to the appropriate reviewers.

Copilot AI review requested due to automatic review settings May 11, 2026 13:22
@Kishan8548 Kishan8548 requested review from a team as code owners May 11, 2026 13:22
@Kishan8548 Kishan8548 requested a review from adhiamboperes May 11, 2026 13:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Migrates domain-layer controller APIs from deprecated LegacyProfileId to ProfileId, while keeping app/UI layer mostly on LegacyProfileId via boundary conversions (toProfileIdPreservingZero() / toLegacyProfileId()).

Changes:

  • Updated ProfileManagementController & TranslationController public APIs to accept ProfileId.
  • Added boundary conversions across domain/app call sites where LegacyProfileId is still used.
  • Updated Bazel targets & tests to compile against the migrated APIs.

Reviewed changes

Copilot reviewed 62 out of 62 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
testing/src/main/java/org/oppia/android/testing/profile/ProfileTestHelper.kt Converts Legacy->ProfileId when calling migrated domain APIs in tests.
domain/src/test/java/org/oppia/android/domain/translation/TranslationControllerTest.kt Updates tests to use ProfileId in translation controller calls.
domain/src/test/java/org/oppia/android/domain/topic/TopicControllerTest.kt Converts Legacy->ProfileId at translation controller boundary in tests.
domain/src/test/java/org/oppia/android/domain/profile/ProfileManagementControllerTest.kt Updates tests/constants to use ProfileId, adjusts analytics assertions.
domain/src/main/java/org/oppia/android/domain/translation/TranslationController.kt Migrates translation controller API to ProfileId and converts to legacy for persistence.
domain/src/main/java/org/oppia/android/domain/translation/BUILD.bazel Adds profile id migration util dep.
domain/src/main/java/org/oppia/android/domain/topic/TopicListController.kt Converts Legacy->ProfileId when calling translation controller.
domain/src/main/java/org/oppia/android/domain/topic/TopicController.kt Converts Legacy->ProfileId when calling translation controller.
domain/src/main/java/org/oppia/android/domain/survey/SurveyGatingController.kt Converts Legacy->ProfileId for migrated profile management calls.
domain/src/main/java/org/oppia/android/domain/survey/BUILD.bazel Adds profile id migration util dep.
domain/src/main/java/org/oppia/android/domain/question/QuestionAssessmentProgressController.kt Converts Legacy->ProfileId when calling translation controller.
domain/src/main/java/org/oppia/android/domain/profile/ProfileManagementController.kt Migrates profile management controller API to ProfileId; converts to legacy for analytics.
domain/src/main/java/org/oppia/android/domain/profile/BUILD.bazel Adds profile id migration util dep.
domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel Adds profile id migration util dep(s).
domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/ApplicationLifecycleObserver.kt Converts ProfileId->LegacyProfileId for analytics logging method.
domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/AnalyticsController.kt Converts Legacy->ProfileId when reading translation prefs.
domain/src/main/java/org/oppia/android/domain/exploration/ExplorationProgressController.kt Converts Legacy->ProfileId for migrated profile/translation calls.
domain/src/main/java/org/oppia/android/domain/exploration/ExplorationDataController.kt Converts Legacy->ProfileId for translation locale retrieval.
domain/src/main/java/org/oppia/android/domain/classroom/ClassroomController.kt Converts Legacy->ProfileId for translation locale retrieval.
domain/BUILD.bazel Adds profile id migration util dep.
app/src/main/java/org/oppia/android/app/walkthrough/welcome/WalkthroughWelcomeFragmentPresenter.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardFragmentPresenter.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivityPresenter.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivityPresenter.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/survey/SurveyWelcomeDialogFragmentPresenter.kt Converts Legacy->ProfileId for survey timestamp update.
app/src/main/java/org/oppia/android/app/splash/SplashActivityPresenter.kt Converts Legacy->ProfileId for login.
app/src/main/java/org/oppia/android/app/settings/profile/ProfileResetPinFragmentPresenter.kt Converts Legacy->ProfileId before calling migrated updatePin.
app/src/main/java/org/oppia/android/app/settings/profile/ProfileRenameFragmentPresenter.kt Updates profile id type used for updateName call.
app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditViewModel.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditFragmentPresenter.kt Mix of direct ProfileId construction and Legacy->ProfileId conversion for migrated calls.
app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonActivityPresenter.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressViewModel.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressActivityPresenter.kt Converts Legacy->ProfileId for avatar update.
app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureActivityPresenter.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/profile/ResetPinDialogFragmentPresenter.kt Converts Legacy->ProfileId before updatePin.
app/src/main/java/org/oppia/android/app/profile/ProfileLoginFragmentPresenter.kt Converts Legacy->ProfileId for profile retrieval and login.
app/src/main/java/org/oppia/android/app/profile/ProfileChooserFragmentPresenterV1.kt Converts Legacy->ProfileId for initializeLearnerId and login.
app/src/main/java/org/oppia/android/app/profile/ProfileChooserFragmentPresenter.kt Converts Legacy->ProfileId for onboarding end, initializeLearnerId, and login.
app/src/main/java/org/oppia/android/app/profile/PinPasswordViewModel.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/profile/PinPasswordActivityPresenter.kt Converts Legacy->ProfileId for login.
app/src/main/java/org/oppia/android/app/profile/AdminPinActivityPresenter.kt Converts Legacy->ProfileId for updatePin.
app/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt Converts Legacy->ProfileId for login.
app/src/main/java/org/oppia/android/app/player/state/StateViewModel.kt Converts Legacy->ProfileId for translation/profile calls.
app/src/main/java/org/oppia/android/app/player/exploration/ExplorationManagerFragmentPresenter.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/player/exploration/ExplorationFragmentPresenter.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/player/audio/AudioFragmentPresenter.kt Converts Legacy->ProfileId for audio language retrieval.
app/src/main/java/org/oppia/android/app/options/OptionsFragmentPresenter.kt Converts Legacy->ProfileId for reading size / language / audio updates.
app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt Converts Legacy->ProfileId for translation/profile providers.
app/src/main/java/org/oppia/android/app/options/AudioLanguageSelectionViewModel.kt Converts Legacy->ProfileId for audio preselection.
app/src/main/java/org/oppia/android/app/options/AppLanguageFragmentPresenterV1.kt Converts Legacy->ProfileId for app language updates.
app/src/main/java/org/oppia/android/app/options/AppLanguageFragmentPresenter.kt Converts Legacy->ProfileId for app language updates.
app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt Converts Legacy->ProfileId for app language updates.
app/src/main/java/org/oppia/android/app/onboarding/IntroFragmentPresenter.kt Converts Legacy->ProfileId for onboarding started.
app/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragmentPresenter.kt Converts Legacy->ProfileId for profile details update.
app/src/main/java/org/oppia/android/app/onboarding/AudioLanguageFragmentPresenter.kt Converts Legacy->ProfileId for translation updates and login.
app/src/main/java/org/oppia/android/app/onboarding/AdminIntroFragmentPresenter.kt Converts Legacy->ProfileId for onboarding started.
app/src/main/java/org/oppia/android/app/home/HomeViewModel.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/home/HomeFragmentPresenter.kt Converts Legacy->ProfileId for profile retrieval and onboarding end.
app/src/main/java/org/oppia/android/app/drawer/NavigationDrawerFragmentPresenter.kt Converts Legacy->ProfileId for profile retrieval.
app/src/main/java/org/oppia/android/app/classroom/ClassroomListViewModel.kt Converts Legacy->ProfileId for profile retrieval and classroom id preference retrieval.
app/src/main/java/org/oppia/android/app/classroom/ClassroomListFragmentPresenter.kt Converts Legacy->ProfileId for profile retrieval, preference update, onboarding end.
app/src/main/java/org/oppia/android/app/administratorcontrols/administratorcontrolsitemviewmodel/AdministratorControlsDownloadPermissionsViewModel.kt Converts Legacy->ProfileId for permission updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Kishan8548

Copy link
Copy Markdown
Author

@BenHenning , PTAL

@adhiamboperes

Copy link
Copy Markdown
Contributor

@Neer-rn, PTAL for a first pass.

@Kishan8548, just FYI for the human reviews, don't resolve the reviewer comments. But it is fine to do so for the copilot reviews.

@Kishan8548

Copy link
Copy Markdown
Author

@Neer-rn Fixed the failing checks/tests and pushed the latest updates. PTAL.

@Kishan8548

Copy link
Copy Markdown
Author

@Neer-rn i fixed some failing tests, please give workflow approval

@adhiamboperes

Copy link
Copy Markdown
Contributor

@Kishan8548, are you running your tests locally before pushing to CI?

@Kishan8548

Copy link
Copy Markdown
Author

@Kishan8548, are you running your tests locally before pushing to CI?

@adhiamboperes, I wasn't running the full Robolectric suite locally as it's very slow with Bazel. The failing tests were in test files that called the APIs I migrated but were still passing LegacyProfileId. I've fixed them now. Going forward I'll run the specific affected test targets locally. Thanks for the feedback!

@adhiamboperes

Copy link
Copy Markdown
Contributor

@Kishan8548, are you running your tests locally before pushing to CI?

@adhiamboperes, I wasn't running the full Robolectric suite locally as it's very slow with Bazel. The failing tests were in test files that called the APIs I migrated but were still passing LegacyProfileId. I've fixed them now. Going forward I'll run the specific affected test targets locally. Thanks for the feedback!

@Kishan8548, you will never need to run all the tests locally. Only run the targets affected by your changes, and open a discussion if you are facing problems running tests locally. See wiki.

@Neer-rn

Neer-rn commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the work @Kishan8548! I am looking at your changes form quiet few days. The code looks good, tests pass locally and app runs fine on my emulator. Few things I noticed before second pass:

  1. The PR title ends with Profi… Please update that.

  2. Some method names in the PR description dont match the actual code:

  • updateAvatar --> its actually updateProfileAvatar
  • updateWifiDownloadStatus --> couldnt find this method anywhere
  • updateAppPlayStoreDownloadAndUpdateStatus --> also couldnt find this
  • recordSurveyShownTimestamp --> its actually updateSurveyLastShownTimestamp

Also a few migrated methods are not mentioned at all. Can you update the description?

  1. PR says "UI layer intentionally left unchanged" but I see ProfileRenameFragmentPresenter and ProfileEditFragmentPresenter were modified. They now do ProfileId.newBuilder().setInternalId(...).build() directly instead of LegacyProfileId(...).toProfileIdPreservingZero() used in the rest of the PR. settings/profile/ is Task 8 in the issue so probably this should not be touched in this PR.

Also if you are worried about the failing CI checks I went though them and don't worry those are because first time contributor workflows need maintainer approval. They will turn green once we pass it.

After you make these changes please assign this to @adhiamboperes for the final pass.

@Neer-rn Neer-rn assigned Kishan8548 and unassigned Neer-rn May 14, 2026
…ppLanguageWatcherMixinTest

- AudioPlayerControllerTest: loginToProfile() now expects ProfileId;
  add .toProfileIdPreservingZero() conversion for rootProfileId
  (LegacyProfileId) and add the required import.

- AppLanguageWatcherMixinTest: ProfileId.internal_id is declared as
  'optional int32' in proto3. This means ProfileId.getDefaultInstance()
  (field unset, serializes to empty bytes) is NOT equal to
  ProfileId.newBuilder().setInternalId(0).build() (field explicitly set,
  serializes to 0x08 0x00). The mixin uses getCurrentProfileId() which
  calls newBuilder().setInternalId(0).build(), so the test must use the
  same construction to match the appLanguageCacheStoreMap key and trigger
  the correct cache-store observer.

Part of issue oppia#6203 (migrate LegacyProfileId -> ProfileId).
@Kishan8548 Kishan8548 changed the title Fix part of #6203: Migrate domain layer from LegacyProfileId to Profi… Fix part of #6203: Migrate domain layer from LegacyProfileId to ProfileId May 25, 2026
@Kishan8548

Copy link
Copy Markdown
Author

Thanks for the work @Kishan8548! I am looking at your changes form quiet few days. The code looks good, tests pass locally and app runs fine on my emulator. Few things I noticed before second pass:

1. The PR title ends with Profi… Please update that.

2. Some method names in the PR description dont match the actual code:


* `updateAvatar` --> its actually `updateProfileAvatar`

* `updateWifiDownloadStatus` --> couldnt find this method anywhere

* `updateAppPlayStoreDownloadAndUpdateStatus` --> also couldnt find this

* `recordSurveyShownTimestamp` --> its actually `updateSurveyLastShownTimestamp`

Also a few migrated methods are not mentioned at all. Can you update the description?

3. PR says "UI layer intentionally left unchanged" but I see `ProfileRenameFragmentPresenter` and `ProfileEditFragmentPresenter` were modified. They now do `ProfileId.newBuilder().setInternalId(...).build()` directly instead of `LegacyProfileId(...).toProfileIdPreservingZero()` used in the rest of the PR. settings/profile/ is Task 8 in the issue so probably this should not be touched in this PR.

Also if you are worried about the failing CI checks I went though them and don't worry those are because first time contributor workflows need maintainer approval. They will turn green once we pass it.

After you make these changes please assign this to @adhiamboperes for the final pass.

Hi @Neer-rn, thanks for the detailed review! I had university exams ongoing over the past couple of weeks and wasn't able to respond sooner — I've now gone through all the points:

  1. PR title — Already updated.
  2. Method names in description — I'll correct the description to match the actual method names (updateProfileAvatar, updateAppPlayStoreDownloadAndUpdateStatus, updateSurveyLastShownTimestamp). I also couldn't find updateFileDownloadStatus anywhere — I'll check and remove it if it doesn't exist.
  3. settings/profile files — Understood. ProfileRenameFragmentPresenter and ProfileEditFragmentPresenter should not be using ProfileId.newBuilder() directly. I'll revert those to keep LegacyProfileId construction inside the presenter and only call .toProfileIdPreservingZero() at the API boundary, consistent with the rest of the PR. I'll also fix ProfileEditFragmentTest accordingly.

I'll push the fixes shortly and reassign the PR to you for a final pass. Thanks again!

…Zero() at API boundaries

ProfileRenameFragmentPresenter, ProfileEditFragmentPresenter, and
ProfileEditFragmentTest were incorrectly using ProfileId.newBuilder()
directly. Per the migration pattern used throughout the rest of this PR,
settings/profile (Task 8) should keep LegacyProfileId construction inside
the presenter and only convert at the domain-API boundary using
.toProfileIdPreservingZero().

Part of issue oppia#6203.
@Kishan8548 Kishan8548 removed their assignment May 25, 2026
@Neer-rn Neer-rn assigned Kishan8548 and unassigned Neer-rn May 30, 2026
@Neer-rn

Neer-rn commented May 30, 2026

Copy link
Copy Markdown
Collaborator

@Kishan8548 left a small comment above, otherwise this PR LGTM!

Addressed review comment: removed unnecessary blank lines inside the
function call brackets around toProfileIdPreservingZero() calls.
Part of issue oppia#6203.
@Kishan8548

Copy link
Copy Markdown
Author

@Neer-rn Done! Removed the blank lines inside the brackets in all similar spots in SurveyGatingControllerTest. Thanks for the review.

@Neer-rn

Neer-rn commented May 30, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the work, @Kishan8548. Just one thing again: please don’t resolve the human reviewer’s comments yourself. You should either reply to the comment or leave it as it is. The reviewer will mark it as resolved if they are satisfied.

For now, this was a simple issue, but sometimes the issue might not actually be resolved and may need to be brought up again. This has already been mentioned before so please take care of this.

Other than that, it LGTM from my side. Over to you, @adhiamboperes PTAL

@Kishan8548

Copy link
Copy Markdown
Author

Thanks for the reviews! @Neer-rn
I'll make sure not to resolve reviewer comments myself in the future

@Neer-rn Neer-rn assigned adhiamboperes and unassigned Kishan8548 May 30, 2026
Comment on lines +161 to +163
profileId
) { translationController.getAppLanguageSelection(it.toProfileIdPreservingZero()) }
?.let { this.appLanguageSelection = it }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using lambdas as a workaround to pass params in resolveProfileOperation the function itself should be migrated since it exists in the same layer and how you did it adds unnecessary same layer conversion.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Migrated resolveProfileOperation to accept ProfileId? directly. The conversion now happens once at the call site via profileId?.toProfileIdPreservingZero() before being passed in, so the lambdas no longer need the same-layer conversion.

Comment on lines +165 to +171
profileId
) {
translationController.getWrittenTranslationContentLanguageSelection(
it.toProfileIdPreservingZero()
)
}
?.let { this.writtenTranslationLanguageSelection = it }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as 161-163.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed here as well — same approach.

Comment on lines +173 to +179
profileId
) {
translationController.getAudioTranslationContentLanguageSelection(
it.toProfileIdPreservingZero()
)
}
?.let { this.audioTranslationLanguageSelection = it }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as 161-163.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed here as well — same approach.

@oppiabot

oppiabot Bot commented May 31, 2026

Copy link
Copy Markdown

Hi @Kishan8548, it looks like some changes were requested on this pull request by @ShankhanilSaha. PTAL. Thanks!

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

APK & AAB differences analysis

Note that this is a summarized snapshot. See the CI artifacts for detailed differences.

Dev

Expand to see flavor specifics

Universal APK

APK file size: 19 MiB (old), 19 MiB (new), 2752 bytes (Removed)

APK download size (estimated): 18 MiB (old), 18 MiB (new), 6001 bytes (Removed)

Method count: 265520 (old), 265379 (new), 141 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 7119 (old), 7119 (new), 0 (No change)

  • Anim: 43 (old), 43 (new), 0 (No change)
  • Animator: 26 (old), 26 (new), 0 (No change)
  • Array: 15 (old), 15 (new), 0 (No change)
  • Attr: 922 (old), 922 (new), 0 (No change)
  • Bool: 9 (old), 9 (new), 0 (No change)
  • Color: 1005 (old), 1005 (new), 0 (No change)
  • Dimen: 1093 (old), 1093 (new), 0 (No change)
  • Drawable: 393 (old), 393 (new), 0 (No change)
  • Id: 1363 (old), 1363 (new), 0 (No change)
  • Integer: 37 (old), 37 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 401 (old), 401 (new), 0 (No change)
  • Menu: 3 (old), 3 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • Raw: 2 (old), 2 (new), 0 (No change)
  • String: 938 (old), 938 (new), 0 (No change)
  • Style: 840 (old), 840 (new), 0 (No change)
  • Xml: 7 (old), 7 (new), 0 (No change)

Lesson assets: 113 (old), 113 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 19 MiB (old), 19 MiB (new), 2756 bytes (Removed)
APK download size (estimated): 18 MiB (old), 18 MiB (new), 2928 bytes (Removed)
Method count: 265520 (old), 265379 (new), 141 (Removed)

Configuration hdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 18 KiB (old), 18 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 49 KiB (old), 49 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 86 KiB (old), 86 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 57 KiB (old), 57 KiB (new), 0 bytes (No change)
APK download size (estimated): 21 KiB (old), 21 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 64 KiB (old), 64 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Alpha

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 236 bytes (Added)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 863 bytes (Removed)

Method count: 118637 (old), 118615 (new), 22 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6054 (old), 6054 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 853 (old), 853 (new), 0 (No change)
  • Dimen: 815 (old), 815 (new), 0 (No change)
  • Drawable: 355 (old), 355 (new), 0 (No change)
  • Id: 1304 (old), 1304 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 359 (old), 359 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 859 (old), 859 (new), 0 (No change)
  • Style: 486 (old), 486 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 114 (old), 114 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 232 bytes (Added)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 706 bytes (Removed)
Method count: 118637 (old), 118615 (new), 22 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Beta

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 180 bytes (Added)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 989 bytes (Added)

Method count: 118641 (old), 118619 (new), 22 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6054 (old), 6054 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 853 (old), 853 (new), 0 (No change)
  • Dimen: 815 (old), 815 (new), 0 (No change)
  • Drawable: 355 (old), 355 (new), 0 (No change)
  • Id: 1304 (old), 1304 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 359 (old), 359 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 859 (old), 859 (new), 0 (No change)
  • Style: 486 (old), 486 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 114 (old), 114 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 180 bytes (Added)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 688 bytes (Added)
Method count: 118641 (old), 118619 (new), 22 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Ga

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 216 bytes (Added)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 122 bytes (Removed)

Method count: 118641 (old), 118619 (new), 22 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6054 (old), 6054 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 853 (old), 853 (new), 0 (No change)
  • Dimen: 815 (old), 815 (new), 0 (No change)
  • Drawable: 355 (old), 355 (new), 0 (No change)
  • Id: 1304 (old), 1304 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 359 (old), 359 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 859 (old), 859 (new), 0 (No change)
  • Style: 486 (old), 486 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 114 (old), 114 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 220 bytes (Added)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 246 bytes (Added)
Method count: 118641 (old), 118619 (new), 22 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

this.priority = priority
this.context = context
profileId?.let { this.profileId = it }
val profileIdNew = profileId?.toProfileIdPreservingZero()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to create this variable, profileId?.toProfileIdPreservingZero() can be passed directly in resolveProfileOperation(). Adding this adds more stuff to clear up during cleanup after complete migration.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, removed the intermediate variable — passing profileId?.toProfileIdPreservingZero() directly at each call site now.

Comment on lines +167 to +168
profileIdNew
) { translationController.getWrittenTranslationContentLanguageSelection(it) }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed here as well.

Comment on lines +171 to +172
profileIdNew
) { translationController.getAudioTranslationContentLanguageSelection(it) }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed here as well.

Comment on lines +163 to +164
profileIdNew
) { translationController.getAppLanguageSelection(it) }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are still using the lambda, I would prefer that the params are passed how they are passed right now in the develop branch and since resolveProfileOperation() is updated in this PR it should not be an issue to use the old way.
Thus, it should look something like

resolveProfileOperation(
    profileId?.toProfileIdPreservingZero(),
    translationController::getAudioTranslationContentLanguageSelection
)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion in the previous commit. Fixed now — using method references and passing profileId?.toProfileIdPreservingZero() directly as suggested.

@Neer-rn

Neer-rn commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Thanks @ShankhanilSaha, your comments make sense. Since you have more context on this migration, wanted to quickly check one more thing with you.

I noticed the earlier Copilot comment about TranslationController cache keys may still apply. The maps are keyed by ProfileId, but the store is created using profileId.toLegacyProfileId(). Because ProfileId tracks presence for internal_id, unset 0 and explicit 0 can be different map keys while still pointing to the same legacy profile directory.

I checked the current call sites and most seem to use toProfileIdPreservingZero(), so I am not sure if this is reachable today or just defensive cleanup. Do you think we should ask Kishan to normalize the key in this PR, or leave it for later?

@ShankhanilSaha

Copy link
Copy Markdown
Member

@Neer-rn leaving it for later should be fine for now.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

APK & AAB differences analysis

Note that this is a summarized snapshot. See the CI artifacts for detailed differences.

Dev

Expand to see flavor specifics

Universal APK

APK file size: 19 MiB (old), 19 MiB (new), 2824 bytes (Removed)

APK download size (estimated): 18 MiB (old), 18 MiB (new), 4868 bytes (Removed)

Method count: 265520 (old), 265378 (new), 142 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 7119 (old), 7119 (new), 0 (No change)

  • Anim: 43 (old), 43 (new), 0 (No change)
  • Animator: 26 (old), 26 (new), 0 (No change)
  • Array: 15 (old), 15 (new), 0 (No change)
  • Attr: 922 (old), 922 (new), 0 (No change)
  • Bool: 9 (old), 9 (new), 0 (No change)
  • Color: 1005 (old), 1005 (new), 0 (No change)
  • Dimen: 1093 (old), 1093 (new), 0 (No change)
  • Drawable: 393 (old), 393 (new), 0 (No change)
  • Id: 1363 (old), 1363 (new), 0 (No change)
  • Integer: 37 (old), 37 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 401 (old), 401 (new), 0 (No change)
  • Menu: 3 (old), 3 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • Raw: 2 (old), 2 (new), 0 (No change)
  • String: 938 (old), 938 (new), 0 (No change)
  • Style: 840 (old), 840 (new), 0 (No change)
  • Xml: 7 (old), 7 (new), 0 (No change)

Lesson assets: 113 (old), 113 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 19 MiB (old), 19 MiB (new), 2828 bytes (Removed)
APK download size (estimated): 18 MiB (old), 18 MiB (new), 2106 bytes (Removed)
Method count: 265520 (old), 265378 (new), 142 (Removed)

Configuration hdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 18 KiB (old), 18 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 49 KiB (old), 49 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 46 KiB (old), 46 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 86 KiB (old), 86 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 57 KiB (old), 57 KiB (new), 0 bytes (No change)
APK download size (estimated): 21 KiB (old), 21 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 64 KiB (old), 64 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Alpha

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 320 bytes (Added)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 35 bytes (Added)

Method count: 118637 (old), 118614 (new), 23 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6054 (old), 6054 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 853 (old), 853 (new), 0 (No change)
  • Dimen: 815 (old), 815 (new), 0 (No change)
  • Drawable: 355 (old), 355 (new), 0 (No change)
  • Id: 1304 (old), 1304 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 359 (old), 359 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 859 (old), 859 (new), 0 (No change)
  • Style: 486 (old), 486 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 114 (old), 114 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 320 bytes (Added)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 16 bytes (Added)
Method count: 118637 (old), 118614 (new), 23 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Beta

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 268 bytes (Added)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 3 bytes (Added)

Method count: 118641 (old), 118618 (new), 23 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6054 (old), 6054 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 853 (old), 853 (new), 0 (No change)
  • Dimen: 815 (old), 815 (new), 0 (No change)
  • Drawable: 355 (old), 355 (new), 0 (No change)
  • Id: 1304 (old), 1304 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 359 (old), 359 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 859 (old), 859 (new), 0 (No change)
  • Style: 486 (old), 486 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 114 (old), 114 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 264 bytes (Added)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 158 bytes (Removed)
Method count: 118641 (old), 118618 (new), 23 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Ga

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 244 bytes (Added)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 1075 bytes (Added)

Method count: 118641 (old), 118618 (new), 23 (Removed)

Features: 1 (old), 1 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6054 (old), 6054 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 853 (old), 853 (new), 0 (No change)
  • Dimen: 815 (old), 815 (new), 0 (No change)
  • Drawable: 355 (old), 355 (new), 0 (No change)
  • Id: 1304 (old), 1304 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 359 (old), 359 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 859 (old), 859 (new), 0 (No change)
  • Style: 486 (old), 486 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 114 (old), 114 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 248 bytes (Added)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 678 bytes (Added)
Method count: 118641 (old), 118618 (new), 23 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

@adhiamboperes adhiamboperes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Kishan8548!

I have reviewed about 60 of the 82 files, and I had to stop becase of some confusion.

Many files in the app layer have been refactored to use the migration util, which is expected. However, some of the domain ones have too, like the AnalyticsController.kt.

Morever, some of the tests are switching to ProfileId, but as far as I could tell, their corresponding presenter/viewmodels were still using the LegacyProfileId with the migration util.

I have reread the PR description and it says that the domain layer controllers are expected to migrate away from LegacyProfileId.

Could you please clarify the changes expected in the PR?

Comment on lines +304 to +306
profileManagementController.markProfileOnboardingEnded(
profileId.toProfileIdPreservingZero()
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it is okay to use the toProfileIdUnsetIfZero util because an additional profile can never be zero(since they must be created by an existing admin).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto in the HomeFragmentPresenter

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Switched to toProfileIdUnsetIfZero in both ClassroomListFragmentPresenter and HomeFragmentPresenter for markProfileOnboardingEnded calls since non-admin profiles can never have internalId=0.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please recheck, only the ADDITIONAL_LEARNER typecase should use toProfileIdUnsetIfZero. The SOLE_LEARNER case above is also an admin and can be zero. This is a new pathway, and is not well documented yet, so apologies for the confusion. Please fix that in the HomeFragmentPresenter as well.

@adhiamboperes adhiamboperes removed their assignment Jun 8, 2026
- Use toProfileIdUnsetIfZero for markProfileOnboardingEnded in
  ClassroomListFragmentPresenter and HomeFragmentPresenter since
  non-admin profiles can never have internalId=0
- Revert direct ProfileId construction in AudioLanguageFragmentTest,
  ExplorationActivityLocalTest, ActivityLanguageLocaleHandlerTest
  to use LegacyProfileId + toProfileIdPreservingZero pattern
Part of issue oppia#6203.
@Kishan8548

Copy link
Copy Markdown
Author

@adhiamboperes Thanks for the detailed review! To clarify the PR scope:

  • Primary migration: ProfileManagementController and TranslationController public APIs now accept ProfileId instead of LegacyProfileId.
  • App layer & other domain files: Still use LegacyProfileId internally and convert at the call site using toProfileIdPreservingZero() — this is intentional as a gradual migration strategy.
  • AnalyticsController: Its public API still takes LegacyProfileId (called from the app layer), but internally converts to ProfileId to call the migrated TranslationController methods — hence the migration util usage there.
  • Tests: App-layer tests should follow the same LegacyProfileId + migration util pattern — fixed the ones that were incorrectly using ProfileId.newBuilder() directly.
  • markProfileOnboardingEnded: Switched to toProfileIdUnsetIfZero as suggested since non-admin profiles can never have internalId=0.

@adhiamboperes adhiamboperes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Kishan8548!

I reviewed the remaining files and left a correction. PTAL. Also wait to see if the current CI passes before pushing a new commit to hopefully speed up the next review cycle.

Comment on lines +304 to +306
profileManagementController.markProfileOnboardingEnded(
profileId.toProfileIdPreservingZero()
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please recheck, only the ADDITIONAL_LEARNER typecase should use toProfileIdUnsetIfZero. The SOLE_LEARNER case above is also an admin and can be zero. This is a new pathway, and is not well documented yet, so apologies for the confusion. Please fix that in the HomeFragmentPresenter as well.

@Kishan8548

Kishan8548 commented Jun 11, 2026

Copy link
Copy Markdown
Author

@adhiamboperes Done! Fixed in both ClassroomListFragmentPresenter and HomeFragmentPresenterSOLE_LEARNER now uses toProfileIdPreservingZero() and only ADDITIONAL_LEARNER uses toProfileIdUnsetIfZero(). And glad it's clearer now — the app layer migration will be handled in the next round. Thanks for the patience! 🙏

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants