We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9b61778 + 2bd3c2f commit 29a15a2Copy full SHA for 29a15a2
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