-
-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'chaesung-network_info_issue' into RxJava2.x
- Loading branch information
Showing
4 changed files
with
147 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...ary/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/info/NetworkState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.github.pwittchen.reactivenetwork.library.rx2.info; | ||
|
||
import android.net.LinkProperties; | ||
import android.net.Network; | ||
import android.net.NetworkCapabilities; | ||
|
||
/** | ||
* NetworkState data object | ||
*/ | ||
public class NetworkState { | ||
private boolean isConnected = false; | ||
private Network network = null; | ||
private NetworkCapabilities networkCapabilities = null; | ||
private LinkProperties linkProperties = null; | ||
|
||
public boolean isConnected() { | ||
return isConnected; | ||
} | ||
|
||
public void setConnected(boolean connected) { | ||
isConnected = connected; | ||
} | ||
|
||
public Network getNetwork() { | ||
return network; | ||
} | ||
|
||
public void setNetwork(Network network) { | ||
this.network = network; | ||
} | ||
|
||
public NetworkCapabilities getNetworkCapabilities() { | ||
return networkCapabilities; | ||
} | ||
|
||
public void setNetworkCapabilities(NetworkCapabilities networkCapabilities) { | ||
this.networkCapabilities = networkCapabilities; | ||
} | ||
|
||
public LinkProperties getLinkProperties() { | ||
return linkProperties; | ||
} | ||
|
||
public void setLinkProperties(LinkProperties linkProperties) { | ||
this.linkProperties = linkProperties; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters