@Override
  public int getOpacity() {
    if (mLayers.length == 0) {
      return PixelFormat.TRANSPARENT;
    }
    int opacity = PixelFormat.OPAQUE;
    for (int i = 1; i < mLayers.length; i++) {
      Drawable drawable = mLayers[i];
      if (drawable != null) {
        opacity = Drawable.resolveOpacity(opacity, drawable.getOpacity());
      }
    }
    return opacity;
  }
Sets a new drawable at the specified index, and return the previous drawable, if any.
drawee/src/main/java/com/facebook/drawee/drawable/ArrayDrawable.java