Android 12 support

This commit is contained in:
Carlos Erazo 2022-03-07 18:16:25 +01:00
parent f06bcdf695
commit 6fcf757df6
3 changed files with 10 additions and 2 deletions

View File

@ -4,10 +4,12 @@
<application>
<activity
android:theme="@style/AppTheme"
android:exported="true"
android:name="com.pichillilorenzo.flutter_inappwebview.in_app_browser.InAppBrowserActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density" />
<activity
android:theme="@style/ThemeTransparent"
android:exported="false"
android:name="com.pichillilorenzo.flutter_inappwebview.chrome_custom_tabs.ChromeCustomTabsActivity" />
<receiver android:name="com.pichillilorenzo.flutter_inappwebview.chrome_custom_tabs.ActionBroadcastReceiver" />
<meta-data

View File

@ -207,8 +207,13 @@ public class ChromeCustomTabsActivity extends Activity implements MethodChannel.
extras.putString(ActionBroadcastReceiver.CHROME_MANAGER_ID, manager.id);
actionIntent.putExtras(extras);
return PendingIntent.getBroadcast(
this, actionSourceId, actionIntent, PendingIntent.FLAG_UPDATE_CURRENT);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
return PendingIntent.getBroadcast(
this, actionSourceId, actionIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
} else {
return PendingIntent.getBroadcast(
this, actionSourceId, actionIntent, PendingIntent.FLAG_UPDATE_CURRENT);
}
}
public void dispose() {

View File

@ -56,6 +56,7 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:exported="false"
android:name="io.flutter.embedding.android.FlutterActivity"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">