Commit Graph

206 Commits

Author SHA1 Message Date
Hugh Daschbach 79e27578e5 Fix issue #124 - empty queue on restart.
The Gson deserializer required parameter is a reader object.  It
silently fails when passed a string.
2022-07-21 11:15:54 +00:00
Ryan Harg 8f1f565652 Bugfix/122 fix resource leakage 2022-06-21 08:03:46 +00:00
Ryan Harg c43baae8e8 #117: Use the same contentId when adding and removing downloads 2022-06-17 09:50:39 +00:00
Ryan Harg 1b0381fde4 #119: Default deserializer has no string deserialization implementation 2022-06-16 13:10:10 +00:00
Hugh Daschbach 37e270071a
Fix Bluetooth control button unresponsiveness.
With Oreo and later, Bluetooth control buttons may kill FFA if it is
not the foreground application.  Once this happens to resume playback,
one needs to restart playback from the phone, rather than the
play/pause action of Bluetooth headset.

For example:
    D MediaSessionService: Sending KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_PLAY, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, source=0x0 } to audio.funkwhale.ffa.dev/audio.funkwhale.ffa.dev (

    W ActivityManager: Background start not allowed: service Intent { act=android.intent.action.MEDIA_BUTTON cmp=audio.funkwhale.ffa.dev/audio.funkwhale.ffa.playback.PlayerService (has extras) } to audio.funkwhale.ffa.dev/audio.funkwhale.ffa.play
   549 uid=10149 pkg=audio.funkwhale.ffa.dev startFg?=false
    D AndroidRuntime: Shutting down VM
   --------- beginning of crash
    E AndroidRuntime: FATAL EXCEPTION: main
    E AndroidRuntime: Process: audio.funkwhale.ffa.dev, PID: 14549
    E AndroidRuntime: java.lang.IllegalStateException: Not allowed to start service Intent { act=android.intent.action.MEDIA_BUTTON cmp=audio.funkwhale.ffa.dev/audio.funkwhale.ffa.playback.PlayerService (has extras) }: app is in background uid UidRecord{72fa8f8 u0a149 CAC  bg:+11m56s597ms idle change:cached procs:1 seq(0,0,0)}
    E AndroidRuntime:        at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1577)
    E AndroidRuntime:        at android.app.ContextImpl.startService(ContextImpl.java:1532)
    E AndroidRuntime:        at android.content.ContextWrapper.startService(ContextWrapper.java:664)
    E AndroidRuntime:        at audio.funkwhale.ffa.playback.MediaSession$connector$2.invoke$lambda-3$lambda-2(MediaSession.kt:47)
    E AndroidRuntime:        at audio.funkwhale.ffa.playback.MediaSession$connector$2.$r8$lambda$jU84j_zRyeYuvwLrRY0b6XyQBMs(Unknown Source:0)
    E AndroidRuntime:        at audio.funkwhale.ffa.playback.MediaSession$connector$2$$ExternalSyntheticLambda0.onMediaButtonEvent(Unknown Source:2)
    E AndroidRuntime:        at com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector$ComponentListener.onMediaButtonEvent(MediaSessionConnector.java:1396)
    E AndroidRuntime:        at android.support.v4.media.session.MediaSessionCompat$Callback$MediaSessionCallbackApi21.onMediaButtonEvent(MediaSessionCompat.java:1602)
    E AndroidRuntime:        at android.media.session.MediaSession$CallbackMessageHandler.handleMessage(MediaSession.java:1471)
    E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
    E AndroidRuntime:        at android.os.Looper.loop(Looper.java:193)
    E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6718)
    E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
    E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
    E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
    W ActivityManager:   Force finishing activity audio.funkwhale.ffa.dev/audio.funkwhale.ffa.activities.MainActivity

xref: https://stackoverflow.com/questions/46445265/android-8-0-java-lang-illegalstateexception-not-allowed-to-start-service-inten
2022-06-16 14:02:20 +02:00
Ryan Harg 70d9ba241b Fix "A resource failed to call close." warnings. 2022-06-12 12:48:32 +00:00
Ryan Harg 20ee27da21 fix authorization 2022-06-11 14:37:38 +00:00
Ryan Harg a6b1730c4a #116: Fix playback order to respect preference setting on albums fragment 2022-04-22 11:39:14 +00:00
RenovateBot 89d4515cd4 Update dependency androidx.preference:preference-ktx to v1.2.0 2022-03-07 08:32:52 +00:00
Ryan Harg 45ef5eb189
Fix linting errors 2022-03-04 09:30:03 +01:00
Mouath Ibrahim c29e36c697 Bugfix/113 fix invalid null handling playlist 2022-02-25 09:35:01 +00:00
Ryan Harg 25ec60b1e5 #99: Initialize repository before using it 2021-09-17 17:15:00 +00:00
Ryan Harg 2891214eac
#28: Create adapter after repo initialization 2021-09-12 09:16:11 +02:00
Ryan Harg d8f8c3c193
#28: Auto update favorites list
- Also removes duplicate favorite listeners
2021-09-10 13:37:35 +02:00
Ryan Harg 898d2b437b
#95: Remember scroll positions in list views 2021-09-10 09:45:22 +02:00
Ryan Harg 9d857de99a #92: Remove trailing slash from hostname 2021-09-10 07:28:09 +00:00
Ryan Harg ef3387dee0
Fix existing linting problems 2021-09-09 09:56:15 +02:00
Ryan Harg 63292f07c5 #90: Use correct radio identifier for user radio 2021-09-08 07:51:49 +00:00
Ryan Harg fec95a7332
#88: Fix hostname scheme prefix handling 2021-09-03 11:15:14 +02:00
Ryan Harg 07511d1d9e
Upgrade Android Gradle Plugin to version 7.0.2 2021-09-03 10:50:44 +02:00
Ryan Harg 1e1e34cae4
#87: Show Pause icon when song is playing 2021-08-29 15:49:13 +02:00
Ryan Harg 0095381694 #65: Upgrade exoplayer version 2021-08-29 13:41:50 +00:00
Ryan Harg f35f3a5f92
#86: Use correct downloaded status for tracks, disable albums and artists 2021-08-27 15:13:54 +02:00
Ryan Harg ea286c2345
Minor adjustments to get rid of deprecation warnings 2021-08-27 13:28:23 +02:00
Ryan Harg 4f9f605bbf
Improving OAuth implementation 2021-08-27 11:06:46 +02:00
Ryan Harg 1209a0a5dc #83: Fix invalid null handling for add to playlist 2021-08-26 06:44:59 +00:00
Ryan Harg 107a8d55e8
Refactor OAuth code 2021-08-23 09:17:06 +02:00
Ryan Harg 94ac0c6b85
Upgrading Android Gradle Plugin
- Also moving some model classes
2021-08-22 09:48:36 +02:00
Ryan Harg 73631cc9e9 Further fix for refreshing access token 2021-08-22 07:13:19 +00:00
Ryan Harg 8ecc6f9b69
Add http retry back on unauthorized request 2021-08-20 11:50:32 +02:00
Ryan Harg f3c7a865d2
74: Improve logging code 2021-08-13 15:04:49 +02:00
Ryan Harg c8382495ea 74: Add logs for queue management 2021-08-13 12:55:38 +00:00
Ryan Harg fe4a00ae07 74: Update logging to gather more information 2021-08-13 08:56:00 +00:00
Ryan Harg 3aa37e5d3c
#80: Display error messages for user when login failes 2021-08-10 14:59:12 +02:00
Ryan Harg c997405906
#79: Add log statements in authentication code 2021-08-09 20:04:33 +02:00
Ryan Harg 80fc39a927
Remove OAuth interface 2021-08-09 08:40:04 +02:00
Ryan Harg 79f047015a
#7: Restructure koin modules 2021-08-09 07:03:20 +02:00
Ryan Harg a9319b88b0 #7: Add Koin as dependency injection library 2021-08-09 04:50:46 +00:00
Ryan Harg 88b162b0f9
Remove old authentication retry code 2021-08-07 20:20:48 +02:00
Ryan Harg 7ddff0843f Housekeeping/7 integration testing 2021-08-06 19:16:46 +00:00
Ryan Harg 81dd69a9d7
Remove unused experimental switch 2021-08-06 09:00:34 +02:00
Ryan Harg 09787c71f5 Update Android Gradle Plugin to 7.0.0 2021-08-04 08:41:42 +00:00
Ryan Harg 3a8b332796
#7: Unit tests for oauth authorization 2021-08-03 10:29:41 +02:00
Ryan Harg 2e35a313fc
#7: Add more tests to OAuth component 2021-08-02 13:24:12 +02:00
Ryan Harg e60d93a05a #7: Add unit tests to OAuthDatasource 2021-07-30 08:57:49 +00:00
Ryan Harg fcfc30a97e #48: Implement OAuth2 authentication 2021-07-23 12:10:13 +00:00
Ryan Harg 3ad9b40092
#70: Fix missing search results title 2021-07-23 09:06:12 +02:00
Ryan Harg bb17ec99f3
Extract response factory function 2021-07-22 14:45:04 +02:00
Ryan Harg d2497c7217 Remove build warnings 2021-07-21 07:11:44 +00:00
Ryan Harg ff4f6408da Housekeeping/migrate to viewbinding 2021-07-16 08:03:52 +00:00