We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dba6906 + 1698d45 commit 2bd3c2fCopy full SHA for 2bd3c2f
core/java/android/webkit/ZoomManager.java
@@ -314,7 +314,10 @@ public final float getDefaultScale() {
314
* Returns the zoom scale used for reading text on a double-tap.
315
*/
316
public final float getReadingLevelScale() {
317
- return mDisplayDensity * mWebView.getSettings().getDoubleTapZoom() / 100.0f;
+ WebSettings settings = mWebView.getSettings();
318
+ final float doubleTapZoomFactor = settings != null
319
+ ? settings.getDoubleTapZoom() / 100.f : 1.0f;
320
+ return mDisplayDensity * doubleTapZoomFactor;
321
}
322
323
public final float getInvDefaultScale() {
0 commit comments