History log of /frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
66855315850bda0a0184a56bdd3099f4faa8b984 04-Oct-2017 Karthik Ravi Shankar <karthikrs@google.com> Fix race condition when entering low persistence mode

The problem is that -

1) When the device enters a VR activity directly from screen off, there
is a chance the device is not in low persistence mode and ghosting is
really bad.
2) LocalDisplayAdapter gets to know that the device is in VR mode later
than PowerManagerService due to scheduling of it's runnable.
3) The call to Lights HAL to change the display mode only is made only
when there is a brightness change.
4) This opens up a race condition where the PowerManagerService knows device
is in VR mode and changes the brightness to VR brightness before the
LocalDisplayAdapter knows about the VR mode change.
5) Since there is no more brightness change to be done, the device is
not in low persistence mode creating really bad UX.

Fix is to trigger a brightness change call when there is a Display state
change so that LocalDisplayAdapter sets the low persistence mode
correctly always.

Bug: 67114120
Test:

1) Lock and unlock to VR puts the device in low persistence mode
correctly always.
2) Lock and unlock in normal mode changes brightness correctly.
3) Even with lockscreen, all of the use cases above work correctly.

Change-Id: Ic0e6d92ba145aaa94f86e6d53ab5aa08cbbae10c
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
a9f37abc7d3205f1f2aaca7c8bfcf1cdc7d99959 15-Aug-2017 Michael Wright <michaelwr@google.com> Add trace counter for target screen brightness.

Bug: 64514692
Test: took systrace, saw counter
Change-Id: I8aa588e55cab5e0ef847a4705a96199657bf83ae
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
c3e6af876933a5aa7daac096a56988a42053d4f3 25-Jul-2017 Michael Wright <michaelwr@google.com> Report the display is off when the hardware blanks itself.

Some hardware will blank itself coming out of doze to avoid artifacts
from being shown. In order to perform a graceful transition from doze to
on, tell window manager policy that the display turned off and then
turned on without actually telling the display to enter the off state,
in order to keep the screen on latency low.

Bug: 63531607
Test: manual
Change-Id: I4362905e47d5fb47b639c8701c91d69b50aa1232
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
34a0cdb98eb5561774ea4e7b3b602aad80c4a3cc 09-Jun-2017 Jorim Jaggi <jjaggi@google.com> Properly run window animations at vsync-sf (1/2)

- Add new Choreographer instance that runs on vsync-sf
- Use this new Choreographer for WindowAnimator, and remove all
the hacks around it

Test: Open apps and close apps, notice no stutter
Test: Screen zoom animations
Test: go/wm-smoke
Bug: 36631902
Change-Id: I988ae25645effc3ac20efa7cb9b68f23444da0d0
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
c0f87db0265f3fc2db0a356e5f5bb133d8ec9516 23-Jan-2017 thecrazyskull <anaskarbila@aospa.co> Merge "LocalDisplayAdapter: don't crash when no color modes available" am: 24218db904 am: f15075c9f8
am: d0fff5284f

Change-Id: I319f88d1d88ff9e4b8507224ca7209eb7631dc99
b34c8104cbb8acc554c4039a2a283ea4d1fcc92f 18-Dec-2016 thecrazyskull <anaskarbila@aospa.co> LocalDisplayAdapter: don't crash when no color modes available

Test: none

Change-Id: Ic11b5b66864fdd97b290722cba534b2aa38ac054
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
d6a5660a2c9f70c9a363d388a091542a378d57d1 21-Sep-2016 Santos Cordon <santoscordon@google.com> Add Brightness setting for VR Mode.

This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Bug: 30984614
Change-Id: If3c3e81b592e0c6fd037e5783559683e5cb58379
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
966045d0702ca36df6e8c1e4597aaeb37436ca2f 27-Dec-2016 Selim Cinek <cinek@google.com> DO NOT MERGE Revert "Add Brightness setting for VR Mode."

This reverts commit 84980c7a93e93e7134c0198212e222e11eb5ccbd.

Bug: 33895226
Bug: 30984614
Change-Id: I2652e77512bc870190e2172a629abac9341b2c4f
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
84980c7a93e93e7134c0198212e222e11eb5ccbd 21-Sep-2016 Santos Cordon <santoscordon@google.com> Add Brightness setting for VR Mode.

This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Bug: 30984614
Merged-In: Ie5578bbd6ea346f0eb34fe4abbfd604a5d7c0c93
Change-Id: Ie5578bbd6ea346f0eb34fe4abbfd604a5d7c0c93
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
1c9977b762b4bac46b4470f04c898bfd17da5d90 12-Jul-2016 Michael Wright <michaelwr@google.com> Rename color transform to color mode and persist the value.

Also, standardize on a set of possible modes for the displays to
enter and separate the configuration of the color mode from the
configuration of the display mode.

Bug: 29044347

Change-Id: I6af0a7d1f11bc72d4cefc380f115c1fb00788864
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
9ff94c0251722c44eece7c3561b4ed36b286d4a8 31-Mar-2016 Michael Wright <michaelwr@google.com> Plumb HDR capabilities to Display

Bug: 25684127
Change-Id: I0a4fcdc59aa1a7b295c8df03699466685300e735
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
d3c454db291e2780c4ad5fe8b5d9e8ce3fbea114 25-Mar-2016 Griff Hazen <griff@google.com> Detect ranchu as emulator

Bug: 27780791

Change-Id: I23e5511acfba22260714874baf5e9380480b22bf
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
4b0fa173defb5c31832ddccf86485fb35f10dae2 12-Mar-2016 Michael Wright <michaelwr@google.com> Make display mirroring for local displays configurable.

While in general we still want to mirror the content of the default
displays onto content-less displays, some devices (e.g. Android Auto)
know they're going to have a secondary display for specific
information and don't want this behavior.

Change-Id: I068cc898a4118e78a5fff67bba27ad54504d9e2f
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
3b3cbb5325e1a8bce09200644b5667fb321d9b90 25-Sep-2015 Jorim Jaggi <jjaggi@google.com> Do not issue config change command when not needed

This caused a but where WindowManager was blocked on this to perform a
layout, leading to delays in screen wake-ups.

Bug: 24383169
Change-Id: I42bc08dae9057060f09c301328bb4839a970c597
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
58e829f71d2c525309e5bb5a1c02dc64397df221 15-Sep-2015 Michael Wright <michaelwr@google.com> Add support for setting color transforms

Bug: 24038268
Change-Id: I05275c906e02eb9e67331f6f909166eb08ad5536
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
01f280d376218c5a007fc29f70b876375ad24204 19-May-2015 Adam Powell <adamp@google.com> Migrate uses of config_windowIsRound to Configuration.isScreenRound

Move existing code that previously relied on config_windowIsRound to
use the new Configuration.isScreenRound() method. Also move the system
property override for emulators over to the initial setup of a Display
so that the configuration property is consistent with existing
expectations.

Remove config_windowIsRound from symbols.xml. The symbol now only
exists as a default value redirect for overlays already configured to
supply this value.

Change-Id: I24e6564030a6051c3ac7262868983b43e13eee65
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
49e7ff9647e6547c2b852944a5435a05794b9951 15-May-2015 Adam Powell <adamp@google.com> Add Configuration data for round displays

Add round values to the screenLayout field for Configuration
and a convenience method to check roundness.

Plumb this through the DisplayManager, making roundness the property
of a DisplayAdapter. The built-in main display will read the
configuration resource config_mainBuiltInDisplayIsRound to determine
its roundness. Device-specific resource overlays should set this to
true for devices with round primary displays.

By default, this config resource inherits from the existing
config_windowIsRound value currently used by some Android Wear
device configurations.

This change awaits another for aapt/native resources code to make the
resource filtering system aware of this property.

Change-Id: I1daced7ca6d6e172789e7c32bebfd43753bfa2ae
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
b3b9eb3cfc5b3b3609a5d01258315798b38a5cf9 12-May-2015 P.Y. Laligand <pylaligand@google.com> DO NOT MERGE - Display mode switches.

Knowledge of the various modes of a display is now available to apps, and they can request a specific mode for their windows.

b/18241736

Change-Id: I8eb16ff713e878512faca3ca6662254f08a9be7f
(cherry picked from commit 5c7773d86484aac5737667c604bd8fe8150c2136)
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
5d6443bf7c087167e47ea39b13e6af09cb43ad97 11-Apr-2015 Jeff Brown <jeffbrown@google.com> Set initial screen brightness earlier in the boot process.

Previously we had to wait for systemReady before setting the brightness
due to the order in which the display power controller was initialized.
Unfortunately it could take us a rather long time to reach that stage,
particularly after an OTA where the screen would remain at maximum
brightness for minutes while "Optimizing Apps".

This change moves the brightness backlight setting code deeper
into the display manager which has a couple of nice side-benefits
in that it now becomes much easier to coordinate display power mode
changes with display backlight changes. So this change also resolves
some issued with changing the backlight while in DOZE_SUSPEND and
ensuring that backlight changes generally end up being performed
before executing a power mode change except in the case where the
display needs to come out of suspend first. (So now the backlight
will be set before entering DOZE from the ON state.)

Deleted some dead code in LightService which was in the way.

Bug: 19029490
Change-Id: I494b5223e676248daf2ff8be3ec338845977f73c
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
361ca21acc0831a9f8bbb259bb30218c252a2aa0 20-Nov-2014 Wale Ogunwale <ogunwale@google.com> Added unique id to display devices and their settings.

The display setting saved to disk were using a localized name for
the key. This is an issue if the user changes languages after the
display settings have been saved. We now use the non-localized
name for the display to access the settings if it is available,
else we fall back on the localized name.

Bug: 18190800
Change-Id: I837c06a8935df10727229a1aa2bb6eeb3953707f
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
e75926d6dc49878682631508c996e472d79a8d41 19-Sep-2014 Jeff Brown <jeffbrown@google.com> Move setting the display state out of the critical section.

Setting the display power state currently happens while holding the
display manager lock. This change moves it out of the lock to
ensure other services don't get stuck for several hundred
milliseconds.

Unfortunately, surface flinger ends up stalled a little later
so this only solves part of the problem.

Bug: 17623774
Change-Id: I201137c5e7f82c776f28a436845fcf3191fd0ca5
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
3edf5272fb2185403dfe64b9722b9fc9b9de80f8 15-Aug-2014 Jeff Brown <jeffbrown@google.com> Add trace tag for power management.

Instrumented the basic power manager state transitions,
calling into the Power HAL, setting the display power mode,
and setting the backlight.

Bug: 17004602
Change-Id: I4e362162ddfd7292a7eea8b5d029ce3f6593c4a9
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
3f145a2f958320766ae9240c7a57debc20d578aa 23-Jul-2014 Michael Wright <michaelwr@google.com> Add supported refresh rate to displays

Change-Id: I51231dd6dd231d57dd1ac499349d6335121f07d5
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
5dc219142a756d57355b511c8f8ab913c01710da 18-Jul-2014 Jeff Brown <jeffbrown@google.com> Add new Display.STATE_DOZE_SUSPEND power state.

Change-Id: Ia62f4f0d25234281dc600d0b7f08b3c6a312db7a
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
e8b1aeb51e1e5da64f1d4fd40f2ee1e815886fe5 13-Jun-2014 Andy McFadden <fadden@android.com> Add two new display info fields

This adds SurfaceFlinger's app VSYNC offset and buffer deadline
values to DisplayInfo. The values will be available to apps
through queries on a Display object (currently hidden).

Bug 14612039

Change-Id: I48760f58a9d74d99651b02a9d595f420410f2bb5
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
c55929a2a5686fe456b19cd54a73b8bde2a4332b 25-May-2014 Prashant Malani <pmalani@google.com> Add call to set power mode for display

The blank/unblank interface is being replaced by a generic
setPowerMode() call. This will allow the support of low power modes in
displays where such functionality is available. Currently three modes
are defined:

- POWER_MODE_OFF
- POWER_MODE_DOZE
- POWER_MODE_NORMAL

POWER_MODE_OFF would be analogous to blanking the screen,
POWER_MODE_NORMAL akin to unblanking it, and POWER_MODE_DOZE would
trigger an entry into the display's low power mode.

We also tie the JNI call to set power mode to the call from services which
actually invokes it.

The generic setPowerMode() call can be expanded to potentially include
other display power states.

Bug: 13472578
Change-Id: I74677506d3ee2ccc50ba70c5102d96b31fe7b837
Signed-off-by: Prashant Malani <pmalani@google.com>
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
00101052b5bf99a29acea3525864ed64b709c16c 03-May-2014 Dan Stoza <stoza@google.com> Enable changing display configuration

This allows querying and switching display device configurations
through the ISurfaceComposer/SurfaceComposerClient interface.

Bug: 14320401
Change-Id: Ie4363bc8353d95428f1114ea48e5b1c8976e1730
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
caeaa375946f251bea59f79f3ba73104e3f4634d 23-Apr-2014 Jeff Brown <jeffbrown@google.com> am 62271b95: am 3af39267: Merge "Fix HDMI hotplug display blanking behavior." into klp-modular-dev

* commit '62271b95222c5d67868ac1b3bbd8851d4fa18454':
Fix HDMI hotplug display blanking behavior.
44b1f76474218349c9327da9fe482e19aad98795 23-Apr-2014 Jeff Brown <jeffbrown@google.com> Fix HDMI hotplug display blanking behavior.

Bug: 14109146
Change-Id: Ie7de4fb05da210e8c74c795f7896cf9951701aeb
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
4e5c089ef3e62e7f658e71c0be262d09bd3e399b 11-Apr-2014 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 337e764d to master

Change-Id: I8168dbf42b68c2f7b5ccb300e0080dddc627af26
037c33eae74bee2774897d969d48947f9abe254f 09-Apr-2014 Jeff Brown <jeffbrown@google.com> Plumb display power state through display manager.

Declare a new method, Display.getState() to retrieve the actual
power state of a display.

Improved documentation for Intent.ACTION_SCREEN_ON and
Intent.ACTION_SCREEN_OFF to clarify what they really mean in
terms of the interactive state of the device.

Deprecated PowerManager.isScreenOn() and replaced it with
PowerManager.isInteractive() with a more suggestive name and
better documentation.

Redirect display power state changes to go through the display
manager first and only then head over to the power manager for
legacy compatibility.

Eliminated the bright here and woke here policy flags since they
were unused. Simplified the input dispatch policy somewhat.

Ensure that screen wake locks are respected up until the point
when dozing really begins.

Fixed a regression in DreamService where onDreamingStarted
might be called before onWindowAttached.

Bug: 13133142
Bug: 13472578
Bug: 13929355
Bug: 13760290
Change-Id: Iabef96921dd554ce3768fb18619cefc3230b5fb0
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java
49782e46c0eb85a25ae2abcf80880c48dbab5aea 20-Dec-2013 Amith Yamasani <yamasani@google.com> am 9158825f: Move some system services to separate directories

* commit '9158825f9c41869689d6b1786d7c7aa8bdd524ce':
Move some system services to separate directories
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java