Loading core/proto/android/app/settings_enums.proto +6 −0 Original line number Diff line number Diff line Loading @@ -693,6 +693,12 @@ enum Action { // CATEGORY: SETTINGS // OS: R ACTION_CONTROLLER_UPDATE_STATE = 1728; // Custom tag to evaluate the consuming time from onAttach to // DashboardFragment.updatePreferenceStates. // CATEGORY: SETTINGS // OS: R ACTION_DASHBOARD_VISIBLE_TIME = 1729; } /** Loading packages/SettingsLib/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixin.java +13 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,19 @@ public class VisibilityLoggerMixin implements LifecycleObserver, OnAttach { } } /** * Logs the elapsed time from onAttach to calling {@link #writeElapsedTimeMetric(int, String)}. * @param action : The value of the Action Enums. * @param key : The value of special key string. */ public void writeElapsedTimeMetric(int action, String key) { if (mMetricsFeature == null || mMetricsCategory == METRICS_CATEGORY_UNKNOWN) { return; } final int elapse = (int) (SystemClock.elapsedRealtime() - mTimestamp); mMetricsFeature.action(METRICS_CATEGORY_UNKNOWN, action, mMetricsCategory, key, elapse); } /** * Sets source metrics category for this logger. Source is the caller that opened this UI. */ Loading Loading
core/proto/android/app/settings_enums.proto +6 −0 Original line number Diff line number Diff line Loading @@ -693,6 +693,12 @@ enum Action { // CATEGORY: SETTINGS // OS: R ACTION_CONTROLLER_UPDATE_STATE = 1728; // Custom tag to evaluate the consuming time from onAttach to // DashboardFragment.updatePreferenceStates. // CATEGORY: SETTINGS // OS: R ACTION_DASHBOARD_VISIBLE_TIME = 1729; } /** Loading
packages/SettingsLib/src/com/android/settingslib/core/instrumentation/VisibilityLoggerMixin.java +13 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,19 @@ public class VisibilityLoggerMixin implements LifecycleObserver, OnAttach { } } /** * Logs the elapsed time from onAttach to calling {@link #writeElapsedTimeMetric(int, String)}. * @param action : The value of the Action Enums. * @param key : The value of special key string. */ public void writeElapsedTimeMetric(int action, String key) { if (mMetricsFeature == null || mMetricsCategory == METRICS_CATEGORY_UNKNOWN) { return; } final int elapse = (int) (SystemClock.elapsedRealtime() - mTimestamp); mMetricsFeature.action(METRICS_CATEGORY_UNKNOWN, action, mMetricsCategory, key, elapse); } /** * Sets source metrics category for this logger. Source is the caller that opened this UI. */ Loading