Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
non public
  • Loading branch information
Chris Yang committed Oct 8, 2019
commit ef9762e1a8469690d1352fb26a50644192a7472a
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
import androidx.annotation.Nullable;

/** Reports connectivity related information such as connectivity type and wifi information. */
public class Connectivity {
class Connectivity {
private ConnectivityManager connectivityManager;
private WifiManager wifiManager;

public Connectivity(ConnectivityManager connectivityManager, WifiManager wifiManager) {
Connectivity(ConnectivityManager connectivityManager, WifiManager wifiManager) {
this.connectivityManager = connectivityManager;
this.wifiManager = wifiManager;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
* io.flutter.plugin.common.EventChannel#setStreamHandler(io.flutter.plugin.common.EventChannel.StreamHandler)}
* to set up the receiver.
*/
public class ConnectivityBroadcastReceiver extends BroadcastReceiver
class ConnectivityBroadcastReceiver extends BroadcastReceiver
implements EventChannel.StreamHandler {
private Context context;
private Connectivity connectivity;
private EventChannel.EventSink events;

public ConnectivityBroadcastReceiver(
@NonNull Context context, @NonNull Connectivity connectivity) {
ConnectivityBroadcastReceiver(@NonNull Context context, @NonNull Connectivity connectivity) {
this.context = context;
this.connectivity = connectivity;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* a @{@link Connectivity}, and then send the result back to the UIThread through the {@link
* MethodChannel.Result}.
*/
public class ConnectivityMethodChannelHandler implements MethodChannel.MethodCallHandler {
class ConnectivityMethodChannelHandler implements MethodChannel.MethodCallHandler {

private Connectivity connectivity;

/**
* Construct the ConnectivityMethodChannelHandler with a {@code connectivity}. The {@code
* connectivity} must not be null.
*/
public ConnectivityMethodChannelHandler(@NonNull Connectivity connectivity) {
ConnectivityMethodChannelHandler(@NonNull Connectivity connectivity) {
assert (connectivity != null);
this.connectivity = connectivity;
}
Expand Down