/*
 * 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;

public class FlutterStudioInitializer implements Runnable {
  @Override
  public void run() {
    // TODO(messick): Remove this class if it is never needed.
    // Unlike StartupActivity, this runs before the welcome screen (FlatWelcomeFrame) is displayed.
    // StartupActivity runs just before a project is opened.
  }
}

@@ -186,16 +186,115 @@
 utter;%0A%0A
+import com.intellij.openapi.application.ApplicationInfo;%0Aimport com.intellij.openapi.ui.Messages;%0A%0A
 public c
@@ -349,104 +349,244 @@
 e %7B%0A
+%0A
   
-@Override%0A  public void run() %7B%0A    // TODO(messick): Remove this class if it is never needed.
+private static void reportVersionIncompatibility(ApplicationInfo info) %7B%0A    Messages.showErrorDialog(%22The Flutter plugin requires a more recent version of Android Studio.%22, %22Version Mismatch%22);%0A  %7D%0A%0A  @Override%0A  public void run() %7B
 %0A   
@@ -743,14 +743,350 @@
 opened.%0A
+    ApplicationInfo info = ApplicationInfo.getInstance();%0A    if (%22Google%22.equals(info.getCompanyName())) %7B%0A      String version = info.getFullVersion();%0A      if (version.startsWith(%222.%22) %7C%7C version.contains(%22Canary%22) %7C%7C (version.contains(%22Beta%22) && !version.endsWith(%227%22))) %7B%0A        reportVersionIncompatibility(info);%0A      %7D%0A    %7D%0A
   %7D%0A%7D%0A

Check that Android Studio is up-to-date (#1410)