From 11f503767672c92095ec7cec95ddadeed6626be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Uek=C3=B6tter?= Date: Wed, 21 Aug 2019 17:14:06 +0200 Subject: [PATCH] Write MINIMAL_SDK to exception message 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 37effad458bf8..92a27122e2574 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 void clearFocus(int viewId) { 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); } } };