in library/src/main/java/com/whatsapp/stringpacks/utils/ContextUtils.java [22:32]
public static Context getRootContext(@Nullable Context context) {
Context base = context;
while (base != null && base instanceof ContextWrapper) {
Context newBase = ((ContextWrapper) base).getBaseContext();
if (newBase == null) {
break;
}
base = newBase;
}
return base;
}