Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7a5017f authored by Michael Wright's avatar Michael Wright
Browse files

Skip Misc/Overcounted battery stats in release builds.

Bug: 18090734
Change-Id: I24d8eea9fcb0d0b9e50d512325ed91ce70eb16ac
parent 8d7fdc61
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.drawable.Drawable;
import android.os.BatteryStats;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
@@ -287,6 +288,9 @@ public class PowerUsageSummary extends PreferenceFragment {
                    if (percentOfTotal < 10) {
                        continue;
                    }
                    if ("user".equals(Build.TYPE)) {
                        continue;
                    }
                }
                if (sipper.drainType == BatterySipper.DrainType.UNACCOUNTED) {
                    // Don't show over-counted unless it is at least 1/2 the size of
@@ -297,6 +301,9 @@ public class PowerUsageSummary extends PreferenceFragment {
                    if (percentOfTotal < 5) {
                        continue;
                    }
                    if ("user".equals(Build.TYPE)) {
                        continue;
                    }
                }
                final UserHandle userHandle = new UserHandle(UserHandle.getUserId(sipper.getUid()));
                final BatteryEntry entry = new BatteryEntry(getActivity(), mHandler, mUm, sipper);