Skip to content

Commit b526c77

Browse files
matpagwcshi
authored andcommitted
[BaseTransientBottomBar] Check for nullable AccessibilityService
Resolves #1885 Resolves #1888 GIT_ORIGIN_REV_ID=35572a920b4bdd66e416d428c55416df7c498db6 PiperOrigin-RevId: 343873267 (cherry picked from commit 2b95793)
1 parent 316c68e commit b526c77

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/java/com/google/android/material/snackbar/BaseTransientBottomBar.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,9 @@ void onViewHidden(int event) {
10981098

10991099
/** Returns true if we should animate the Snackbar view in/out. */
11001100
boolean shouldAnimate() {
1101+
if (accessibilityManager == null) {
1102+
return true;
1103+
}
11011104
int feedbackFlags = AccessibilityServiceInfo.FEEDBACK_SPOKEN;
11021105
List<AccessibilityServiceInfo> serviceList =
11031106
accessibilityManager.getEnabledAccessibilityServiceList(feedbackFlags);

0 commit comments

Comments
 (0)