Commit dba54316 authored by Jason Simmons's avatar Jason Simmons Committed by Dan Field

Android API version check for the call to Activity.reportFullyDrawn (#22918)

parent 502697f9
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
package io.flutter.demo.gallery; package io.flutter.demo.gallery;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import io.flutter.app.FlutterActivity; import io.flutter.app.FlutterActivity;
...@@ -28,7 +29,9 @@ public class MainActivity extends FlutterActivity { ...@@ -28,7 +29,9 @@ public class MainActivity extends FlutterActivity {
@Override @Override
public void onFirstFrame() { public void onFirstFrame() {
// Report fully drawn time for Play Store Console. // Report fully drawn time for Play Store Console.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
MainActivity.this.reportFullyDrawn(); MainActivity.this.reportFullyDrawn();
}
MainActivity.this.getFlutterView().removeFirstFrameListener(this); MainActivity.this.getFlutterView().removeFirstFrameListener(this);
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment