Adding support for launcher preview generation

Creating a utility class which generates a launcher preview
for a provided InvariantDeviceProfile

Bug: 118758696
Change-Id: I0aebeb6eed37f72edd1cc305e58eece305aae3ff
diff --git a/src/com/android/launcher3/ItemInfo.java b/src/com/android/launcher3/ItemInfo.java
index bffdd72..a130604 100644
--- a/src/com/android/launcher3/ItemInfo.java
+++ b/src/com/android/launcher3/ItemInfo.java
@@ -204,4 +204,13 @@
     public boolean isDisabled() {
         return false;
     }
+
+    public int getViewId() {
+        // aapt-generated IDs have the high byte nonzero; clamp to the range under that.
+        // This cast is safe as long as the id < 0x00FFFFFF
+        // Since we jail all the dynamically generated views, there should be no clashes
+        // with any other views.
+        return id;
+    }
+
 }