@ -238,11 +238,13 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
if ( previousInputContentInfo ! = null ) {
if ( previousInputContentInfo ! = null ) {
onCommitContentInternal ( previousInputContentInfo , previousFlags ) ;
onCommitContentInternal ( previousInputContentInfo , previousFlags ) ;
}
}
photoUploadUri = savedInstanceState . getParcelable ( "photoUploadUri" ) ;
} else {
} else {
showMarkSensitive = false ;
showMarkSensitive = false ;
startingVisibility = preferences . getString ( "rememberedVisibility" , "public" ) ;
startingVisibility = preferences . getString ( "rememberedVisibility" , "public" ) ;
statusMarkSensitive = false ;
statusMarkSensitive = false ;
startingHideText = false ;
startingHideText = false ;
photoUploadUri = null ;
}
}
/ * If the composer is started up as a reply to another post , override the "starting" state
/ * If the composer is started up as a reply to another post , override the "starting" state
@ -435,6 +437,7 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
}
}
currentInputContentInfo = null ;
currentInputContentInfo = null ;
currentFlags = 0 ;
currentFlags = 0 ;
outState . putParcelable ( "photoUploadUri" , photoUploadUri ) ;
super . onSaveInstanceState ( outState ) ;
super . onSaveInstanceState ( outState ) ;
}
}
@ -821,6 +824,7 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
}
}
}
}
@NonNull
private File createNewImageFile ( ) throws IOException {
private File createNewImageFile ( ) throws IOException {
// Create an image file name
// Create an image file name
String timeStamp = new SimpleDateFormat ( "yyyyMMdd_HHmmss" , Locale . US ) . format ( new Date ( ) ) ;
String timeStamp = new SimpleDateFormat ( "yyyyMMdd_HHmmss" , Locale . US ) . format ( new Date ( ) ) ;
@ -1092,11 +1096,11 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
@Override
@Override
protected void onActivityResult ( int requestCode , int resultCode , Intent data ) {
protected void onActivityResult ( int requestCode , int resultCode , Intent data ) {
super . onActivityResult ( requestCode , resultCode , data ) ;
super . onActivityResult ( requestCode , resultCode , data ) ;
if ( reques tCode = = MEDIA_PICK_ RESULT & & resul tCode = = RESULT_OK & & data ! = null ) {
if ( resul tCode = = RESULT_OK & & reque stCode = = MEDIA_PICK_ RESULT & & data ! = null ) {
Uri uri = data . getData ( ) ;
Uri uri = data . getData ( ) ;
long mediaSize = MediaUtils . getMediaSize ( getContentResolver ( ) , uri ) ;
long mediaSize = MediaUtils . getMediaSize ( getContentResolver ( ) , uri ) ;
pickMedia ( uri , mediaSize ) ;
pickMedia ( uri , mediaSize ) ;
} else if ( reques tCode = = MEDIA_TAKE_PHOTO_ RESULT & & resul tCode = = RESULT_OK ) {
} else if ( resul tCode = = RESULT_OK & & reque stCode = = MEDIA_TAKE_PHOTO_ RESULT) {
long mediaSize = MediaUtils . getMediaSize ( getContentResolver ( ) , photoUploadUri ) ;
long mediaSize = MediaUtils . getMediaSize ( getContentResolver ( ) , photoUploadUri ) ;
pickMedia ( photoUploadUri , mediaSize ) ;
pickMedia ( photoUploadUri , mediaSize ) ;
}
}