funkwhale-app-android/app/src/main/java/audio/funkwhale/ffa/utils
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
..
AppContext.kt Fix landscape view induced MainActivity leak. 2023-11-07 08:33:36 +00:00
Bottleneck.kt Custom cache layer for cover art which ignores (pre-signed URL) query 2023-01-10 10:00:41 +00:00
BottomSheetIneractable.kt Improve player bottom sheet, in particular fling support 2023-09-18 17:35:26 +02:00
Bus.kt Fix bottom sheet being hidden in certain conditions 2023-09-18 20:18:52 +02:00
CoverArt.kt Refactor CoverArt.withContext(). 2023-11-07 08:33:36 +00:00
Extensions.kt Improve player bottom sheet, in particular fling support 2023-09-18 17:35:26 +02:00
FFACache.kt Upgrade to Kotlin 1.7.0 2022-08-26 12:06:41 +00:00
FuelResult.kt Fix existing linting problems 2021-09-09 09:56:15 +02:00
OAuth.kt LoginActivity: startActivityForResult deprecated. 2022-12-06 09:35:33 +01:00
RefreshError.kt Upgrading Android Gradle Plugin 2021-08-22 09:48:36 +02:00
Userinfo.kt Upgrading Android Gradle Plugin 2021-08-22 09:48:36 +02:00
Util.kt Minor adjustments to get rid of deprecation warnings 2021-08-27 13:28:23 +02:00
ViewBindings.kt Improve player bottom sheet, in particular fling support 2023-09-18 17:35:26 +02:00