Log widget features to new features field.

Bug: 185778648, 187734511
Test: manual
Change-Id: Ifa5d88602e4fccce153b207b2d57d10d13f33dc9
diff --git a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
index b1c9ed0..6575996 100644
--- a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
+++ b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
@@ -130,7 +130,8 @@
                 info.getAttribute().getNumber() /* origin */,
                 getCardinality(info) /* cardinality */,
                 info.getWidget().getSpanX(),
-                info.getWidget().getSpanY());
+                info.getWidget().getSpanY(),
+                getFeatures(info));
     }
 
     /**
@@ -365,15 +366,12 @@
                     atomInfo.getFolderIcon().getFromLabelState().getNumber() /* fromState */,
                     atomInfo.getFolderIcon().getToLabelState().getNumber() /* toState */,
                     atomInfo.getFolderIcon().getLabelInfo() /* edittext */,
-                    getCardinality(atomInfo) /* cardinality */);
+                    getCardinality(atomInfo) /* cardinality */,
+                    getFeatures(atomInfo) /* features */);
         }
     }
 
     private static int getCardinality(LauncherAtom.ItemInfo info) {
-        // TODO(b/187734511): Implement a unified solution for 1x1 widgets in folders/hotseat.
-        if (info.getItemCase().equals(LauncherAtom.ItemInfo.ItemCase.WIDGET)) {
-            return info.getWidget().getWidgetFeatures();
-        }
         switch (info.getContainerInfo().getContainerCase()) {
             case PREDICTED_HOTSEAT_CONTAINER:
                 return info.getContainerInfo().getPredictedHotseatContainer().getCardinality();
@@ -514,6 +512,13 @@
         }
     }
 
+    private static int getFeatures(LauncherAtom.ItemInfo info) {
+        if (info.getItemCase().equals(LauncherAtom.ItemInfo.ItemCase.WIDGET)) {
+            return info.getWidget().getWidgetFeatures();
+        }
+        return 0;
+    }
+
 
     /**
      * Interface to get stats log while it is dispatched to the system