Fixed elapsed_time_millis in SettingsUIChanged event
This change stores timestamp when received com.google.android.setupwizard.SETUP_WIZARD_FINISHED. This timestamp will be used to calculate elapsed_time_millis for SettingsUIChanged event after SUW complete. This enables to analyze how the user uses Settings in a specific time span after setup. Bug: 344466251 Test: metrics related change only Flag: EXEMPT metrics change only Change-Id: I85b15f1eb5e5a4502a27d8588bb01e59b7ad83b5
This commit is contained in:
@@ -39,6 +39,7 @@ import android.util.Log;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.settings.activityembedding.ActivityEmbeddingUtils;
|
||||
import com.android.settings.core.instrumentation.ElapsedTimeUtils;
|
||||
import com.android.settings.homepage.DeepLinkHomepageActivity;
|
||||
import com.android.settings.search.SearchStateReceiver;
|
||||
import com.android.settingslib.utils.ThreadUtils;
|
||||
@@ -69,6 +70,7 @@ public class SettingsInitialize extends BroadcastReceiver {
|
||||
webviewSettingSetup(context, pm, userInfo);
|
||||
ThreadUtils.postOnBackgroundThread(() -> refreshExistingShortcuts(context));
|
||||
enableTwoPaneDeepLinkActivityIfNecessary(pm, context);
|
||||
storeSuwCompleteTimestamp(context, broadcast);
|
||||
}
|
||||
|
||||
private void managedProfileSetup(Context context, final PackageManager pm, Intent broadcast,
|
||||
@@ -161,4 +163,10 @@ public class SettingsInitialize extends BroadcastReceiver {
|
||||
pm.setComponentEnabledSetting(searchStateReceiver, enableState,
|
||||
PackageManager.DONT_KILL_APP);
|
||||
}
|
||||
|
||||
private void storeSuwCompleteTimestamp(Context context, Intent broadcast) {
|
||||
if (SetupWizardUtils.ACTION_SETUP_WIZARD_FINISHED.equals(broadcast.getAction())) {
|
||||
ElapsedTimeUtils.storeSuwFinishedTimestamp(context, System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user