Get elevation in time-lapse View Hierarchy capture.
Bug: 234032088
Test: Verified that elevation attributes from device are captured and
show up correctly on go/web-hv UI.
Change-Id: Id4c5a5c5a003cc38d332edc99365b160f17c52a6
diff --git a/protos/view_capture.proto b/protos/view_capture.proto
index 98574dd..349ff36 100644
--- a/protos/view_capture.proto
+++ b/protos/view_capture.proto
@@ -51,4 +51,6 @@
optional int32 visibility = 16;
repeated ViewNode children = 17;
+
+ optional float elevation = 18;
}
diff --git a/src/com/android/launcher3/util/ViewCapture.java b/src/com/android/launcher3/util/ViewCapture.java
index cf4e84a..58c8269 100644
--- a/src/com/android/launcher3/util/ViewCapture.java
+++ b/src/com/android/launcher3/util/ViewCapture.java
@@ -240,6 +240,7 @@
public float translateX, translateY;
public float scaleX, scaleY;
public float alpha;
+ public float elevation;
public int visibility;
public boolean willNotDraw;
@@ -271,6 +272,7 @@
visibility = view.getVisibility();
willNotDraw = view.willNotDraw();
+ elevation = view.getElevation();
}
/**
@@ -303,6 +305,7 @@
.setAlpha(alpha)
.setVisibility(visibility)
.setWillNotDraw(willNotDraw)
+ .setElevation(elevation)
.setClipChildren(clipChildren);
ViewPropertyRef result = next;