Metrics for user choices in storage wizard.

These metrics help us understand more about how users in the field
are interacting with adoptable storage.

Bug: 37284068
Test: atest com.android.settings.ui.StorageWizardTest
Change-Id: I2bb9b5b3683c6ed080233aa595c2626685384923
This commit is contained in:
Jeff Sharkey
2018-05-02 16:12:05 -06:00
parent 4c89530ff2
commit f6e47386b1
3 changed files with 37 additions and 0 deletions

View File

@@ -31,7 +31,9 @@ import android.util.Log;
import android.view.View;
import android.widget.Toast;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.password.ChooseLockSettingsHelper;
import java.util.Objects;
@@ -80,6 +82,9 @@ public class StorageWizardMigrateConfirm extends StorageWizardBase {
@Override
public void onNavigateBack(View view) {
FeatureFactory.getFactory(this).getMetricsFeatureProvider().action(this,
MetricsEvent.ACTION_STORAGE_MIGRATE_LATER);
final Intent intent = new Intent(this, StorageWizardReady.class);
intent.putExtra(EXTRA_MIGRATE_SKIP, true);
startActivity(intent);
@@ -127,6 +132,9 @@ public class StorageWizardMigrateConfirm extends StorageWizardBase {
return;
}
FeatureFactory.getFactory(this).getMetricsFeatureProvider().action(this,
MetricsEvent.ACTION_STORAGE_MIGRATE_NOW);
final Intent intent = new Intent(this, StorageWizardMigrateProgress.class);
intent.putExtra(VolumeInfo.EXTRA_VOLUME_ID, mVolume.getId());
intent.putExtra(PackageManager.EXTRA_MOVE_ID, moveId);