Battery stats: wake locks, radio active, cleanup.

- Improve wake lock work source updates to also update the current
  history tag, in case the new work source gets recorded in the
  history.

- Fix bug in recording radio active time that was not distributing
  any time to apps.

- No longer hold a wake lock while dispatching data conn active call,
  since it comes with its own timestamp.

- Fix issue where the top app was not being cleared while the screen
  was off.

- Remove obsolete STATS_LAST stats type.

- Fix bug that was not clearing the total run time when resetting
  the stats.

Change-Id: Iabe17a9edf34f762374ae09fcffb8a819cf72e30
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index 87beb95..426f21e 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -118,19 +118,14 @@
     public static final int STATS_SINCE_CHARGED = 0;
 
     /**
-     * Include only the last run in the stats.
-     */
-    public static final int STATS_LAST = 1;
-
-    /**
      * Include only the current run in the stats.
      */
-    public static final int STATS_CURRENT = 2;
+    public static final int STATS_CURRENT = 1;
 
     /**
      * Include only the run since the last time the device was unplugged in the stats.
      */
-    public static final int STATS_SINCE_UNPLUGGED = 3;
+    public static final int STATS_SINCE_UNPLUGGED = 2;
 
     // NOTE: Update this list if you add/change any stats above.
     // These characters are supposed to represent "total", "last", "current",