Merge "Metrics for user choices in storage wizard." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1786dcd4f8
@@ -23,7 +23,9 @@ import android.os.storage.VolumeInfo;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
|
||||
public class StorageWizardFormatSlow extends StorageWizardBase {
|
||||
private boolean mFormatPrivate;
|
||||
@@ -55,6 +57,9 @@ public class StorageWizardFormatSlow extends StorageWizardBase {
|
||||
|
||||
@Override
|
||||
public void onNavigateBack(View view) {
|
||||
FeatureFactory.getFactory(this).getMetricsFeatureProvider().action(this,
|
||||
MetricsEvent.ACTION_STORAGE_BENCHMARK_SLOW_ABORT);
|
||||
|
||||
final Intent intent = new Intent(this, StorageWizardInit.class);
|
||||
startActivity(intent);
|
||||
finishAffinity();
|
||||
@@ -62,6 +67,16 @@ public class StorageWizardFormatSlow extends StorageWizardBase {
|
||||
|
||||
@Override
|
||||
public void onNavigateNext(View view) {
|
||||
if (view != null) {
|
||||
// User made an explicit choice to continue when slow
|
||||
FeatureFactory.getFactory(this).getMetricsFeatureProvider().action(this,
|
||||
MetricsEvent.ACTION_STORAGE_BENCHMARK_SLOW_CONTINUE);
|
||||
} else {
|
||||
// User made an implicit choice to continue when fast
|
||||
FeatureFactory.getFactory(this).getMetricsFeatureProvider().action(this,
|
||||
MetricsEvent.ACTION_STORAGE_BENCHMARK_FAST_CONTINUE);
|
||||
}
|
||||
|
||||
final String forgetUuid = getIntent().getStringExtra(EXTRA_FORMAT_FORGET_UUID);
|
||||
if (!TextUtils.isEmpty(forgetUuid)) {
|
||||
mStorage.forgetVolume(forgetUuid);
|
||||
|
@@ -25,7 +25,9 @@ import android.os.storage.VolumeInfo;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
|
||||
public class StorageWizardInit extends StorageWizardBase {
|
||||
private Button mExternal;
|
||||
@@ -68,6 +70,12 @@ public class StorageWizardInit extends StorageWizardBase {
|
||||
}
|
||||
|
||||
public void onNavigateExternal(View view) {
|
||||
if (view != null) {
|
||||
// User made an explicit choice for external
|
||||
FeatureFactory.getFactory(this).getMetricsFeatureProvider().action(this,
|
||||
MetricsEvent.ACTION_STORAGE_INIT_EXTERNAL);
|
||||
}
|
||||
|
||||
if (mVolume != null && mVolume.getType() == VolumeInfo.TYPE_PUBLIC
|
||||
&& mVolume.getState() != VolumeInfo.STATE_UNMOUNTABLE) {
|
||||
// Remember that user made decision
|
||||
@@ -85,6 +93,12 @@ public class StorageWizardInit extends StorageWizardBase {
|
||||
}
|
||||
|
||||
public void onNavigateInternal(View view) {
|
||||
if (view != null) {
|
||||
// User made an explicit choice for internal
|
||||
FeatureFactory.getFactory(this).getMetricsFeatureProvider().action(this,
|
||||
MetricsEvent.ACTION_STORAGE_INIT_INTERNAL);
|
||||
}
|
||||
|
||||
StorageWizardFormatConfirm.showPrivate(this, mDisk.getId());
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user