diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 844597fa..a29a4b8f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -43,11 +43,6 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="emu.skyline.SettingsActivity" />
-
-
-
= Build.VERSION_CODES.R) {
+ window.insetsController?.hide(WindowInsets.Type.navigationBars() or WindowInsets.Type.systemBars() or WindowInsets.Type.systemGestures() or WindowInsets.Type.statusBars())
+ window.insetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
+ } else {
+ @Suppress("DEPRECATION")
+ window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
+ or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_FULLSCREEN)
+ }
val preference = File("${applicationInfo.dataDir}/shared_prefs/${applicationInfo.packageName}_preferences.xml")
preferenceFd = ParcelFileDescriptor.open(preference, ParcelFileDescriptor.MODE_READ_WRITE)
diff --git a/app/src/main/java/emu/skyline/loader/RomFile.kt b/app/src/main/java/emu/skyline/loader/RomFile.kt
index ba16ec0f..98ca4e58 100644
--- a/app/src/main/java/emu/skyline/loader/RomFile.kt
+++ b/app/src/main/java/emu/skyline/loader/RomFile.kt
@@ -10,6 +10,7 @@ import android.content.Context
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.net.Uri
+import android.os.Build
import android.os.ParcelFileDescriptor
import android.provider.OpenableColumns
import android.view.Surface
@@ -104,8 +105,13 @@ class AppEntry : Serializable {
if (author != null)
output.writeUTF(author)
output.writeBoolean(icon != null)
- if (icon != null)
- icon!!.compress(Bitmap.CompressFormat.WEBP_LOSSY, 100, output)
+ if (icon != null) {
+ @Suppress("DEPRECATION")
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
+ icon!!.compress(Bitmap.CompressFormat.WEBP_LOSSY, 100, output)
+ else
+ icon!!.compress(Bitmap.CompressFormat.WEBP, 100, output)
+ }
}
/**