39 lines
1.6 KiB
Java
39 lines
1.6 KiB
Java
package o;
|
|
|
|
import android.content.Context;
|
|
import android.net.ConnectivityManager;
|
|
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
|
import io.flutter.plugin.common.BinaryMessenger;
|
|
import io.flutter.plugin.common.EventChannel;
|
|
import io.flutter.plugin.common.MethodChannel;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class fPL implements FlutterPlugin {
|
|
private EventChannel a;
|
|
private C13052fPO b;
|
|
private MethodChannel d;
|
|
|
|
@Override // io.flutter.embedding.engine.plugins.FlutterPlugin
|
|
public final void onAttachedToEngine(FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
|
|
BinaryMessenger binaryMessenger = flutterPluginBinding.getBinaryMessenger();
|
|
Context applicationContext = flutterPluginBinding.getApplicationContext();
|
|
this.d = new MethodChannel(binaryMessenger, "dev.fluttercommunity.plus/connectivity");
|
|
this.a = new EventChannel(binaryMessenger, "dev.fluttercommunity.plus/connectivity_status");
|
|
C13050fPI c13050fPI = new C13050fPI((ConnectivityManager) applicationContext.getSystemService("connectivity"));
|
|
fPQ fpq = new fPQ(c13050fPI);
|
|
this.b = new C13052fPO(applicationContext, c13050fPI);
|
|
this.d.setMethodCallHandler(fpq);
|
|
this.a.setStreamHandler(this.b);
|
|
}
|
|
|
|
@Override // io.flutter.embedding.engine.plugins.FlutterPlugin
|
|
public final void onDetachedFromEngine(FlutterPlugin.FlutterPluginBinding flutterPluginBinding) {
|
|
this.d.setMethodCallHandler(null);
|
|
this.a.setStreamHandler(null);
|
|
this.b.onCancel(null);
|
|
this.d = null;
|
|
this.a = null;
|
|
this.b = null;
|
|
}
|
|
}
|