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

Commit 01ef9eab authored by Shimeng (Simon) Wang's avatar Shimeng (Simon) Wang Committed by Android (Google) Code Review
Browse files

Merge "Use dimension value instead of fixed constant in code."

parents bcfd23a5 a2ded6ca
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.webkit;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
@@ -326,7 +327,9 @@ public class WebSettings {
        // Detect tablet device for fixed viewport mode.
        final DisplayMetrics metrics = context.getResources().getDisplayMetrics();
        final int landscapeWidth = Math.max(metrics.widthPixels, metrics.heightPixels);
        mUseFixedViewport = (metrics.density == 1.0f && landscapeWidth >= 800);
        final int minTabletWidth = context.getResources().getDimensionPixelSize(
            com.android.internal.R.dimen.min_xlarge_screen_width);
        mUseFixedViewport = (metrics.density == 1.0f && landscapeWidth >= minTabletWidth);
        mMaxFixedViewportWidth = (int) (landscapeWidth * 1.25);

        if (sLockForLocaleSettings == null) {
+2 −0
Original line number Diff line number Diff line
@@ -43,6 +43,8 @@
    <dimen name="fastscroll_thumb_width">64dp</dimen>
    <!-- Height of the fastscroll thumb -->
    <dimen name="fastscroll_thumb_height">52dp</dimen>
    <!-- Min width for a tablet device -->
    <dimen name="min_xlarge_screen_width">800dp</dimen>
    <!-- Default height of a key in the password keyboard for alpha -->
    <dimen name="password_keyboard_key_height_alpha">56dip</dimen>
    <!-- Default height of a key in the password keyboard for numeric -->