1 package com.android.systemui.statusbar.notification.row 2 3 import android.graphics.Canvas 4 import android.graphics.ColorFilter 5 import android.graphics.PixelFormat 6 import android.graphics.drawable.Drawable 7 8 class PlaceHolderDrawable(private val width: Int, private val height: Int) : Drawable() { 9 10 companion object { createFromnull11 fun createFrom(other: Drawable): PlaceHolderDrawable { 12 return PlaceHolderDrawable(other.intrinsicWidth, other.intrinsicHeight) 13 } 14 } 15 getIntrinsicWidthnull16 override fun getIntrinsicWidth(): Int { 17 return width 18 } 19 getIntrinsicHeightnull20 override fun getIntrinsicHeight(): Int { 21 return height 22 } 23 drawnull24 override fun draw(canvas: Canvas) {} setAlphanull25 override fun setAlpha(alpha: Int) {} setColorFilternull26 override fun setColorFilter(colorFilter: ColorFilter?) {} 27 28 @Suppress("DeprecatedCallableAddReplaceWith") 29 @Deprecated("Deprecated in android.graphics.drawable.Drawable") getOpacitynull30 override fun getOpacity(): Int { 31 return PixelFormat.TRANSPARENT 32 } 33 } 34