summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alison Cichowlas <asc@google.com> 2023-02-09 15:13:47 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-02-09 15:13:47 +0000
commit1add3774e41e876effe396bebd178e97c46a428e (patch)
tree3b6155164434e0312ad038a01f927ce543ab5a3a
parenta71abc1388f796d09d48e6fa85a9b915f36e45b1 (diff)
parent514e43a6ab42a6928f3ac740d0a82be902d5941d (diff)
Merge "Change mODICaptionsTooltipView null check occasion to avoid potential crash"
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index 198d02229740..c63b3b336ade 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -1128,13 +1128,13 @@ public class VolumeDialogImpl implements VolumeDialog,
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
+ // 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.
+ mHandler.post(() -> {
+ if (mODICaptionsTooltipView != null) {
+ mODICaptionsTooltipView.setAlpha(0.0f);
- // 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
- // the dialog), we need to do this here in code vs. in XML.
- mHandler.post(() -> {
final int[] odiTooltipLocation = mODICaptionsTooltipView.getLocationOnScreen();
final int[] odiButtonLocation = mODICaptionsIcon.getLocationOnScreen();
@@ -1160,8 +1160,8 @@ public class VolumeDialogImpl implements VolumeDialog,
}
})
.start();
- });
- }
+ }
+ });
}
private void hideCaptionsTooltip() {