Fix back button in MprisActivity
AbandonedPublic

Authored by nicolasfella on Mar 2 2018, 12:55 PM.

Details

Reviewers
mtijink
Group Reviewers
KDE Connect
Summary

Depends on D10969

Problem:
Open MprisActivity and play something. Then tap on the media notification and MprisActivity opens again. Two back presses are needed to go back to the main Activity. This patch makes sure that only one press is needed.

Test Plan

Only one back press needed

Diff Detail

Repository
R225 KDE Connect - Android application
Branch
newmanifest
Lint
No Linters Available
Unit
No Unit Test Coverage
nicolasfella requested review of this revision.Mar 2 2018, 12:55 PM
nicolasfella created this revision.
mtijink added a subscriber: mtijink.Mar 3 2018, 1:54 PM

Does it make sense to add this for other activities as well?

Also, we have to implement onNewIntent with this launch mode (which should switch the selected player to the requested player).

mtijink requested changes to this revision.Mar 3 2018, 1:54 PM
This revision now requires changes to proceed.Mar 3 2018, 1:54 PM

I don't think something like this can happen to another Activity since afaik there is no second way to open the activities (like the MPRIS notification)

Wouldn't it make more sense to change the player controlled by the notification to the one selected in the Activity? It should make sense since I see no easy way to determine which player is controlled by the notification other than pausing players until the notification shows the right one.

Yes, that's a good idea too. I had that on my backlog of possible mpris improvements too 😉

But I think we should support onNewIntent too.