New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 706770 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Apr 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Android app in Chromebook cannot get correct dpi value with DisplayMetrics interface

Reported by laffier....@gmail.com, Mar 30 2017

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 9000.91.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.110 Safari/537.36

Steps to reproduce the problem:

Enable Play store in Chromebook Pixel 2015

1.set Chromebook Pixel 2015 to best resolution
Run the following code in  Android app in Chromebook Pixel 2013/2015

DisplayMetrics dm = new DisplayMetrics();
mActivity.getWindowManager().getDefaultDisplay().getMetrics(dm);
int dpi = dm.densityDpi;

What is the expected behavior?
We got 120 in the first step

What went wrong?
We got 240 in the first step

Did this work before? N/A 

Chrome version: 56.0.2924.110  Channel: stable
OS Version: 9000.91.0
Flash Version: Shockwave Flash 24.0 r0

We can get correct value with Chrome.system.display.getInfo
 
This issue also exists in other Deivce with play store supported

Chrome API: Chrome.system.display.getInfo


1.Acer Chromebook R11 / C738T 
 in best resolution 1366x768
  dpi value got with Chrome API:133
  dpi value got with Android API:160

in maximum resolution  1536x864
  dpi value got with Chrome API:150
  dpi value got with Android API:160


2.ASUS Chromebook Flip

in best resolution 1280x800

  dpi value got with Chrome API:149
  dpi value got with Android API:160

in maximum resolution  1440x900

  dpi value got with Chrome API:168
  dpi value got with Android API:160
Cc: victorhsieh@chromium.org skuhne@chromium.org
Components: Platform>ARC
 Issue 706768  has been merged into this issue.
Project Member

Comment 4 by sheriffbot@chromium.org, Apr 19 2018

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment