Modify logging to log the specifc grid size when taking a snapshot
We do a snapshot once a day, so this would get us an accurate number for how many users have each grid type on any given day Bug: 401051097 Test: EXEMPT logging Flag: EXEMPT add logging Change-Id: I74a14e6df51cb8c3872021520f527d6eca44cfe3
This commit is contained in:
@@ -433,20 +433,29 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
@UiEvent(doc = "Notification dismissed by swiping right.")
|
||||
LAUNCHER_NOTIFICATION_DISMISSED(652),
|
||||
|
||||
@UiEvent(doc = "Current grid size is changed to 6.")
|
||||
LAUNCHER_GRID_SIZE_6(930),
|
||||
@UiEvent(doc = "Current grid size is changed to 2x2")
|
||||
LAUNCHER_GRID_SIZE_2_BY_2(2181),
|
||||
|
||||
@UiEvent(doc = "Current grid size is changed to 5.")
|
||||
LAUNCHER_GRID_SIZE_5(662),
|
||||
@UiEvent(doc = "Current grid size is changed to 3x3")
|
||||
LAUNCHER_GRID_SIZE_3_BY_3(2182),
|
||||
|
||||
@UiEvent(doc = "Current grid size is changed to 4.")
|
||||
LAUNCHER_GRID_SIZE_4(663),
|
||||
@UiEvent(doc = "Current grid size is changed to 4x4")
|
||||
LAUNCHER_GRID_SIZE_4_BY_4(2183),
|
||||
|
||||
@UiEvent(doc = "Current grid size is changed to 3.")
|
||||
LAUNCHER_GRID_SIZE_3(664),
|
||||
@UiEvent(doc = "Current grid size is changed to 4x5")
|
||||
LAUNCHER_GRID_SIZE_4_BY_5(2184),
|
||||
|
||||
@UiEvent(doc = "Current grid size is changed to 2.")
|
||||
LAUNCHER_GRID_SIZE_2(665),
|
||||
@UiEvent(doc = "Current grid size is changed to 4x6")
|
||||
LAUNCHER_GRID_SIZE_4_BY_6(2185),
|
||||
|
||||
@UiEvent(doc = "Current grid size is changed to 5x5")
|
||||
LAUNCHER_GRID_SIZE_5_BY_5(2186),
|
||||
|
||||
@UiEvent(doc = "Current grid size is changed to 5x6")
|
||||
LAUNCHER_GRID_SIZE_5_BY_6(2187),
|
||||
|
||||
@UiEvent(doc = "Current grid size is changed to 6x5")
|
||||
LAUNCHER_GRID_SIZE_6_BY_5(2188),
|
||||
|
||||
@UiEvent(doc = "Launcher entered into AllApps state.")
|
||||
LAUNCHER_ALLAPPS_ENTRY(692),
|
||||
|
||||
@@ -21,11 +21,6 @@ import static com.android.launcher3.LauncherPrefs.DB_FILE;
|
||||
import static com.android.launcher3.LauncherPrefs.DEVICE_TYPE;
|
||||
import static com.android.launcher3.LauncherPrefs.HOTSEAT_COUNT;
|
||||
import static com.android.launcher3.LauncherPrefs.WORKSPACE_SIZE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_GRID_SIZE_2;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_GRID_SIZE_3;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_GRID_SIZE_4;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_GRID_SIZE_5;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_GRID_SIZE_6;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
@@ -114,17 +109,23 @@ public class DeviceGridState implements Comparable<DeviceGridState> {
|
||||
*/
|
||||
public LauncherEvent getWorkspaceSizeEvent() {
|
||||
if (!TextUtils.isEmpty(mGridSizeString)) {
|
||||
switch (getColumns()) {
|
||||
case 6:
|
||||
return LAUNCHER_GRID_SIZE_6;
|
||||
case 5:
|
||||
return LAUNCHER_GRID_SIZE_5;
|
||||
case 4:
|
||||
return LAUNCHER_GRID_SIZE_4;
|
||||
case 3:
|
||||
return LAUNCHER_GRID_SIZE_3;
|
||||
case 2:
|
||||
return LAUNCHER_GRID_SIZE_2;
|
||||
switch (mGridSizeString) {
|
||||
case "2,2":
|
||||
return LauncherEvent.LAUNCHER_GRID_SIZE_2_BY_2;
|
||||
case "3,3":
|
||||
return LauncherEvent.LAUNCHER_GRID_SIZE_3_BY_3;
|
||||
case "4,4":
|
||||
return LauncherEvent.LAUNCHER_GRID_SIZE_4_BY_4;
|
||||
case "4,5":
|
||||
return LauncherEvent.LAUNCHER_GRID_SIZE_4_BY_5;
|
||||
case "4,6":
|
||||
return LauncherEvent.LAUNCHER_GRID_SIZE_4_BY_6;
|
||||
case "5,5":
|
||||
return LauncherEvent.LAUNCHER_GRID_SIZE_5_BY_5;
|
||||
case "5,6":
|
||||
return LauncherEvent.LAUNCHER_GRID_SIZE_5_BY_6;
|
||||
case "6,5":
|
||||
return LauncherEvent.LAUNCHER_GRID_SIZE_6_BY_5;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user