Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No getprop('display.height') or getprop('display.width') on 4.3 Nexus 7 for AndroidViewClient 4.0 #41

Closed
nickwender opened this issue Sep 3, 2013 · 4 comments
Assignees

Comments

@nickwender
Copy link

On my Nexus 7 (stock 4.3), anything that relies on getprop('display.height') or getprop('display.width') fails as those commands return nothing.

Running adb shell getprop on my Nexus 7 returns two properties that may be of use:

persist.sys.NV_DISPXRES (value 800)
persist.sys.NV_DISPYRES (value 1280)

I am not sure if this is a change in Android 4.3 properties, a Nexus 7 issue. Seems outside the scope of AndroidViewClient, other than it appears that AndroidViewClient assumes the height and width properties will exist.

Update:

I do not think that 'display.height' and 'display.width' are generic for the getprop command. If you look at the source for the monkey daemon, (http://androidxref.com/4.3_r2.1/xref/development/cmds/monkey/src/com/android/commands/monkey/MonkeySourceNetworkVars.java#86), you can see these values are discovered in some other way.

@nickwender
Copy link
Author

Based on a StackOverflow question/answer, screen size should be available in the output of the

adb shell dumpsys window

command. However, some tests indicate that the exact formatting of the entry containing height and width may be device specfic.

Ref: http://stackoverflow.com/questions/7527459/android-device-screen-size

@dtmilano
Copy link
Owner

dtmilano commented Sep 3, 2013

You are totally right. These properties were not implemented in v4.0.0, mainly because different sources give different results (probably dumpsys window is the most accurate).
I will be fixing the problem ASAP.

@ghost ghost assigned dtmilano Sep 3, 2013
dtmilano added a commit that referenced this issue Sep 4, 2013
- No getprop('display.height') or getprop('display.width') on 4.3 Nexus 7 for AndroidViewClient 4.0
- Version 4.1.0
- Added property map
- Added tests
@dtmilano
Copy link
Owner

dtmilano commented Sep 5, 2013

Please verify it and close it if fixed.

@nickwender
Copy link
Author

Fixed on Nexus 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants