OSDN Git Service

Add configuration for maximum UI width.
authorBryce Lee <brycelee@google.com>
Tue, 21 Mar 2017 16:41:37 +0000 (09:41 -0700)
committerBryce Lee <brycelee@google.com>
Tue, 28 Mar 2017 20:23:45 +0000 (20:23 +0000)
commit27cec32496090efd153327f4fc5a5cecc6f59d9b
tree86990e118b6273c6c8eec7b1fd44c214db02a8ab
parentcf1f1d9128853f0fa0cef657e2bbb7bf6904c732
Add configuration for maximum UI width.

This changelist adds config_maxUiWidth, a new system resource
configuration which specifies the maximum width the user interface
can operate in. If the physical or specified width is greater than
this value, dimensions and density are scaled down accordingly. The
native mode resolution can be still discovered through
Display.Mode#getPhysicalWidth/getPhysicalHeight.

Test: Defined override for development device and verified values.
Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests#testMaxUiWidth
Change-Id: I12e7ad52f2aa8014e143bc7e80b020c9b24ed9c8
Fixes: 25820708
core/res/res/values/config.xml
core/res/res/values/symbols.xml
services/core/java/com/android/server/wm/DisplayContent.java
services/core/java/com/android/server/wm/WindowManagerService.java
services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java