Ran
|
Jobs
3
|
Files
375
|
Run time
36s
|
Badge
Embed ▾
README BADGES
|
push
github
Use curtains to get phone window from decor view Summary: The official api only let you access this window by going through a views activity, but if a doesn't belong to an activity there is no possible way without reflection tricks. Curtains is a nice library that does this reflection adn a lot of the other reflection hacks that the UIdebugger needs. ## The reason this is important When snapshotting a dialog fragment we were using pixel copy using tryCopyViaInternalSurface approach. The issue is this is the lowest level api and doesnt consider 'surface insets' Surface insets seems to be related to the fact that a surface may be bigger than the content it draws. This ended up manifesting like this {F1372530065} the issue is we create a bitmap sized to the decor view, but we were snapshotting the whole surface which is actually a bit bigger due to the black bars / surface insets. When you pass a android.view.Window to pixel copy it has code to account for the surface insets. https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/graphics/java/android/view/PixelCopy.java;l=291;drc=228276a74 Before we couldn't pass a window for dialogs since there was no activity to provide it, now curtains gives us this window and we can use the high level api in pxiel copy that does the right thing w.r.t surface insets Reviewed By: passy Differential Revision: D53090570 fbshipit-source-id: 969695198
4080 of 9124 branches covered (0.0%)
Branch coverage included in aggregate %.
8248 of 14802 relevant lines covered (55.72%)
277.42 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 7754958907.1 | 375 |
51.51 |
GitHub Action Run | |
2 | 7754958907.2 | 375 |
51.51 |
GitHub Action Run | |
3 | 7754958907.3 | 375 |
51.48 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|