Changing class DeviceProductInfo to public class with hidden ctor to expose via
Display#getDeviceProductInfo. Removing the relative address and changing
to connectionToSinkType.
Bug: 179775994
Test: atest CtsDisplayTestCases
Change-Id: I6959d2829f7ff9ba609f9e4e3cb7b52e0f555c3f
This CL only updates mAboveInsetsState while the z-order of a window is
changed or the display info has been updated.
This can be a step to make client compute its window frame locally.
Bug: 161810301
Bug: 175861127
Test: atest DisplayPolicyTests DisplayPolicyLayoutTests
Change-Id: Ic202ca82ae3b0aeaf4d95ba6d0847970aa9896a6
In this CL we introduce SurfaceContorl.getDynamicDisplayInfo
which replaces the current seprate calls for supported and
active display mode, supproted and active color modes and
HDR capabilities.
This way display capabilities can be queried atomically.
Additionally this CL pipes an DisplayMode IDs from
SurfaceFlinger and updates LocalDislayAdapter to use
IDs instead of array indices.
Test: presubmit
Bug: 159590486
Bug: 175678215
Change-Id: I169e3055d07905e2330e11f158b61ffd366f97e6
This "undoes" the rotation in incoming displayviewports
so that inputflinger always works in the orientation the display
grew-up in
It also modifies existing gesture-monitors to deal with unrotated
coordinates
This is behind a flag:
adb shell setprop persist.debug.per_window_input_rotation 1
Bug: 179274888
Test: phone should work like normal
atest MotionEventTest (coretests)
Change-Id: Iaa7ff7d62e9f756af2c9c622ec508c5e538ec8bd
We support 0-width/height window to get shared edge with inset for
b/150696052, but we should limit that to only 0-width/height window.
This will fix the issue that in a dual-display device, when the ime is
only shown on one display, the app on the other display shouldn't get
the inset.
Bug: 175779509
Test: atest InsetsSourceTest
Change-Id: I3c73278a082b084e36be8241c20fa89fb00e405a
Added public APIs to call into WindowManagerService, which will then
call into DisplayHasherService in mainline. Also, renamed to DisplayHash
Test: atest DisplayHashManagerTest
Bug: 155825630
Change-Id: I1e10a773fba9471dff41894389e0a9508446d3cc
- Add SurfaceStatsCallback to TransactionCompletedListener
- Register a callback in RenderProxy to be called when we have
surface stats from SF via the BLAST callback.
- Instead of finishing a frame for frame metrics reporting
immediately, wait until BLAST callback fires, note GPU completion
time and finish frame.
- Expose GPU_COMPLETION in FrameMetrics
- Modify TOTAL_DURATION to also include GPU_COMPLETION
Test: FrameMetricsListenerTest
Fixes: 171046219
Change-Id: I16fa1d80cfc4e7a5527c18fec7e885409f17ee4d
As InputMethodManager#isActive(View) may not always predictable as
reality since the method only check if the given view has been aligned
with the current served view, but not consider if the view has an active
input connection.
Test flakiness may happen when verifying showSoftInput should be invoked
after onStartInput but the event stream shows the reversed sequence.
Consolidate scheduleShowSoftInput by checking
IMM#hasActiveInputConnection to make sure showSoftInput request should
invoked after the input connection activated by the given focus view.
Bug: 176697749
Test: atest --iterations 100 KeyboardVisibilityControlTest#\
testImeInvisibleWhenForceStopPkgProcess_Full
Change-Id: I466a93e2b4706ae809ac50dc16dc8e4ffa7c2f1c
add a method, setSurfaceControl, for java layer to pass surface control to the render thread
Bug: 173671170
Test: call setSurfaceControl method in ViewRootImpl.java
Change-Id: I886a79c377938f19cf38b9058f2bec64e1439000
Introduce new APIs to customize exit splash screen animation.
- SplashScreen
This can be used for Activity to handle the exit splash screen
animation.
- SplashScreen#OnExitAnimationListener
When receive onSplashScreenExit, the splash screen view will be on
top of the activity.
- SplashScreenView
The view object which represents the view of current starting window.
There are two APIs for developer to control it:
- getIconView: get the icon view object.
- remove: remove the view and release resources.
If an Activity create a OnExitAnimationListener and set on
SplashScreen, the core will request a copy of SplashScreenView
from Shell, then send the parcelable information to client to
reconstruct the view on top of the DecorView, then call
onSplashScreenExit to let the listener able to operating this view.
Bug: 73289295
Test: build/flash, check splash screen starting window.
Test: atest StartingSurfaceDrawerTests ActivityRecordTests
WindowOrganizerTests
Test: atest CtsWindowManagerDeviceTestCases:SplashscreenTests
Change-Id: I9f77fb4471bcf37a7f74d6c18a345ca56c05b716
Bug: 178807038
Modify ScrollView and HorizontalScrollView to support
stretch overscroll.
Test: I18820794f2511ff4b7df1c5c6a9d7a2d5fafeaa0
Change-Id: I1370b702ce7331269744033c6acb61b84519c853
This CL exposes Window#setBackgroundBlurRadius as public Api. It
creates a region behind the window (with the dimensions of the window
background drawable), which is blurred with the given radius.
It also adds windowBackgroundBlurRadius dimension as an xml attribute
on Window.
Bug: 167166562
Bug: 177524486
Test: m
Test: m doc-comment-check-docs
Test: atest BlurTests
Change-Id: I5c0ff3c7fc7a64e6b2e2339eccc23374ec3b5fd9
Continuing the general trend of deprecating deferTransactionUntil.
Bug: 168505645
Test: Existing tests pass
Change-Id: I72e1f4e2eec369ecdbd3723d9af3f9f2e8f71c36
When exiting splitscreen we can end up cropping the SurfaceView
incorrectly. This is because when drag drag resizing, the surface is
resized to full screen and the window frame is updated in a
subsequent relayout call.
To fix this we use the surface size after adjusting for surface insets.
Test: exit chrome from splitscreen to fullscreen, check that SV resizes
correctly
Test: atest SurfaceViewSyncTest
Test: go/wm-smoke
Fixes: 179911825
Change-Id: I0ccbdb5afa507b7a67e6aa7071ab5fb71f8a8cb8
The background layer was parented to the root sv layer but in blast
when recreating the sv surface, we were only cleaning up the blast
surface. This would leak the root container layer and the background
color layer that was parented to it.
Instead with blast enabled, we keep both the root and the blast layer
alive. If the surface needs to be recreated, we only recreate the
BlastBufferQueue adapter. This also simplifies the preserve old surface
logic because we no longer need to track the old surface control. The
blast layer will continue presenting the buffer from the old BBQ.
Test: -1 screen with video, check we are not leaking background layers
Test: go/wm-smoke
Fixes: 175743319
Change-Id: I0f5d57e512bfae4fff9cbcd52f6939103ad3a4b0
SurfaceSession.nativeKill would call SurfaceComposerClient.dispose. This
was unsafe since it would only clear the ISurfaceComposerClient binder
object, but the SurfaceComposerClient object could still be around.
Instead, when calling SurfaceSession.kill, just remove the Java
reference, but allow the dtor of SurfaceComposerClient to handle
disposing the binder object.
Test: Force app to restart while in a sync transaction. No longer shows
an error
Fixes: 179459565
Change-Id: I322e7f3bd4e7efb3d85d1afe3c4704283f58a985
Helps us down the path of deprecating deferred transaction. BLASTSync
should also be easier to debug and produce less overhead on the server.
Bug: 168505645
Test: Existing tests pass
Change-Id: I1f1375f4ddfe84f724109d1c1b601260cef0ba6c
This is mostly a matter of flipping the flag, except for the case of
SystemWindows. While external SurfaceControlViewHost clients use the
leash provided by the SurfaceControlViewHost rather than the internal
ViewRootImpl surface, SystemWindows clients will use the actual
ViewRootImpl surface. This can conflict with the BLAST adapter setting
crop/frame/etc on this Surface. We modify SystemWindows to put
each layer inside a leash, and hand this out to other parts of SysUI
instead of the ViewRootImpl surface.
Test: Existing tests pass
Bug: 168505645
Change-Id: Ie621f89166f00ce385d450f1f1cea4d4abd1b805
Since the client owns its own SurfaceControl now, there is no
need to call through to the WM just to set transparent regions.
Bug: 161937501
Test: Existing tests pass
Change-Id: I1767090bc60be72b86879ae806876d49bfa0e06c