SetupWizard: Add metrics for internal builds that ship with CMStats
Change-Id: Id932a105c18332e32605530d1502ff99b7cf380a
This commit is contained in:
@@ -26,6 +26,7 @@ import android.transition.Transition;
|
||||
import android.view.Gravity;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
|
||||
|
||||
public abstract class SetupPage implements Page {
|
||||
@@ -75,12 +76,18 @@ public abstract class SetupPage implements Page {
|
||||
public void doLoadAction(FragmentManager fragmentManager, int action) {
|
||||
Fragment fragment = getFragment(fragmentManager, action);
|
||||
if (action == Page.ACTION_NEXT) {
|
||||
SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
SetupStats.Action.NEXT_BUTTON, getKey(),
|
||||
String.valueOf(System.currentTimeMillis()));
|
||||
Transition t = new Slide(Gravity.RIGHT);
|
||||
fragment.setEnterTransition(t);
|
||||
fragmentManager.beginTransaction()
|
||||
.replace(R.id.content,fragment, getKey())
|
||||
.commit();
|
||||
} else {
|
||||
SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
SetupStats.Action.PREVIOUS_BUTTON, getKey(),
|
||||
String.valueOf(System.currentTimeMillis()));
|
||||
Transition t = new Slide(Gravity.LEFT);
|
||||
fragment.setEnterTransition(t);
|
||||
fragmentManager.beginTransaction()
|
||||
|
Reference in New Issue
Block a user