@ Override protected Parcelable onSaveInstanceState ( ) { Parcelable superState = super . onSaveInstanceState ( ) ; Bundle instanceState = new Bundle ( ) ; instanceState . putParcelable ( SUPER_STATE_KEY , superState ) ; instanceState . putString ( PROFILE_ID_KEY , profileId ) ; instanceState . putInt ( PRESET_SIZE_KEY , presetSizeType ) ; instanceState . putBoolean ( IS_CROPPED_KEY , isCropped ) ; instanceState . putParcelable ( BITMAP_KEY , imageContents ) ; instanceState . putInt ( BITMAP_WIDTH_KEY , queryWidth ) ; instanceState . putInt ( BITMAP_HEIGHT_KEY , queryHeight ) ; instanceState . putBoolean ( PENDING_REFRESH_KEY , lastRequest != null ) ; return instanceState ; }
Some of the current state is returned as a Bundle to allow quick restoration of the ProfilePictureView object in scenarios like orientation changes .