File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
app/src/main/java/org/thoughtcrime/securesms/mediasend Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 22
33import android .animation .Animator ;
44import android .annotation .SuppressLint ;
5+ import android .app .Activity ;
56import android .content .Context ;
67import android .content .pm .ActivityInfo ;
78import android .content .res .Configuration ;
@@ -448,13 +449,17 @@ private void showAndEnableControlsAfterVideoRecording(@NonNull View captureButto
448449 @ NonNull View flipButton ,
449450 @ NonNull Animation inAnimation )
450451 {
451- requireActivity ().runOnUiThread (() -> {
452- captureButton .setEnabled (true );
453- flashButton .startAnimation (inAnimation );
454- flashButton .setVisibility (View .VISIBLE );
455- flipButton .startAnimation (inAnimation );
456- flipButton .setVisibility (View .VISIBLE );
457- });
452+ Activity activity = getActivity ();
453+
454+ if (activity != null ) {
455+ activity .runOnUiThread (() -> {
456+ captureButton .setEnabled (true );
457+ flashButton .startAnimation (inAnimation );
458+ flashButton .setVisibility (View .VISIBLE );
459+ flipButton .startAnimation (inAnimation );
460+ flipButton .setVisibility (View .VISIBLE );
461+ });
462+ }
458463 }
459464
460465 private void onCaptureClicked () {
You can’t perform that action at this time.
0 commit comments