Fix bug 6930875: ArrayIndexOutOfBoundsException on Battery details

The wrong constant was used to count the number of user activity types.
The number of types changed recently, so before then nothing bad
happened. Now we get an AIOOB.

This is the change to NUM_USER_ACTIVITY_TYPES:

Change-Id: I05045180129b30fa09fe5f5e1e3b0ac25fee23b4
https://googleplex-android-review.googlesource.com/#/c/211982/
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index 1bb27bd..fcc0ae4 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -1705,7 +1705,7 @@
             
             if (u.hasUserActivity()) {
                 boolean hasData = false;
-                for (int i=0; i<NUM_SCREEN_BRIGHTNESS_BINS; i++) {
+                for (int i=0; i<Uid.NUM_USER_ACTIVITY_TYPES; i++) {
                     int val = u.getUserActivityCount(i, which);
                     if (val != 0) {
                         if (!hasData) {