| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,10 +4,12 @@ export enum connectionType { | |||
| 4 | 4 | none = 0, | |
| 5 | 5 | wifi = 1, | |
| 6 | 6 | mobile = 2, | |
| 7 | + ethernet = 3 | ||
| 7 | 8 | } | |
| 8 | 9 | ||
| 9 | 10 | const wifi = "wifi"; | |
| 10 | 11 | const mobile = "mobile"; | |
| 12 | + const ethernet = "ethernet"; | ||
| 11 | 13 | ||
| 12 | 14 | // Get Connection Type | |
| 13 | 15 | function getConnectivityManager(): android.net.ConnectivityManager { | |
@@ -37,6 +39,10 @@ export function getConnectionType(): number { | |||
| 37 | 39 | if (type.indexOf(mobile) !== -1){ | |
| 38 | 40 | return connectionType.mobile; | |
| 39 | 41 | } | |
| 42 | + | ||
| 43 | + if (type.indexOf(ethernet) !== -1){ | ||
| 44 | + return connectionType.ethernet; | ||
| 45 | + } | ||
| 40 | 46 | ||
| 41 | 47 | return connectionType.none; | |
| 42 | 48 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,12 @@ export enum connectionType { | |||
| 27 | 27 | /** | |
| 28 | 28 | * Denotes a mobile connection, i.e. cellular network or WAN. | |
| 29 | 29 | */ | |
| 30 | - mobile = 2 | ||
| 30 | + mobile = 2, | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * Denotes an ethernet connection | ||
| 34 | + */ | ||
| 35 | + ethernet = 3 | ||
| 31 | 36 | } | |
| 32 | 37 | ||
| 33 | 38 | /** | |
| Back | FazBrowse Home | New Git URL |
0 commit comments