Commit 980362e2 authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

Block Duet feature on tablets from FeatureUtilities

This patch changes the feature check for Duet to include a check for
tablets. Duet will not be enabled on tablets and is causing a crash
when the util reports that it is enabled (when it technically isn't).

Bug: 862818
Change-Id: I8117296e0397453d9c16bc73f7f72ae49ee78499
Reviewed-on: https://chromium-review.googlesource.com/1135708Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574751}
parent 29b67896
...@@ -16,6 +16,7 @@ import android.os.UserManager; ...@@ -16,6 +16,7 @@ import android.os.UserManager;
import android.speech.RecognizerIntent; import android.speech.RecognizerIntent;
import org.chromium.base.CommandLine; import org.chromium.base.CommandLine;
import org.chromium.base.ContextUtils;
import org.chromium.base.StrictModeContext; import org.chromium.base.StrictModeContext;
import org.chromium.base.SysUtils; import org.chromium.base.SysUtils;
import org.chromium.base.ThreadUtils; import org.chromium.base.ThreadUtils;
...@@ -260,7 +261,9 @@ public class FeatureUtilities { ...@@ -260,7 +261,9 @@ public class FeatureUtilities {
ChromePreferenceManager prefManager = ChromePreferenceManager.getInstance(); ChromePreferenceManager prefManager = ChromePreferenceManager.getInstance();
try (StrictModeContext unused = StrictModeContext.allowDiskReads()) { try (StrictModeContext unused = StrictModeContext.allowDiskReads()) {
sIsBottomToolbarEnabled = prefManager.isBottomToolbarEnabled(); sIsBottomToolbarEnabled = prefManager.isBottomToolbarEnabled()
&& !DeviceFormFactor.isNonMultiDisplayContextOnTablet(
ContextUtils.getApplicationContext());
} }
} }
return sIsBottomToolbarEnabled; return sIsBottomToolbarEnabled;
......
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