2018-11-07 12:24:35 -08:00
|
|
|
// Copyright 2013 The Flutter Authors. All rights reserved.
|
2016-12-06 14:43:53 -08:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
package io.flutter.app;
|
|
|
|
|
|
2017-11-13 13:56:48 -08:00
|
|
|
import android.app.Activity;
|
2016-12-06 14:43:53 -08:00
|
|
|
import android.app.Application;
|
2018-03-30 19:03:49 -07:00
|
|
|
import android.support.annotation.CallSuper;
|
2016-12-06 14:43:53 -08:00
|
|
|
|
|
|
|
|
import io.flutter.view.FlutterMain;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Flutter implementation of {@link android.app.Application}, managing
|
|
|
|
|
* application-level global initializations.
|
|
|
|
|
*/
|
|
|
|
|
public class FlutterApplication extends Application {
|
|
|
|
|
@Override
|
2018-03-30 19:03:49 -07:00
|
|
|
@CallSuper
|
2016-12-06 14:43:53 -08:00
|
|
|
public void onCreate() {
|
|
|
|
|
super.onCreate();
|
|
|
|
|
FlutterMain.startInitialization(this);
|
|
|
|
|
}
|
2017-11-13 13:56:48 -08:00
|
|
|
|
|
|
|
|
private Activity mCurrentActivity = null;
|
|
|
|
|
public Activity getCurrentActivity() {
|
|
|
|
|
return mCurrentActivity;
|
|
|
|
|
}
|
|
|
|
|
public void setCurrentActivity(Activity mCurrentActivity) {
|
|
|
|
|
this.mCurrentActivity = mCurrentActivity;
|
|
|
|
|
}
|
2016-12-06 14:43:53 -08:00
|
|
|
}
|