From a24baca0c8dcf6523f776687ee65489415ac1fab Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Wed, 3 Mar 2021 09:31:34 -0500 Subject: [PATCH] Make sure the ringer drawer is present before trying to hide it. Fixes: 181751039 Test: I don't have a TV device, but it's just a null check Change-Id: Ic26a81e1bec67106b7b6154438bac0cabc07dc60 --- .../src/com/android/systemui/volume/VolumeDialogImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java index 25345d5c4b4ca..5dc7006406eea 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java @@ -778,6 +778,12 @@ public class VolumeDialogImpl implements VolumeDialog, /** Animates away the ringer drawer. */ private void hideRingerDrawer() { + + // If the ringer drawer isn't present, don't try to hide it. + if (mRingerDrawerContainer == null) { + return; + } + // Hide the drawer icon for the selected ringer - it's visible in the ringer button and we // don't want to be able to see it while it animates away. getDrawerIconViewForMode(mState.ringerModeInternal).setVisibility(INVISIBLE);