Buggy code:
public class TransformAndUploadActivity extends ActionBarActivity implements VDiskDialogListener { VDiskAuthSession session ; AppKeyPair appKeyPair ; Account account ; VDiskAPI < VDiskAuthSession > mApi ; boolean tranformState = true ; public final int REQUEST_CODE_IMAGE_SECRET = 1 ; public final int REQUEST_CODE_IMAGE_COVER = 2 ; ImageView secretImage ; ImageView coverImage ; TextView secretTextView ; String secretPath ; String coverPath ; String tranformedFilePath = Constants . cloud ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_transform_and_upload ) ; coverImage = ( ( ImageView ) ( findViewById ( R . id . coverImage ) ) ) ; secretImage = ( ( ImageView ) ( findViewById ( R . id . secretImage ) ) ) ; secretTextView = ( ( TextView ) ( findViewById ( textView2 ) ) ) ; appKeyPair = new AppKeyPair ( Constants . CONSUMER_KEY , Constants . CONSUMER_SECRET ) ; session = VDiskAuthSession . getInstance ( this , appKeyPair , APP_FOLDER ) ; session . setRedirectUrl ( REDIRECT_URL ) ; if ( ! ( session . isLinked ( ) ) ) { session . authorize ( this , this ) ; } mApi = new VDiskAPI ( session ) ; final Button button = ( ( Button ) ( findViewById ( upload_button ) ) ) ; final Random random = new Random ( System . currentTimeMillis ( ) ) ; button . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { if ( tranformState ) { tranformState = ! ( tranformState ) ; tranformedFilePath += ( "//" + ( random . nextInt ( 10000 ) ) ) + ".jpg" ; Log . d ( "transformFIlePath" , tranformedFilePath ) ; <START_BUG> TransformHelper . encryptJPEG ( secretPath , coverPath , tranformedFilePath , "1" ) ; <END_BUG> Picasso . with ( getApplicationContext ( ) ) . load ( new File ( tranformedFilePath ) ) . centerCrop ( ) . fit ( ) . into ( secretImage ) ; secretTextView . setText ( "变换后的图片" ) ; button . setText ( button_upload ) ; } else { tranformState = ! ( tranformState ) ; String desPath = "//" ; uploadLargeFile ( tranformedFilePath , desPath ) ; } } } ) ; Picasso . with ( this ) . load ( ic_launcher ) . into ( secretImage ) ; secretImage . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Toast . makeText ( getApplicationContext ( ) , "点击了选择秘密图片" , LENGTH_SHORT ) . show ( ) ; Intent intent = new Intent ( Intent . ACTION_PICK , Media . EXTERNAL_CONTENT_URI ) ; startActivityForResult ( intent , REQUEST_CODE_IMAGE_SECRET ) ; } } ) ; Picasso . with ( this ) . load ( ic_launcher ) . into ( coverImage ) ; coverImage . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Toast . makeText ( getApplicationContext ( ) , "点击了选择掩体图片" , LENGTH_SHORT ) . show ( ) ; Intent intent = new Intent ( Intent . ACTION_PICK , Media . EXTERNAL_CONTENT_URI ) ; startActivityForResult ( intent , REQUEST_CODE_IMAGE_COVER ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onComplete ( Bundle values ) { } @ Override public void onError ( VDiskDialogError error ) { } @ Override public void onVDiskException ( VDiskException exception ) { } @ Override public void onCancel ( ) { } private void uploadLargeFile ( String srcPath , String desPath ) { } protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } }

Fix:
TransformHelper . EncryptJPEG ( secretPath , coverPath , tranformedFilePath , "1" ) ;