From 82c40a3a20da9b9db90192900c1348b65982490a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Uek=C3=B6tter?= Date: Tue, 24 Sep 2019 02:20:26 +0200 Subject: [PATCH] Write MINIMAL_SDK to exception message (flutter/engine#11345) This changes writes the required and current Android SDK level to the exception message. This enables Crash Reporting tools to capture more information about this crash. --- .../io/flutter/plugin/platform/PlatformViewsController.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index 37effad458..92a27122e2 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -240,10 +240,8 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega private void ensureValidAndroidVersion() { if (Build.VERSION.SDK_INT < MINIMAL_SDK) { - Log.e(TAG, "Trying to use platform views with API " + Build.VERSION.SDK_INT - + ", required API level is: " + MINIMAL_SDK); - throw new IllegalStateException("An attempt was made to use platform views on a" - + " version of Android that platform views does not support."); + throw new IllegalStateException("Trying to use platform views with API " + + Build.VERSION.SDK_INT + ", required API level is: " + MINIMAL_SDK); } } };