public static boolean statusHasFlag(@Status int status, @Status int flag) {
    return (status & flag) == flag;
  }
Checks whether the provided status contains a specified flag.
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/BaseConsumer.java