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

Commit 29a15a23 authored by Mangesh Ghiware's avatar Mangesh Ghiware Committed by Android Git Automerger
Browse files

am 2bd3c2f7: Merge "Fix null ptr exception in getReadingLevelScale()" into ics-mr0

* commit '2bd3c2f7':
  Fix null ptr exception in getReadingLevelScale()
parents 9b61778d 2bd3c2f7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -314,7 +314,10 @@ class ZoomManager {
     * Returns the zoom scale used for reading text on a double-tap.
     */
    public final float getReadingLevelScale() {
        return mDisplayDensity * mWebView.getSettings().getDoubleTapZoom() / 100.0f;
        WebSettings settings = mWebView.getSettings();
        final float doubleTapZoomFactor = settings != null
            ? settings.getDoubleTapZoom() / 100.f : 1.0f;
        return mDisplayDensity * doubleTapZoomFactor;
    }

    public final float getInvDefaultScale() {