private void offerNextImage ( ) { if ( oadState == OADState . OFFERING_IMAGES ) { try { currentImage = firmwareBundle . getNextImage ( ) ; if ( currentImage != null ) { Log . i ( TAG , "Offering image: " + currentImage . name ( ) ) ; writeToCharacteristic ( oadIdentify , currentImage . metadata ( ) ) ; } } catch ( OADException e ) { // This gets thrown if the firmware bundle is "exhausted", meaning the Bean // has rejected all of the images in the bundle Log . e ( TAG , e . getMessage ( ) ) ; fail ( BeanError . BEAN_REJECTED_FW ) ; } } else { Log . e ( TAG , "Got notification on OAD Identify while in unexpected state: " + oadState ) ; } }
Offer the next image available in the Firmware Bundle