Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 623a184a authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

Fixes memory leak and NPE crash issue (2/3).

We were incorrectly depending on the navigator in the view-model. The
view-model is long-lived and used across fragment/activity lifecycles.
The navigator is the fragment itself. It's not correct to keep a
reference to it in a long-lived object like the view-model. This leads
to memory leaks and to NPE crashes when attempting to touch the "more
wallpapers" button after changing the wallpaper at least once.

The approach is to remove the reference from view-model and move the
navigation logic out into the binder and section controller.

Bug: 262924643
Test: manually verified that changing the wallpaper and then clicking
the "more wallpapers" button no longer crashes

Change-Id: Ib564d1afcf346710d1ab116596336ccad5accbde
parent 7bda0fd0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment