Merge "Change mODICaptionsTooltipView null check occasion to avoid potential crash" am: 1add3774e4

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2405714

Change-Id: I8f3c5c2b9c16c347aa47edec664bef8784e494d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alison Cichowlas
2023-02-09 15:28:59 +00:00
committed by Automerger Merge Worker

View File

@@ -1228,13 +1228,13 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
rescheduleTimeoutH(); rescheduleTimeoutH();
} }
if (mODICaptionsTooltipView != null) {
mODICaptionsTooltipView.setAlpha(0.0f);
// We need to wait for layout and then center the caption view. Since the height of the // We need to wait for layout and then center the caption view. Since the height of the
// dialog is now dynamic (with the variable ringer drawer height changing the height of // dialog is now dynamic (with the variable ringer drawer height changing the height of
// the dialog), we need to do this here in code vs. in XML. // the dialog), we need to do this here in code vs. in XML.
mHandler.post(() -> { mHandler.post(() -> {
if (mODICaptionsTooltipView != null) {
mODICaptionsTooltipView.setAlpha(0.0f);
final int[] odiTooltipLocation = mODICaptionsTooltipView.getLocationOnScreen(); final int[] odiTooltipLocation = mODICaptionsTooltipView.getLocationOnScreen();
final int[] odiButtonLocation = mODICaptionsIcon.getLocationOnScreen(); final int[] odiButtonLocation = mODICaptionsIcon.getLocationOnScreen();
@@ -1260,8 +1260,8 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
} }
}) })
.start(); .start();
});
} }
});
} }
private void hideCaptionsTooltip() { private void hideCaptionsTooltip() {