You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
fix some Drawable related crashes in NewPipe
This commit is contained in:
@@ -923,6 +923,8 @@ public final class AssetManager {
|
||||
int[] inAttrs, int[] outValues, int[] outIndices) {
|
||||
if (defStyleRes == 0 && theme.containsKey(defStyleAttr))
|
||||
defStyleRes = theme.get(defStyleAttr).getData();
|
||||
if (defStyleRes == 0 && set != null)
|
||||
defStyleRes = set.getAttributeResourceValue(null, "style", 0);
|
||||
Map<Integer,ValueItem> defStyle = loadStyle(defStyleRes);
|
||||
|
||||
ResXmlPullParser parser = (ResXmlPullParser)set;
|
||||
|
||||
@@ -2050,8 +2050,9 @@ public class Resources {
|
||||
|
||||
if (dr == null) {
|
||||
if (value.string == null) {
|
||||
throw new NotFoundException(
|
||||
Log.w(TAG,
|
||||
"Resource is not a Drawable (color or path): " + value);
|
||||
return null;
|
||||
}
|
||||
|
||||
String file = value.string.toString();
|
||||
|
||||
Reference in New Issue
Block a user