summaryrefslogtreecommitdiffstats
path: root/core/java/android/util/ArraySet.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-07-01 12:56:08 -0700
committerDianne Hackborn <hackbod@google.com>2014-07-01 18:34:58 -0700
commit497175beffe26336c092ee11a67b90f79dcdaca7 (patch)
tree8726cb695546c168725f9c0cb8fccf06a90caa30 /core/java/android/util/ArraySet.java
parent2141cb53978a60aedbadeaf0ded449ecb9bd09ec (diff)
downloadframeworks_base-497175beffe26336c092ee11a67b90f79dcdaca7.zip
frameworks_base-497175beffe26336c092ee11a67b90f79dcdaca7.tar.gz
frameworks_base-497175beffe26336c092ee11a67b90f79dcdaca7.tar.bz2
Rework network stats to use proc state for fg/bg.
Switch to using the process state to determine whether a process should be foreground or background, instead of the boolean foreground given by the activity manager. This is for battery save mode, where we can now allow more apps to havenetwork access: everything whose process state is at least IMPORTANT_FOREGROUND, which allows music playback and other use-visible things to continue to have network access. Note this also impact the traditional background data disabled state, where now we allow anything top or better to have network access. This automatically includes all persistent processes, the current top activity, and any other processes hosting the top activity or being used by the top activity. So it broadens the set of apps that get network access, but I think this increases it to a reasonable set of things that may actually be needed for the foreground app to work correctly. Change-Id: Icb609a2cea280dc3fa3e83417f478ed77f3685aa
Diffstat (limited to 'core/java/android/util/ArraySet.java')
-rw-r--r--core/java/android/util/ArraySet.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/util/ArraySet.java b/core/java/android/util/ArraySet.java
index 9d4b720..8f7aefd 100644
--- a/core/java/android/util/ArraySet.java
+++ b/core/java/android/util/ArraySet.java
@@ -372,7 +372,7 @@ public final class ArraySet<E> implements Collection<E>, Set<E> {
* Perform a {@link #add(Object)} of all values in <var>array</var>
* @param array The array whose contents are to be retrieved.
*/
- public void putAll(ArraySet<? extends E> array) {
+ public void addAll(ArraySet<? extends E> array) {
final int N = array.mSize;
ensureCapacity(mSize + N);
if (mSize == 0) {