From a3c40d10cefa347db2757fdfd070ca7ffb225cb3 Mon Sep 17 00:00:00 2001 From: caneleex Date: Sun, 23 Jan 2022 22:56:16 +0100 Subject: [PATCH] add more disconnects --- .../youtube/ryd/requests/RYDRequester.java | 5 +++++ .../whitelisting/requests/WhitelistRequester.java | 1 + app/src/main/res/drawable/vanced_yt_sb.xml | 14 -------------- app/src/main/res/drawable/vanced_yt_sb_blocked.xml | 14 -------------- app/src/main/res/drawable/vanced_yt_sb_button.xml | 6 ------ 5 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 app/src/main/res/drawable/vanced_yt_sb.xml delete mode 100644 app/src/main/res/drawable/vanced_yt_sb_blocked.xml delete mode 100644 app/src/main/res/drawable/vanced_yt_sb_button.xml diff --git a/app/src/main/java/fi/vanced/libraries/youtube/ryd/requests/RYDRequester.java b/app/src/main/java/fi/vanced/libraries/youtube/ryd/requests/RYDRequester.java index da6832a4..9777f335 100644 --- a/app/src/main/java/fi/vanced/libraries/youtube/ryd/requests/RYDRequester.java +++ b/app/src/main/java/fi/vanced/libraries/youtube/ryd/requests/RYDRequester.java @@ -48,6 +48,7 @@ public class RYDRequester { else if (debug) { Log.d(TAG, "dislikes fetch response was " + connection.getResponseCode()); } + connection.disconnect(); } catch (Exception ex) { dislikeCount = null; @@ -79,6 +80,7 @@ public class RYDRequester { else if (debug) { Log.d(TAG, "Registration response was " + connection.getResponseCode()); } + connection.disconnect(); } catch (Exception ex){ Log.e(TAG, "Failed to register userId", ex); @@ -118,6 +120,7 @@ public class RYDRequester { else if (debug) { Log.d(TAG, "Registration confirmation response was " + connection.getResponseCode()); } + connection.disconnect(); } catch (Exception ex) { Log.e(TAG, "Failed to confirm registration", ex); @@ -157,6 +160,7 @@ public class RYDRequester { else if (debug) { Log.d(TAG, "Vote response was " + connection.getResponseCode()); } + connection.disconnect(); } catch (Exception ex) { Log.e(TAG, "Failed to send vote", ex); @@ -191,6 +195,7 @@ public class RYDRequester { else if (debug) { Log.d(TAG, "Vote confirmation response was " + connection.getResponseCode()); } + connection.disconnect(); } catch (Exception ex) { Log.e(TAG, "Failed to confirm vote", ex); diff --git a/app/src/main/java/fi/vanced/libraries/youtube/whitelisting/requests/WhitelistRequester.java b/app/src/main/java/fi/vanced/libraries/youtube/whitelisting/requests/WhitelistRequester.java index 45fd8d17..2d8b0058 100644 --- a/app/src/main/java/fi/vanced/libraries/youtube/whitelisting/requests/WhitelistRequester.java +++ b/app/src/main/java/fi/vanced/libraries/youtube/whitelisting/requests/WhitelistRequester.java @@ -81,6 +81,7 @@ public class WhitelistRequester { view.setEnabled(true); }); } + connection.disconnect(); } catch (Exception ex) { Log.e(TAG, "Failed to fetch channelId", ex); diff --git a/app/src/main/res/drawable/vanced_yt_sb.xml b/app/src/main/res/drawable/vanced_yt_sb.xml deleted file mode 100644 index ba07674e..00000000 --- a/app/src/main/res/drawable/vanced_yt_sb.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/vanced_yt_sb_blocked.xml b/app/src/main/res/drawable/vanced_yt_sb_blocked.xml deleted file mode 100644 index 2a98161f..00000000 --- a/app/src/main/res/drawable/vanced_yt_sb_blocked.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/vanced_yt_sb_button.xml b/app/src/main/res/drawable/vanced_yt_sb_button.xml deleted file mode 100644 index 6bba8187..00000000 --- a/app/src/main/res/drawable/vanced_yt_sb_button.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file