Commit Graph

16096 Commits

Author SHA1 Message Date
Marin Shalamanov
85bde7b023 Merge "Update ALLM and Game type support on hotplug" into sc-dev 2021-02-23 18:54:18 +00:00
Taran Singh
6ba3501f98 Merge "Avoid IME restart for configChanges" into sc-dev 2021-02-23 15:04:42 +00:00
Stevie Kideckel
990269dd07 Merge "Expose tint lists and other runtime functionality to RemoteViews" into sc-dev 2021-02-23 10:18:10 +00:00
Marin Shalamanov
1afe51de2f Update ALLM and Game type support on hotplug
In this CL we move ALLM and game contnet type support
to DynamicDisplayInfo and change LocalDisplayAdapter
to update them on hotplug. Unit tests for this scenario
are added.

Bug: 180108954
Test: atest LocalDisplayAdapterTest
Change-Id: Ida74d2782804f113fda784bdde00457ec3c80a2c
2021-02-23 10:58:35 +01:00
Chris Ye
98580a2e82 Merge changes from topic "LightsManager" into sc-dev
* changes:
  Support input device lights manager feature in frameworks.
  Add SET_REPORT data output to hid commandline tool.
2021-02-23 08:19:13 +00:00
TreeHugger Robot
1284ffd3f5 Merge "Refine the condition about force layout" into sc-dev 2021-02-23 07:52:11 +00:00
TreeHugger Robot
4a94d3965b Merge "SurfaceControlViewHost: Always set FLAG_HARDWARE_ACCELERATED for embedded views" into sc-dev 2021-02-23 05:49:53 +00:00
Joanne Chung
3278c403c7 Merge "Fix NPE in AutofillManager when feature autofill is disabled" into sc-dev 2021-02-23 03:03:11 +00:00
Chris Ye
cbb480c25e Support input device lights manager feature in frameworks.
Add lights manager support to input frameworks.

Bug: 161633625
Test: atest LightsManagerTest, atest InputDeviceLightsManagerTest
Change-Id: Ic6c701cad84f277325583c77195592d96d9296b8
2021-02-22 16:06:35 -08:00
John Reck
3b1ded1768 Merge "Wire up SurfaceView stretch effect" into sc-dev 2021-02-22 22:30:29 +00:00
Marin Shalamanov
1b520a6d3f Merge "Introduce DynamicDisplayInfo" into sc-dev 2021-02-22 18:28:27 +00:00
Tiger Huang
657ec55928 Merge "Only update mAboveInsetsState when necessary" into sc-dev 2021-02-22 17:12:17 +00:00
Joanne Chung
134d041153 Fix NPE in AutofillManager when feature autofill is disabled
When feature_autofill is not present on device IAutoFillManager
service could be null. It is proposed to check service for null
before trying to add client to prevent NPE.

Bug: 180913556
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases \
    -t android.widget.cts.DatePickerTest#testPartsVisibilityInSpinnerMode
Test: atest CtsAutoFillServiceTestCases
Change-Id: I4d65fe4f664e37115d653e981094f1a52c1d97e8
2021-02-23 00:31:44 +08:00
Stevie Kideckel
41c60e0ccb Expose tint lists and other runtime functionality to RemoteViews
Bug: 180086170
Test: sample app using new methods, atest
Change-Id: I5aa5476d95d6c9fb992c4548d97f577234d747a7
2021-02-22 15:09:18 +00:00
Kriti Dang
bcd8ea64de Merge "Adding public API to expose DisplayInfo.deviceProductInfo" into sc-dev 2021-02-22 13:31:42 +00:00
Tiger Huang
07981b4f3f Refine the condition about force layout
This CL applies SOFT_INPUT_MASK_ADJUST before comparing to
SOFT_INPUT_ADJUST_RESIZE.

Bug: 161781474
Test: atest ForceRelayoutTest ForceRelayoutSdk29Test
Change-Id: I275faafd7520df06f512c638f7c5255cc460aa02
2021-02-22 18:17:42 +08:00
Evan Rosky
aa1d38db25 Merge "Don't rotate inputflinger's display" into sc-dev 2021-02-20 01:46:25 +00:00
Chris Li
21dad1954c Merge "Fix non-zero window inset" into sc-dev 2021-02-19 19:02:32 +00:00
Kriti Dang
0a40860bc1 Adding public API to expose DisplayInfo.deviceProductInfo
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
2021-02-19 15:14:41 +01:00
Chavi Weingarten
c14465c2bb Merge "Added public APIs to generate and validate a DisplayHash." into sc-dev 2021-02-19 01:47:14 +00:00
Tiger Huang
c891f22678 Only update mAboveInsetsState when necessary
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
2021-02-19 03:22:40 +08:00
Taran Singh
d6f8a1ada1 Avoid IME restart for configChanges
Handle onConfigurationChanged() in order to prevent restarting
InputMethodService everytime. We introduce a new API attribute
"configChanges" in InputMethod(attrs.xml) which when declared
by IME, will be responsible for handling mentioned
configuration changes.

Bug: 167948419
Test: atest InputMethodServiceTest
    Manually:
      1. Patch Ie91e7a8e06b80864ef9409031e8543858552d70d to use dual
         display area.
      2. Open applications with editors on both display areas.
      3. Attach a debug point for IMS#onConfigurationChanged().
      4. Make sure IMS#resetStateForNewConfiguration() is not called
         when IME moves between these two identical DisplayAreas

Change-Id: Iff88b768c6b06cf5cf1fe9e97ee97f8f78e6f0bd
2021-02-18 18:22:27 +00:00
Marin Shalamanov
463ad8ee22 Introduce DynamicDisplayInfo
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
2021-02-18 18:54:41 +01:00
Vishnu Nair
8a3568667f SurfaceControlViewHost: Always set FLAG_HARDWARE_ACCELERATED for embedded views
If FLAG_HARDWARE_ACCELERATED is not set, view
framework will not use hw rendering and the shadows
will not be rendered.

Fix this by adding the flag when setting the view in
SurfaceControlViewHost. The public api already sets this
flag, so this brings parity to the internal api as well.

Test: Embedded window can draw shadows
Fixes: 180613222
Change-Id: Ife84ea9e09d415679fdf973bbc572eda360921e4
2021-02-18 09:04:16 -08:00
Evan Rosky
1db6aa54ae Don't rotate inputflinger's display
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
2021-02-17 17:52:40 -08:00
John Reck
5d53a7540a Wire up SurfaceView stretch effect
Bug: 179047472
Test: StretchySurfaceViewActivity

Change-Id: I7f3d582cc66fb732a557e9332edc6d186db2335c
2021-02-17 15:44:50 -05:00
Chris Li
418acc10ae Fix non-zero window inset
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
2021-02-17 12:03:19 -08:00
Jorim Jaggi
81388d53e8 Merge "Add GPU completion to FrameMetrics (1/3)" into sc-dev 2021-02-17 17:38:20 +00:00
Stevie Kideckel
33882b673d Merge "Add RemoteViews.setBlendMode and expose target methods" into sc-dev 2021-02-17 17:37:38 +00:00
chaviw
19de7eab9b Added public APIs to generate and validate a DisplayHash.
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
2021-02-17 08:24:54 -08:00
TreeHugger Robot
02e5c21052 Merge "Adding a little more data to an exception." into sc-dev 2021-02-17 14:37:45 +00:00
Jorim Jaggi
71db8892ac Add GPU completion to FrameMetrics (1/3)
- 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
2021-02-17 14:55:22 +01:00
TreeHugger Robot
ab25c0a0dd Merge "Consolidate ImeAwareEditText#scheduleShowSoftInput (1/2)" into sc-dev 2021-02-17 13:26:01 +00:00
TreeHugger Robot
6c9f4850fb Merge "ScrollView and HorizontalScrollView stretch overscroll" into sc-dev 2021-02-17 00:30:32 +00:00
Jorim Jaggi
814951f27e Merge "Add SurfaceControl to hwui" into sc-dev 2021-02-16 20:11:45 +00:00
Santos Cordon
14d0dc0b80 Adding a little more data to an exception.
Bug: 178088604
Test: Manual
Change-Id: Ia2f36c1ff12cf53c91c65913f4e1755d0d4ba1a2
2021-02-16 17:55:26 +00:00
Ming-Shin Lu
8bcce88c86 Consolidate ImeAwareEditText#scheduleShowSoftInput (1/2)
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
2021-02-17 01:02:34 +08:00
Huihong Luo
5fdf7b8d26 Add SurfaceControl to hwui
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
2021-02-16 17:38:12 +01:00
wilsonshih
56f65c3bb7 Customizable exit splash screen animation.(2/N)
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
2021-02-15 14:49:00 +01:00
Galia Peycheva
de2e513209 Merge "Add window background blur public api" into sc-dev 2021-02-15 12:40:02 +00:00
George Mount
97f04fe7d3 ScrollView and HorizontalScrollView stretch overscroll
Bug: 178807038

Modify ScrollView and HorizontalScrollView to support
stretch overscroll.

Test: I18820794f2511ff4b7df1c5c6a9d7a2d5fafeaa0
Change-Id: I1370b702ce7331269744033c6acb61b84519c853
2021-02-12 21:12:07 +00:00
Stevie Kideckel
bc1d288d62 Add RemoteViews.setBlendMode and expose target methods
Bug: 180086170
Test: sample app,atest
Change-Id: I2323d297412afb64d142bddb6608978ccc8d292f
2021-02-12 16:38:55 +00:00
Galia Peycheva
792b9eb8dc Add window background blur public api
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
2021-02-12 16:17:12 +01:00
Chavi Weingarten
d589f615a9 Merge "Check if SC is valid before calling setTransparentRegionHint" into sc-dev 2021-02-11 17:47:48 +00:00
Vishnu Nair
6979344d58 Merge changes I0ccbdb5a,I0f5d57e5 into sc-dev
* changes:
  Use surface size instead of frame size when adjusting layer bounds
  Fix SurfaceView background layer leaks
2021-02-11 16:35:34 +00:00
Rob Carr
aacd9886e5 Merge "ViewRootImpl: Use mergeWithNextTransaction for updating bounds layer" into sc-dev 2021-02-11 01:24:45 +00:00
chaviw
e036668137 Check if SC is valid before calling setTransparentRegionHint
Fixes: 179863777
Test: Steps from bug
Change-Id: I915a3f8cdef3e21d33e9458c35db7259ed88ca5d
2021-02-10 17:11:24 -08:00
Chavi Weingarten
06bdb473bf Merge "Remove SurfaceSession.nativeKill" into sc-dev 2021-02-10 23:45:38 +00:00
TreeHugger Robot
e0a1abd54b Merge "Remove InputMethodManager.ImeThreadFactory, which is unused" into sc-dev 2021-02-10 22:15:22 +00:00
Robert Carr
cec6bd9c74 ViewRootImpl: Use mergeWithNextTransaction for updating bounds layer
Continuing the general trend of deprecating deferTransactionUntil.

Bug: 168505645
Test: Existing tests pass
Change-Id: I72e1f4e2eec369ecdbd3723d9af3f9f2e8f71c36
2021-02-10 12:08:51 -08:00