2021-12-17 21:59:34 +00:00
package b.f.g.f ;
2021-07-24 02:37:17 +00:00
import android.annotation.SuppressLint ;
import android.graphics.Canvas ;
import android.graphics.drawable.Drawable ;
import androidx.annotation.VisibleForTesting ;
2021-12-17 21:59:34 +00:00
import b.f.d.e.a ;
import b.f.g.b.c ;
import b.f.g.e.f0 ;
import b.f.g.e.g ;
import b.f.g.e.g0 ;
2021-07-24 02:37:17 +00:00
import com.facebook.drawee.view.DraweeHolder ;
2022-03-07 09:34:54 +00:00
/* compiled from: RootDrawable.java */
/* loaded from: classes2.dex */
2021-07-24 02:37:17 +00:00
public class b extends g implements f0 {
@VisibleForTesting
2021-12-02 18:53:44 +00:00
public Drawable n = null ;
public g0 o ;
2021-07-24 02:37:17 +00:00
public b ( Drawable drawable ) {
super ( drawable ) ;
}
2021-12-17 21:59:34 +00:00
@Override // b.f.g.e.g, android.graphics.drawable.Drawable
2021-07-24 02:37:17 +00:00
@SuppressLint ( { " WrongCall " } )
public void draw ( Canvas canvas ) {
if ( isVisible ( ) ) {
2021-12-02 18:53:44 +00:00
g0 g0Var = this . o ;
2021-07-24 02:37:17 +00:00
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 ( ) ) ;
2022-03-28 08:10:50 +00:00
draweeHolder . f2886b = true ;
2021-12-17 21:59:34 +00:00
draweeHolder . c = true ;
2021-07-24 02:37:17 +00:00
draweeHolder . b ( ) ;
}
}
2021-12-02 18:53:44 +00:00
Drawable drawable = this . k ;
2021-07-24 02:37:17 +00:00
if ( drawable ! = null ) {
drawable . draw ( canvas ) ;
}
2021-12-02 18:53:44 +00:00
Drawable drawable2 = this . n ;
2021-07-24 02:37:17 +00:00
if ( drawable2 ! = null ) {
drawable2 . setBounds ( getBounds ( ) ) ;
2021-12-02 18:53:44 +00:00
this . n . draw ( canvas ) ;
2021-07-24 02:37:17 +00:00
}
}
}
2021-12-17 21:59:34 +00:00
@Override // b.f.g.e.g, android.graphics.drawable.Drawable
2021-07-24 02:37:17 +00:00
public int getIntrinsicHeight ( ) {
return - 1 ;
}
2021-12-17 21:59:34 +00:00
@Override // b.f.g.e.g, android.graphics.drawable.Drawable
2021-07-24 02:37:17 +00:00
public int getIntrinsicWidth ( ) {
return - 1 ;
}
2021-12-17 21:59:34 +00:00
@Override // b.f.g.e.f0
2021-07-24 02:37:17 +00:00
public void k ( g0 g0Var ) {
2021-12-02 18:53:44 +00:00
this . o = g0Var ;
2021-07-24 02:37:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.f.g.e.g, android.graphics.drawable.Drawable
2021-07-24 02:37:17 +00:00
public boolean setVisible ( boolean z2 , boolean z3 ) {
2021-12-02 18:53:44 +00:00
g0 g0Var = this . o ;
2021-07-24 02:37:17 +00:00
if ( g0Var ! = null ) {
( ( DraweeHolder ) g0Var ) . f ( z2 ) ;
}
return super . setVisible ( z2 , z3 ) ;
}
}