mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-16 05:56:52 +01:00
feat: Globals
class for proxying getAppContext
This commit is contained in:
parent
c4f22ca87e
commit
94c15e9acb
18
integrations/java/app.revanced/integrations/Globals.java
Normal file
18
integrations/java/app.revanced/integrations/Globals.java
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -2,13 +2,8 @@ package com.google.android.apps.youtube.app;
|
|||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
public class YouTubeTikTokRoot_Application extends Application {
|
public class YouTubeTikTokRoot_Application extends Application {
|
||||||
protected void onCreate(final Bundle bundle) {
|
|
||||||
super.onCreate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Context getAppContext() {
|
public static Context getAppContext() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user