diff options
Diffstat (limited to 'java/com/android/dialer/callcomposer')
-rw-r--r-- | java/com/android/dialer/callcomposer/CameraComposerFragment.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/com/android/dialer/callcomposer/CameraComposerFragment.java b/java/com/android/dialer/callcomposer/CameraComposerFragment.java index 1002b27b1..d55f3222c 100644 --- a/java/com/android/dialer/callcomposer/CameraComposerFragment.java +++ b/java/com/android/dialer/callcomposer/CameraComposerFragment.java @@ -332,7 +332,11 @@ public class CameraComposerFragment extends CallComposerFragment /** Updates the state of the buttons and overlays based on the current state of the view */ private void updateViewState() { Assert.isNotNull(cameraView); - Assert.isNotNull(getContext()); + if (isDetached() || getContext() == null) { + LogUtil.i( + "CameraComposerFragment.updateViewState", "Fragment detached, cannot update view state"); + return; + } boolean isCameraAvailable = CameraManager.get().isCameraAvailable(); boolean uriReadyOrProcessing = cameraUri != null || processingUri; |