Skip to content

Commit

Permalink
feat: remove getAppContext() (#182)
Browse files Browse the repository at this point in the history
This reverts commit 0be0ffd.
  • Loading branch information
oSumAtrIX committed Oct 22, 2022
1 parent 0be0ffd commit f4650b1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
Expand Up @@ -18,7 +18,6 @@
import android.preference.PreferenceScreen;
import android.preference.SwitchPreference;

import com.google.android.apps.youtube.app.YouTubeTikTokRoot_Application;
import com.google.android.apps.youtube.app.application.Shell_HomeActivity;

import java.util.List;
Expand Down Expand Up @@ -174,7 +173,7 @@ private void setCopyLinkListPreferenceData(ListPreference listPreference, String
*/

private String getPackageName() {
Context context = YouTubeTikTokRoot_Application.getAppContext();
Context context = ReVancedUtils.getContext();
if (context == null) {
LogHelper.printException(ReVancedSettingsFragment.class, "Context is null, returning com.google.android.youtube!");
return "com.google.android.youtube";
Expand Down
Expand Up @@ -5,8 +5,6 @@
import android.os.Handler;
import android.os.Looper;

import com.google.android.apps.youtube.app.YouTubeTikTokRoot_Application;

import app.revanced.integrations.sponsorblock.player.PlayerType;

public class ReVancedUtils {
Expand All @@ -17,13 +15,6 @@ public class ReVancedUtils {
//Used by Integrations patch
public static Context context;
//Used by Integrations patch
public static Context getAppContext() {
if (context != null) {
return context;
}
LogHelper.printException(ReVancedUtils.class, "Context is null!");
return null;
}

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

public static Context getContext() {
Context context = YouTubeTikTokRoot_Application.getAppContext();
if (context != null) {
return context;
} else {
Expand Down

This file was deleted.

0 comments on commit f4650b1

Please sign in to comment.