mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Fix color offset on devices with notches.
This commit is contained in:
committed by
Cody Henthorne
parent
a385cb0b68
commit
52cfb57d36
@@ -142,16 +142,6 @@ public final class Projection {
|
||||
return new Projection(viewBounds.left, viewBounds.top, toProject.getWidth(), toProject.getHeight(), corners);
|
||||
}
|
||||
|
||||
public static @NonNull Projection translateFromRootToDescendantCoords(@NonNull Projection rootProjection, @NonNull View descendant) {
|
||||
Rect viewBounds = new Rect();
|
||||
|
||||
viewBounds.set((int) rootProjection.x, (int) rootProjection.y, (int) rootProjection.x + rootProjection.width, (int) rootProjection.y + rootProjection.height);
|
||||
|
||||
((ViewGroup) descendant.getRootView()).offsetRectIntoDescendantCoords(descendant, viewBounds);
|
||||
|
||||
return new Projection(viewBounds.left, viewBounds.top, rootProjection.width, rootProjection.height, rootProjection.corners);
|
||||
}
|
||||
|
||||
public static @NonNull Projection translateFromDescendantToParentCoords(@NonNull Projection descendantProjection, @NonNull View descendant, @NonNull ViewGroup parent) {
|
||||
Rect viewBounds = new Rect();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user