Loading packages/SystemUI/src/com/android/systemui/graphics/ImageLoader.kt +10 −2 Original line number Diff line number Diff line Loading @@ -339,7 +339,7 @@ constructor( } // Fallback to non-ImageDecoder load if the attempt failed (e.g. the resource // is a Vector drawable which ImageDecoder doesn't support.) ?: icon.loadDrawable(context) ?: loadIconDrawable(icon, context) } Icon.TYPE_BITMAP -> { BitmapDrawable(context.resources, icon.bitmap) Loading @@ -357,7 +357,7 @@ constructor( } else -> { // We don't recognize this icon, just fallback. icon.loadDrawable(context) loadIconDrawable(icon, context) } }?.let { drawable -> // Icons carry tint which we need to propagate down to a Drawable. Loading @@ -366,6 +366,14 @@ constructor( } } @WorkerThread fun loadIconDrawable(icon: Icon, context: Context): Drawable? { icon.loadDrawable(context)?.let { return it } Log.w(TAG, "Failed to load drawable for $icon") return null } /** * Obtains the image size from the image header, without decoding the full image. * Loading Loading
packages/SystemUI/src/com/android/systemui/graphics/ImageLoader.kt +10 −2 Original line number Diff line number Diff line Loading @@ -339,7 +339,7 @@ constructor( } // Fallback to non-ImageDecoder load if the attempt failed (e.g. the resource // is a Vector drawable which ImageDecoder doesn't support.) ?: icon.loadDrawable(context) ?: loadIconDrawable(icon, context) } Icon.TYPE_BITMAP -> { BitmapDrawable(context.resources, icon.bitmap) Loading @@ -357,7 +357,7 @@ constructor( } else -> { // We don't recognize this icon, just fallback. icon.loadDrawable(context) loadIconDrawable(icon, context) } }?.let { drawable -> // Icons carry tint which we need to propagate down to a Drawable. Loading @@ -366,6 +366,14 @@ constructor( } } @WorkerThread fun loadIconDrawable(icon: Icon, context: Context): Drawable? { icon.loadDrawable(context)?.let { return it } Log.w(TAG, "Failed to load drawable for $icon") return null } /** * Obtains the image size from the image header, without decoding the full image. * Loading