649bfd3dc347c5c33bf75144115405650a45356c |
|
29-Aug-2016 |
Colin Cross <ccross@android.com> |
resolve merge conflicts of 5827257 to master Change-Id: I0077b6991584fc33dcb1ca1aadb634ce930fef3a
|
92aa4b2ba3c93cc344c885b50b75726599e6065d |
|
24-Aug-2016 |
Dianne Hackborn <hackbod@google.com> |
Try to mitigate issue #31016187: system_server crash in ArraySet. Instead of crashing, log a wtf and recover. This is not a problem in ArraySet, but caused by someone else using an ArraySet without protecting access to it. So whoever is calling at this point is not the cause, and it isn't worthwhile to let them crash. Change-Id: Iaefa4315b620c9fe24b31507e4aa47a8525c8540
/frameworks/base/core/java/android/util/ArraySet.java
|
f2a45b269dec03998c0903d06e0fb57744328204 |
|
20-Aug-2016 |
Aurimas Liutikas <aurimas@google.com> |
Clean up style issues in ArraySet. Clean up style issues in preparation to copying ArraySet implementation to support library. Fixed: - Missing spaces around operators, casting - Added curly braces around if statements that span multiple lines - Renamed static variables to follow sFoo instead of mFoo - Moved = to the previous line Bug: 19109652 Change-Id: Id9a985723b158f51811b3cd796613d0e26fd7e61
/frameworks/base/core/java/android/util/ArraySet.java
|
7709041c99a213af4209fba08f6cb5acc3387307 |
|
01-Jul-2016 |
Felipe Leme <felipeal@google.com> |
Removed warning when objects are added on wrong order. append() is used to optimized insertions in the array, but it must preserve the order of the hashcode array; when it doesn't, it falls back to append(), but it should not log a warning message In particular, PendingIntentRecords might have different hashcodes across different processes. Fixes: 29912192 Change-Id: I0ab566249829ddb934fd51cf21399b68cb286bd5
/frameworks/base/core/java/android/util/ArraySet.java
|
ddb948896ca7059161e09d0063b3332352772c0a |
|
24-Jun-2016 |
Svet Ganov <svetoslavganov@google.com> |
Mark app pending intents in notification extras We need to make every peniding intent that went in the notification system to allow special handling of such intents when fired by a notification listener. If a pending intent from a notification is sent from a notification listener, we white-list the source app to run in data saver mode for a short period of time. The problem is that actions and the notificaion can have extras which bundles may contain pending intents but the system cannot look into the bundles as they may contain custom parcelable objects. To address this we keep a list of all pending intents in the notification allowing the system to access them without touching the bundle. Currently the pending intents are written to the parcel twice, once in the bundle and once as the explicit list. We can come up with a scheme to optimize this but since pending itents are just a binder pointer it is not worth the excecise. bug:29480440 Change-Id: I7328a47017ca226117adf7054900836619f5679b
/frameworks/base/core/java/android/util/ArraySet.java
|
3d1cb6a2b6882a9b702fc97aa50b2d5779956492 |
|
28-Feb-2016 |
Jeff Sharkey <jsharkey@android.com> |
Utility to detect lock inversions in system. This change adds a new LockGuard utility class that can be used to detect lock inversions across the system server. For example, if a thread is trying to acquire the ActivityManager lock while holding the PackageManager lock, it will yell. This class requires no prior knowledge of locks or their ordering; it derives all of this data at runtime. However, this means the overhead is substantial and it should not be enabled by default. Adds overrides to ArrayMap and ArraySet to use identityHashCode() instead of the hashCode() provided by the object. Bug: 27336728 Change-Id: I26c31bc99fe8d61ff13c3455aaeddd5517e44433
/frameworks/base/core/java/android/util/ArraySet.java
|
f16747db093f6d6371d617efc8d90698d2d5b389 |
|
11-Jun-2015 |
Dianne Hackborn <hackbod@google.com> |
Add ArraySet to the SDK. Also fix some documentation. Change-Id: I46025c3b5450e7cd671135b99ff3b298e223651d
/frameworks/base/core/java/android/util/ArraySet.java
|
9c0ba24f3b54fa7916626f3d76ec6818d78ca47e |
|
05-Mar-2015 |
Andreas Gampe <agampe@google.com> |
am 6695b992: Merge "Frameworks/base: Add removeAll for ArraySet" * commit '6695b9920d15f8d9a17d6b0c66b863d1c2e38584': Frameworks/base: Add removeAll for ArraySet
|
f9345e93db82adf8eaa2afc731933462d7876b13 |
|
05-Mar-2015 |
Andreas Gampe <agampe@google.com> |
Frameworks/base: Add removeAll for ArraySet Add a simple ArraySet.removeAll(ArraySet) method. This avoids two allocations, a MapCollections helper and an Iterator object, over the removeAll(Collection) code. KeySetManagerService heavily calls removeAll during boot (about 9K times in AOSP). This reduces GC stress and optimizes the removal (about half the time the removed collection has only one element). The removal method in KeySetManagerService is also done under a lock, so that it gates parallelization efforts in PackageManagerService. Bug: 19498314 Change-Id: Ib0e483adfd09831cd66ab19a820ebf6544a2b66f
/frameworks/base/core/java/android/util/ArraySet.java
|
9f837a99d48c5bb8ad7fbc133943e5bf622ce065 |
|
24-Oct-2014 |
Jeff Sharkey <jsharkey@android.com> |
Reduce PackageManager RAM usage: ArrayMap/Set. Transition PackageManager internals away from heavier HashMap/HashSet to use drop-in ArrayMap/ArraySet replacements. Saves ~38% RAM and thousands of objects on a typical device. Bug: 18115729 Change-Id: Ie107d2fee4b7baa4e3c3923231b4be877d1a5d2f
/frameworks/base/core/java/android/util/ArraySet.java
|
4e9c07c0de199169374bded403805c92f1c1c6c1 |
|
26-Aug-2014 |
Adam Lesinski <adamlesinski@google.com> |
Add indexOf method to ArrayMap & ArraySet Getting the indexOf is useful for doing compound operations like: int i = set.indexOf(key); if (i >= 0) { Object o = set.valueAt(i); o.blah(); set.removeAt(i); } Change-Id: I3d4b77d1461ba969fc6b4d332d52d4d084b5b53c
/frameworks/base/core/java/android/util/ArraySet.java
|
497175beffe26336c092ee11a67b90f79dcdaca7 |
|
01-Jul-2014 |
Dianne Hackborn <hackbod@google.com> |
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
/frameworks/base/core/java/android/util/ArraySet.java
|
776abc24cdd18610232a50b997cce3cffa74609b |
|
07-Mar-2014 |
Adam Lesinski <adamlesinski@google.com> |
Uses VMRuntime.newUnpaddedArray for ideal array sizes Bug:13028925 Change-Id: I0a9301248b10a339afbdc5e4ffe3310ac4fa1fb7
/frameworks/base/core/java/android/util/ArraySet.java
|
62d708f4dd8e2a8554df4967837df9896efeff7c |
|
26-Jul-2013 |
Dianne Hackborn <hackbod@google.com> |
Okay, I give in, add null key support to ArrayMap and ArraySet. Change-Id: Iac5035f9c5884a9f9d5acb38132bb128d7a55249
/frameworks/base/core/java/android/util/ArraySet.java
|
3e82ba1a67b0c756ab6a289985f4cfc53725b311 |
|
16-Jul-2013 |
Dianne Hackborn <hackbod@google.com> |
Make ArrayMap public! :) Also do some tweaking of the various container classes to synchronize them with the support lib and make it easier to copy code between the two. And update activity/fragment to use ArrayMap. Change-Id: I3cfe82392a17119dfc72c3d9961f64e1914f42be
/frameworks/base/core/java/android/util/ArraySet.java
|
b993f41eb2f165425dfdf0f93ea0b1e354eca837 |
|
13-Jul-2013 |
Dianne Hackborn <hackbod@google.com> |
Update SparseArray docs to be more informative. Change-Id: I5d8d17d46a69ccdcf6b29f93be3d44addd80ab61
/frameworks/base/core/java/android/util/ArraySet.java
|
a17c0f5e164729210210ad3f75aea72ed34ca330 |
|
21-Jun-2013 |
Dianne Hackborn <hackbod@google.com> |
More procstats work: separate global proc account, more dumping. We now keep track of the time actually process run independently of the time packages run in process, so we can give an accurate summary of how long each physical process runs. New command line options can be supplied to restrict printing to a specific package, dump in a new csv format, control what is printed in the csv format, and print a checkin report. Add toString methods to ArrayMap and ArraySet. Change-Id: I47b8f68472592ecc0088c5286d3564aa615f4e0a
/frameworks/base/core/java/android/util/ArraySet.java
|
21ab6f49910a6f319bc7b9d3964086cb1ffe09d0 |
|
11-Jun-2013 |
Dianne Hackborn <hackbod@google.com> |
ArrayMap is great, so how about ArraySet! Also a few little tweaks to the ArrayMap implementation. Note that these are fairly parallel implementations; I looked at what I could abstract out as a base class, but there isn't really all that much without making the resulting code more general and thus slower. If we kept the data structure for ArraySet the same as map, where the array has two values per entry, then they could probably share a lot of code. I couldn't really bring myself to do that at this point, though... Change-Id: I9e0dd8baa8e1febcc1033ecef61623ad59ce4aae
/frameworks/base/core/java/android/util/ArraySet.java
|