2021-08-09 22:50:52 +00:00
package c.f.g.f ;
import android.annotation.SuppressLint ;
import android.graphics.Canvas ;
import android.graphics.drawable.Drawable ;
import androidx.annotation.VisibleForTesting ;
import c.f.d.e.a ;
import c.f.g.b.c ;
import c.f.g.e.f0 ;
import c.f.g.e.g ;
import c.f.g.e.g0 ;
import com.facebook.drawee.view.DraweeHolder ;
/* compiled from: RootDrawable */
public class b extends g implements f0 {
@VisibleForTesting
public Drawable m = null ;
public g0 n ;
public b ( Drawable drawable ) {
super ( drawable ) ;
}
@Override // c.f.g.e.g, android.graphics.drawable.Drawable
@SuppressLint ( { " WrongCall " } )
public void draw ( Canvas canvas ) {
if ( isVisible ( ) ) {
g0 g0Var = this . n ;
if ( g0Var ! = null ) {
DraweeHolder draweeHolder = ( DraweeHolder ) g0Var ;
if ( ! draweeHolder . a ) {
a . m ( c . class , " %x: Draw requested for a non-attached controller %x. %s " , Integer . valueOf ( System . identityHashCode ( draweeHolder ) ) , Integer . valueOf ( System . identityHashCode ( draweeHolder . e ) ) , draweeHolder . toString ( ) ) ;
draweeHolder . b = true ;
2021-09-07 07:54:21 +00:00
draweeHolder . f2253c = true ;
2021-08-09 22:50:52 +00:00
draweeHolder . b ( ) ;
}
}
Drawable drawable = this . j ;
if ( drawable ! = null ) {
drawable . draw ( canvas ) ;
}
Drawable drawable2 = this . m ;
if ( drawable2 ! = null ) {
drawable2 . setBounds ( getBounds ( ) ) ;
this . m . draw ( canvas ) ;
}
}
}
@Override // c.f.g.e.g, android.graphics.drawable.Drawable
public int getIntrinsicHeight ( ) {
return - 1 ;
}
@Override // c.f.g.e.g, android.graphics.drawable.Drawable
public int getIntrinsicWidth ( ) {
return - 1 ;
}
@Override // c.f.g.e.f0
public void k ( g0 g0Var ) {
this . n = g0Var ;
}
@Override // c.f.g.e.g, android.graphics.drawable.Drawable
public boolean setVisible ( boolean z2 , boolean z3 ) {
g0 g0Var = this . n ;
if ( g0Var ! = null ) {
( ( DraweeHolder ) g0Var ) . f ( z2 ) ;
}
return super . setVisible ( z2 , z3 ) ;
}
}