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.
This commit is contained in:
Jonas Uekötter 2019-09-24 02:20:26 +02:00 committed by Chris Bracken
parent 035c9dbfcf
commit d2c1514084

View File

@ -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);
}
}
};