Skip to content

Commit 4fac497

Browse files
committed
wip
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
1 parent 15bd8f9 commit 4fac497

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/src/main/java/com/nextcloud/client/network/ConnectivityServiceImpl.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class ConnectivityServiceImpl(
9797

9898
val baseServerAddress = accountManager.user.server.uri.toString()
9999
if (baseServerAddress.isEmpty()) {
100-
Log_OC.e(TAG, "no base server address, internet is walled")
100+
Log_OC.e(TAG, "no base server address, relying on current connectivity")
101101
return !currentConnectivity.isConnected
102102
}
103103

@@ -107,6 +107,11 @@ class ConnectivityServiceImpl(
107107
return true
108108
}
109109

110+
if (currentConnectivity.isMetered) {
111+
Log_OC.e(TAG, "metered connection, relying on current connectivity")
112+
return !currentConnectivity.isConnected
113+
}
114+
110115
val get = requestBuilder.invoke(baseServerAddress + CONNECTIVITY_CHECK_ROUTE)
111116
val client = clientFactory.createPlainClient()
112117

0 commit comments

Comments
 (0)