revanced-patches/integrations/java/pl/jakubweg/Helper.java
2020-08-24 17:47:57 +02:00

19 lines
522 B
Java

package pl.jakubweg;
import android.content.Context;
import android.content.res.Resources;
import android.util.Log;
public class Helper {
public static String getStringByName(Context context, String name) {
try {
Resources res = context.getResources();
return res.getString(res.getIdentifier(name, "string", context.getPackageName()));
} catch (Throwable exception) {
Log.e("XGlobals", "Resource not found.", exception);
return "";
}
}
}