mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 05:46:03 +00:00
fix(session): picture in picture keeps the DroidDeck front end behind the game (#2559)
This commit is contained in:
1 parent
c57cc33125
commit
d058bab64f
3 files changed
+24
-4
No files matched your search
@@ -4,6 +4,7 @@ import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.droiddeck.launcher.session.SessionService
|
||||
import com.droiddeck.launcher.session.SessionState
|
||||
|
||||
class HomeActivity : Activity() {
|
||||
override fun attachBaseContext(newBase: android.content.Context) {
|
||||
@@ -18,7 +19,7 @@ class HomeActivity : Activity() {
|
||||
}
|
||||
|
||||
private fun routeHome() {
|
||||
val destination = if (HomeApp.isActiveSteamSession()) {
|
||||
val destination = if (HomeApp.isActiveSteamSession() && !SessionState.pipActive) {
|
||||
Intent(this, SessionActivity::class.java)
|
||||
.setAction(SessionService.ACTION_HOME_GUIDE)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
||||
@@ -32,7 +33,8 @@ class HomeActivity : Activity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
startActivity(destination)
|
||||
if (SessionState.pipActive && destination.component?.className == FrontEndActivity::class.java.name) HomeApp.showFrontEnd(this, destination)
|
||||
else startActivity(destination)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user