From 75f8592940e4882f5a8f9a2a1d671ff2a511f7a5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 4 Apr 2022 15:32:08 +0200 Subject: [PATCH] adding a couple more Android 12 related fixes --- app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 45 +++++++++++++++++-- .../gallery/pro/helpers/MyWidgetProvider.kt | 2 +- app/src/main/res/menu/cab_directories.xml | 9 ++++ app/src/main/res/menu/cab_media.xml | 7 +++ app/src/main/res/menu/menu_main.xml | 10 +++++ app/src/main/res/menu/menu_main_intent.xml | 2 + app/src/main/res/menu/menu_media.xml | 14 ++++++ app/src/main/res/menu/menu_video_player.xml | 1 + app/src/main/res/menu/menu_viewpager.xml | 8 ++++ app/src/main/res/menu/photo_video_menu.xml | 2 + 11 files changed, 97 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d294a7fae..3f133e5b1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -77,7 +77,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:b16cc87e63' + implementation 'com.github.SimpleMobileTools:Simple-Commons:d8a0479340' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'it.sephiroth.android.exif:library:1.0.1' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e47cb6be2..a1b58d9b0 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -39,10 +39,12 @@ @@ -108,6 +112,7 @@ @@ -123,16 +128,19 @@ @@ -144,41 +152,49 @@ + android:configChanges="orientation|keyboardHidden|screenSize" + android:exported="false" /> + android:configChanges="orientation|keyboardHidden|screenSize" + android:exported="true"> @@ -191,7 +207,8 @@ + android:configChanges="orientation|keyboardHidden|screenSize" + android:exported="true"> @@ -204,6 +221,7 @@ @@ -230,6 +248,7 @@ @@ -248,6 +267,7 @@ @@ -303,6 +323,7 @@ @@ -316,6 +337,7 @@ @@ -329,6 +351,7 @@ @@ -342,6 +365,7 @@ @@ -355,6 +379,7 @@ @@ -368,6 +393,7 @@ @@ -381,6 +407,7 @@ @@ -394,6 +421,7 @@ @@ -407,6 +435,7 @@ @@ -420,6 +449,7 @@ @@ -433,6 +463,7 @@ @@ -446,6 +477,7 @@ @@ -459,6 +491,7 @@ @@ -472,6 +505,7 @@ @@ -485,6 +519,7 @@ @@ -497,6 +532,7 @@ @@ -510,6 +546,7 @@ @@ -523,6 +560,7 @@ @@ -536,6 +574,7 @@ diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt index f2e1b3d02..2f96015f7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt @@ -29,7 +29,7 @@ class MyWidgetProvider : AppWidgetProvider() { putExtra(DIRECTORY, widget.folderPath) } - val pendingIntent = PendingIntent.getActivity(context, widget.widgetId, intent, PendingIntent.FLAG_UPDATE_CURRENT) + val pendingIntent = PendingIntent.getActivity(context, widget.widgetId, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) views.setOnClickPendingIntent(id, pendingIntent) } diff --git a/app/src/main/res/menu/cab_directories.xml b/app/src/main/res/menu/cab_directories.xml index 04590cd9d..338444fa1 100644 --- a/app/src/main/res/menu/cab_directories.xml +++ b/app/src/main/res/menu/cab_directories.xml @@ -53,38 +53,47 @@ app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/cab_media.xml b/app/src/main/res/menu/cab_media.xml index 4d78fae54..0b9b748cf 100644 --- a/app/src/main/res/menu/cab_media.xml +++ b/app/src/main/res/menu/cab_media.xml @@ -55,22 +55,27 @@ app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/menu_media.xml b/app/src/main/res/menu/menu_media.xml index 346d810c6..377e7a665 100644 --- a/app/src/main/res/menu/menu_media.xml +++ b/app/src/main/res/menu/menu_media.xml @@ -24,30 +24,37 @@ app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/menu_viewpager.xml b/app/src/main/res/menu/menu_viewpager.xml index cdaa76c7d..c05c56bff 100644 --- a/app/src/main/res/menu/menu_viewpager.xml +++ b/app/src/main/res/menu/menu_viewpager.xml @@ -56,18 +56,22 @@ app:showAsAction="ifRoom" />