Merge "Log when users manually refresh" into ub-gmail-ur14-dev
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java
index 317aba2..f9d6305 100644
--- a/src/com/android/mail/ui/AbstractActivityController.java
+++ b/src/com/android/mail/ui/AbstractActivityController.java
@@ -50,6 +50,7 @@
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarDrawerToggle;
+import android.text.TextUtils;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.Menu;
@@ -1984,6 +1985,17 @@
// is seeing the "your mail will appear shortly" message)
return;
}
+
+ // TODO: remove me after experiment b/17508768
+ final String id = android.provider.Settings.Secure.getString(
+ mActivity.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
+ if (!TextUtils.isEmpty(id)) {
+ final long longId = Long.parseLong(
+ Character.toString(id.charAt(id.length() - 1)), 16 /* hex */);
+ Analytics.getInstance().sendEvent("battery_experiment", "refresh",
+ longId % 2 == 0 ? "even" : "odd", 1);
+ }
+
convList.showSyncStatusBar();
if (mAsyncRefreshTask != null) {