From d2c1514084295ff86b4eabaabc58c8bc2c90e3a3 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 (#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/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index 37effad458b..92a27122e25 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/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); } } };