diff options
author | Vincent Bourgmayer <vincent.bourgmayer@e.email> | 2023-05-17 13:19:27 +0000 |
---|---|---|
committer | Vincent Bourgmayer <vincent.bourgmayer@e.email> | 2023-05-17 13:19:27 +0000 |
commit | c8223d5d13b6e6bd965b058da54714cd137a28f8 (patch) | |
tree | 75ad5c256483b0e4613b25698f3eb2862d2db281 /app | |
parent | 6da8b2fb2947c4bd1420c67c97c746be89f596cc (diff) | |
parent | 4ab6edeb308f41f889733b150a4405b458e6d028 (diff) |
Merge branch '1221-fix-screen-rotation' into 'main'
fix screen orientation overriden by MainActivity.handleIntent(...)
See merge request e/os/advanced-privacy!134
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/foundation/e/advancedprivacy/main/MainActivity.kt | 7 |
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) { |