Commit d6bdfe78 authored by Matt Jones's avatar Matt Jones Committed by Commit Bot

Fix downloads controller crash

Bug: 1021318
Change-Id: I98b7163f149a82f737f04ede5fd2817c6bb3108d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1900091Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Auto-Submit: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712782}
parent adaaa28f
...@@ -371,7 +371,10 @@ public class DownloadInfoBarController implements OfflineContentProvider.Observe ...@@ -371,7 +371,10 @@ public class DownloadInfoBarController implements OfflineContentProvider.Observe
public IPHInfoBarSupport.TrackerParameters getTrackerParameters() { public IPHInfoBarSupport.TrackerParameters getTrackerParameters() {
if (getDownloadCount().inProgress == 0) return null; if (getDownloadCount().inProgress == 0) return null;
if (getCurrentTab().getActivity().getBottomSheetController().isSheetOpen()) return null; if (getCurrentTab() == null || getCurrentTab().getActivity() == null
|| getCurrentTab().getActivity().getBottomSheetController().isSheetOpen()) {
return null;
}
return new IPHInfoBarSupport.TrackerParameters( return new IPHInfoBarSupport.TrackerParameters(
FeatureConstants.DOWNLOAD_INFOBAR_DOWNLOADS_ARE_FASTER_FEATURE, FeatureConstants.DOWNLOAD_INFOBAR_DOWNLOADS_ARE_FASTER_FEATURE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment