-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #5455: Resolve crash in AudioViewModel by initializing state vari…
…ables (#5561) **Explanation:** Fixes #5455: - This PR addresses issue #5455, which involves a crash caused by `kotlin.UninitializedPropertyAccessException` in `AudioViewModel` when the device is rotated during exploration. - The fix ensures proper initialization of state variables in the `loadAudio()` function, which prevents the app from crashing due to uninitialized properties. **Essential Checklist:** - [x] The PR title and explanation each start with "Fix #5455: ". - [ ] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). **Before Changes Video :** https://github.com/user-attachments/assets/649c9869-3ce6-4e0c-bafa-9769ff6d655f **After Changes Video :** https://github.com/user-attachments/assets/6ded81c1-4846-4328-bd2e-b5c25420808b **Screenshot of Passing Tests on Espresso:** ![Screenshot 2024-12-10 185043](https://github.com/user-attachments/assets/730e972b-65ab-4831-823a-eca0f0893376) --------- Co-authored-by: Adhiambo Peres <[email protected]>
- Loading branch information
1 parent
e3642c2
commit f4a4a47
Showing
2 changed files
with
164 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters