funkwhale-app-android/app/src/main/java/audio/funkwhale/ffa
Hugh Daschbach c1eb9d6b2a Fix landscape view induced MainActivity leak.
With landscape view enabled (e.g. e06b2c7) in the app and auto
rotation enabled on the phone, switching between portrait and
landscape orientations leaks instances of MainActivity.  This prevents
garbage collection of not just the MainActivity object, but fragments
and other objects referenced by the Activity.

This is caused by repositories, the AppContext instance, the player
service, and authentication code maintaining a reference to the
context which with they are initialized.  So rather than initialize
these with an Activity context, pass them the Application context.

Activities are torn down and rebuilt on screen rotation.  The
Application context is not.

To enable instantiation of the FavoritedRepository with the
Application context, delay that repository’s initialization until
first use.  This ensures the Application context is fully initialized.
It is not fully initialized until the MainActivity has been fully
initialized.
2023-11-07 08:33:36 +00:00
..
activities Fix landscape view induced MainActivity leak. 2023-11-07 08:33:36 +00:00
adapters Refactor CoverArt.withContext(). 2023-11-07 08:33:36 +00:00
fragments Refactor CoverArt.withContext(). 2023-11-07 08:33:36 +00:00
koin Resolve warning: ExoDatabaseProvider deprecated. 2022-12-06 09:35:32 +01:00
model Transcode at 320kbps when bandwidth limitation is enabled 2023-04-23 17:50:32 +00:00
playback Refactor CoverArt.withContext(). 2023-11-07 08:33:36 +00:00
repositories Sort Favourites by time 2023-01-13 12:52:52 +01:00
utils Fix landscape view induced MainActivity leak. 2023-11-07 08:33:36 +00:00
viewmodel Fix buffering progress bar display 2023-10-02 20:30:09 +02:00
views Prevent BottomSheet tap leaking to nav panels. 2023-11-07 08:33:36 +00:00
FFA.kt RequentBus: replace deprecated implementation. 2022-12-06 09:35:32 +01:00