An audio recording will now be deleted if the user presses one of the
back buttons in the file confirmation activity.
This commit is contained in:
@@ -160,9 +160,28 @@ public class FileConfirmationActivity extends AppCompatActivity implements FileC
|
||||
|
||||
@OnClick(R.id.chat_toolbar_back_arrow)
|
||||
void backPressed() {
|
||||
deleteRecording();
|
||||
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
deleteRecording();
|
||||
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
private void deleteRecording() {
|
||||
if(mSelectedUri.toString().contains(Constants.AUDIO_RECORDINGS_DIR)) {
|
||||
File audioFile = new File(mSelectedUri.toString());
|
||||
|
||||
if(audioFile.exists()) {
|
||||
audioFile.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
InjectionHelper.destroyLoginComponent();
|
||||
|
||||
Reference in New Issue
Block a user