Skip to content

Commit

Permalink
feat: Globals class for proxying getAppContext
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Apr 12, 2022
1 parent 2418991 commit e98bcd2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
18 changes: 18 additions & 0 deletions app/src/main/java/app.revanced/integrations/Globals.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package app.revanced.integrations;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.Log;

public class Globals {
public static Context context;

public static Context getAppContext() {

if (context != null) {
return context;
}
Log.e("Globals", "Context is null!");
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@

import android.app.Application;
import android.content.Context;
import android.os.Bundle;

public class YouTubeTikTokRoot_Application extends Application {
protected void onCreate(final Bundle bundle) {
super.onCreate();
}

public static Context getAppContext() {
return null;
}
Expand Down

0 comments on commit e98bcd2

Please sign in to comment.