// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package io.flutter.demo.gallery;

import android.os.Bundle;

import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;

public class MainActivity extends FlutterActivity {

    private FlutterGalleryInstrumentation instrumentation;

    /** Instrumentation for testing. */
    public FlutterGalleryInstrumentation getInstrumentation() {
        return instrumentation;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        GeneratedPluginRegistrant.registerWith(this);
        instrumentation = new FlutterGalleryInstrumentation(this.getFlutterView());
    }
}

@@ -259,16 +259,52 @@
 tivity;%0A
+import io.flutter.view.FlutterView;%0A
 import i
@@ -858,16 +858,397 @@
 iew());%0A
+        getFlutterView().addFirstFrameListener(new FlutterView.FirstFrameListener() %7B%0A            @Override%0A            public void onFirstFrame() %7B%0A                // Report fully drawn time for Play Store Console.%0A                MainActivity.this.reportFullyDrawn();%0A                MainActivity.this.getFlutterView().removeFirstFrameListener(this);%0A            %7D%0A          %7D);%0A
     %7D%0A%7D%0A

Add first frame reporting to gallery's Play Store Console logging (#22579)