Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit f4650b1

Browse files
authored
feat: remove getAppContext() (#182)
This reverts commit 0be0ffd.
1 parent 0be0ffd commit f4650b1

3 files changed

Lines changed: 1 addition & 22 deletions

File tree

app/src/main/java/app/revanced/integrations/settingsmenu/ReVancedSettingsFragment.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import android.preference.PreferenceScreen;
1919
import android.preference.SwitchPreference;
2020

21-
import com.google.android.apps.youtube.app.YouTubeTikTokRoot_Application;
2221
import com.google.android.apps.youtube.app.application.Shell_HomeActivity;
2322

2423
import java.util.List;
@@ -174,7 +173,7 @@ private void setCopyLinkListPreferenceData(ListPreference listPreference, String
174173
*/
175174

176175
private String getPackageName() {
177-
Context context = YouTubeTikTokRoot_Application.getAppContext();
176+
Context context = ReVancedUtils.getContext();
178177
if (context == null) {
179178
LogHelper.printException(ReVancedSettingsFragment.class, "Context is null, returning com.google.android.youtube!");
180179
return "com.google.android.youtube";

app/src/main/java/app/revanced/integrations/utils/ReVancedUtils.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import android.os.Handler;
66
import android.os.Looper;
77

8-
import com.google.android.apps.youtube.app.YouTubeTikTokRoot_Application;
9-
108
import app.revanced.integrations.sponsorblock.player.PlayerType;
119

1210
public class ReVancedUtils {
@@ -17,13 +15,6 @@ public class ReVancedUtils {
1715
//Used by Integrations patch
1816
public static Context context;
1917
//Used by Integrations patch
20-
public static Context getAppContext() {
21-
if (context != null) {
22-
return context;
23-
}
24-
LogHelper.printException(ReVancedUtils.class, "Context is null!");
25-
return null;
26-
}
2718

2819
public static void setNewVideo(boolean started) {
2920
LogHelper.debug(ReVancedUtils.class, "New video started: " + started);
@@ -61,7 +52,6 @@ public static void runOnMainThread(Runnable runnable) {
6152
}
6253

6354
public static Context getContext() {
64-
Context context = YouTubeTikTokRoot_Application.getAppContext();
6555
if (context != null) {
6656
return context;
6757
} else {

app/src/main/java/com/google/android/apps/youtube/app/YouTubeTikTokRoot_Application.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)