public void setDispose(int code) {
        if (code >= 0) {
            dispose = code;
        }
    }
Sets the GIF frame disposal code for the last added frame and any
subsequent frames. Default is 0 if no transparent color has been set,
otherwise 2.

@param code
         int disposal code.
core/src/main/java/com/bumptech/glide/gifencoder/AnimatedGifEncoder.java