summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorVincent Bourgmayer <vincent.bourgmayer@e.email>2023-05-17 13:19:27 +0000
committerVincent Bourgmayer <vincent.bourgmayer@e.email>2023-05-17 13:19:27 +0000
commit4ab6edeb308f41f889733b150a4405b458e6d028 (patch)
tree75ad5c256483b0e4613b25698f3eb2862d2db281 /app/src/main/java
parent6da8b2fb2947c4bd1420c67c97c746be89f596cc (diff)
fix screen orientation overriden by MainActivity.handleIntent(...)
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/foundation/e/advancedprivacy/main/MainActivity.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/foundation/e/advancedprivacy/main/MainActivity.kt b/app/src/main/java/foundation/e/advancedprivacy/main/MainActivity.kt
index ec33e25..277031a 100644
--- a/app/src/main/java/foundation/e/advancedprivacy/main/MainActivity.kt
+++ b/app/src/main/java/foundation/e/advancedprivacy/main/MainActivity.kt
@@ -21,6 +21,7 @@ import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
+import android.util.Log
import androidx.fragment.app.FragmentActivity
import androidx.fragment.app.add
import androidx.fragment.app.commit
@@ -31,9 +32,9 @@ import foundation.e.advancedprivacy.features.location.FakeLocationFragment
import foundation.e.advancedprivacy.features.trackers.TrackersFragment
open class MainActivity : FragmentActivity(R.layout.activity_main) {
- override fun onPostCreate(savedInstanceState: Bundle?) {
- super.onPostCreate(savedInstanceState)
- handleIntent(intent)
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ if (savedInstanceState == null) handleIntent(intent)
}
override fun onNewIntent(intent: Intent) {