diff --git a/app/src/main/java/com/hippo/ehviewer/Settings.java b/app/src/main/java/com/hippo/ehviewer/Settings.java
index 665e7a4ec..18596701a 100755
--- a/app/src/main/java/com/hippo/ehviewer/Settings.java
+++ b/app/src/main/java/com/hippo/ehviewer/Settings.java
@@ -132,8 +132,8 @@ public class Settings {
private static final boolean DEFAULT_SHOW_TAG_TRANSLATIONS = false;
private static final int DEFAULT_EXCLUDED_TAG_NAMESPACES = 0;
private static final String DEFAULT_EXCLUDED_LANGUAGES = null;
- private static final String KEY_CELLULAR_NETWORK_WARNING = "cellular_network_warning";
- private static final boolean DEFAULT_CELLULAR_NETWORK_WARNING = false;
+ private static final String KEY_METERED_NETWORK_WARNING = "cellular_network_warning";
+ private static final boolean DEFAULT_METERED_NETWORK_WARNING = false;
private static final String KEY_NIGHT_MODE = "night_mode";
private static final String DEFAULT_NIGHT_MODE = "-1";
private static final String KEY_E_INK_MODE = "e_ink_mode";
@@ -600,8 +600,8 @@ public class Settings {
return getBoolean(KEY_E_INK_MODE, DEFAULT_E_INK_MODE);
}
- public static boolean getCellularNetworkWarning() {
- return getBoolean(KEY_CELLULAR_NETWORK_WARNING, DEFAULT_CELLULAR_NETWORK_WARNING);
+ public static boolean getMeteredNetworkWarning() {
+ return getBoolean(KEY_METERED_NETWORK_WARNING, DEFAULT_METERED_NETWORK_WARNING);
}
public static int getScreenRotation() {
diff --git a/app/src/main/java/com/hippo/network/Network.java b/app/src/main/java/com/hippo/network/Network.java
deleted file mode 100644
index 5367c93b5..000000000
--- a/app/src/main/java/com/hippo/network/Network.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2014 Hippo Seven
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hippo.network;
-
-import android.content.Context;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-
-public final class Network {
- private Network() {
- }
-
- public static int getActiveNetworkType(Context context) {
- ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
- NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
- if (activeNetwork != null) {
- return activeNetwork.getType();
- } else {
- return -1;
- }
- }
-}
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 28f778118..b4c9c8d80 100755
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -746,4 +746,6 @@
添加标签
添加新标签,用逗号「,」分割
%s (上传者)
+ 流量计费网络警告
+ 正在使用流量计费网络
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index a561586d2..dc0d606d2 100755
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -811,4 +811,6 @@
Enter new tags, separated with comma
WebView is not available.
%s (Uploader)
+ Metered network warning
+ Connected to metered networks
diff --git a/app/src/main/res/xml/eh_settings.xml b/app/src/main/res/xml/eh_settings.xml
index c9ca676b6..d5ecbaeeb 100644
--- a/app/src/main/res/xml/eh_settings.xml
+++ b/app/src/main/res/xml/eh_settings.xml
@@ -154,7 +154,7 @@