Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 515f6d8d authored by Derek Sollenberger's avatar Derek Sollenberger
Browse files

Only show double-tap tip if the feature is enabled.

bug: 3170472
Change-Id: I41a278ff44a7fba807c3a4a22f0e0ea20d137d0a
parent 56a102c0
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ class ZoomControlEmbedded implements ZoomControlBase {

            mZoomButtonsController.setVisible(true);

            if (mZoomManager.isDoubleTapEnabled()) {
                WebSettings settings = mWebView.getSettings();
                int count = settings.getDoubleTapToastCount();
                if (mZoomManager.isInZoomOverview() && count > 0) {
@@ -50,6 +51,7 @@ class ZoomControlEmbedded implements ZoomControlBase {
                }
            }
        }
    }

    public void hide() {
        if (mZoomButtonsController != null) {
+6 −1
Original line number Diff line number Diff line
@@ -510,6 +510,11 @@ class ZoomManager {
        }
    }

    public boolean isDoubleTapEnabled() {
        WebSettings settings = mWebView.getSettings();
        return settings != null && settings.getUseWideViewPort();
    }

    /**
     * The double tap gesture can result in different behaviors depending on the
     * content that is tapped.
@@ -528,7 +533,7 @@ class ZoomManager {
     */
    public void handleDoubleTap(float lastTouchX, float lastTouchY) {
        WebSettings settings = mWebView.getSettings();
        if (settings == null || settings.getUseWideViewPort() == false) {
        if (!isDoubleTapEnabled()) {
            return;
        }