|
@@ -6,6 +6,8 @@ package de.blinkt.openvpn.core;
|
|
|
|
|
|
import static android.content.res.Configuration.UI_MODE_TYPE_TELEVISION;
|
|
|
import static com.vpn.fastestvpnservice.openVpnUtils.Data.LongDataUsage;
|
|
|
+import static com.vpn.fastestvpnservice.screens.bottomNavBarScreens.HomeScreenKt.getNetworkSpeed;
|
|
|
+import static com.vpn.fastestvpnservice.screensTV.HomeScreenTVKt.getNetworkSpeedTV;
|
|
|
import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_CONNECTED;
|
|
|
import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_WAITING_FOR_USER_INPUT;
|
|
|
import static de.blinkt.openvpn.core.NetworkSpace.ipAddress;
|
|
@@ -61,6 +63,7 @@ import com.vpn.fastestvpnservice.constants.AppEnum;
|
|
|
import com.vpn.fastestvpnservice.helpers.BasePreferenceHelper;
|
|
|
import com.vpn.fastestvpnservice.openVpnUtils.Data;
|
|
|
import com.vpn.fastestvpnservice.screens.bottomNavBarScreens.HomeScreenKt;
|
|
|
+import com.vpn.fastestvpnservice.utils.StaticMethods;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
@@ -340,7 +343,12 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
|
|
|
|
|
|
Log.d("test_network_stat_final", "Down: " + StringDown2 + " Up: " + StringUp2);
|
|
|
|
|
|
- HomeScreenKt.getNetworkSpeed().setNetworkSpeed(StringDown2, StringUp2, StringDownUnit, StringUpUnit);
|
|
|
+ if (StaticMethods.isTV(getBaseContext())) {
|
|
|
+ getNetworkSpeedTV().setNetworkSpeed(StringDown2, StringUp2, StringDownUnit, StringUpUnit);
|
|
|
+ } else {
|
|
|
+ getNetworkSpeed().setNetworkSpeed(StringDown2, StringUp2, StringDownUnit, StringUpUnit);
|
|
|
+ }
|
|
|
+// HomeScreenKt.getNetworkSpeed().setNetworkSpeed(StringDown2, StringUp2, StringDownUnit, StringUpUnit);
|
|
|
|
|
|
// Update last update time and byte counts for next calculation
|
|
|
lastUpdateTime = SystemClock.elapsedRealtime();
|