summaryrefslogtreecommitdiff
path: root/core/java/android/util/SparseBooleanArray.java
Commit message (Collapse)AuthorAgeFilesLines
* Add @Nullable annotation to the parameter of Object.equals() methods.Roman Kalukiewicz2020-10-151-1/+2
| | | | | | | | | | | | | | | | | | Those annotations could be inferred by some tools (like Kotlin), but the https://checkerframework.org/ doesn't check inherited annotations complaining about all equals() invocations that get nullable argument. The change was generated by running find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /' in the frameworks/base directory and by automatically adding and formatting required imports if needed. No manual edits. Bug: 170883422 Test: Annotation change only. Should have not impact. Exempt-From-Owner-Approval: Mechanical change not specific to any component. Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-071-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
* Add extra comment for implementation.Kweku Adams2019-04-291-0/+3
| | | | | | | | | Add a comment noting that the check to throw the exception is intentionally second so that it's out of the critical path. Bug: 118339123 Test: N/A Change-Id: I36c5ea67579bcd7906f711530392110d9987ffb4
* Gating OutOfBoundsException on targetSdkVersion.Kweku Adams2019-04-261-3/+18
| | | | | | | | | Apps targeting Pie or older will get the old undefined behavior. Apps targeting Q or newer will get the OutOfBoundsException. Bug: 118339123 Test: atest CtsUtilTestCases Change-Id: Ibf5467aadec4a2f76ee180e963afeaf5a8a013a2
* Revert "Revert "Checkng upper bound in *Array classes.""Kweku Adams2019-03-301-1/+18
| | | | | | | | This reverts commit 91ec97056451753d6db55d310fc93fbd93c61cb3. Reason for revert: b/128433495 Change-Id: I4aac43f6aacd594f9c2bf58db9fbc4a1395d8888
* Revert "Checkng upper bound in *Array classes."Paul Scovanner2019-03-121-18/+1
| | | | | | | | This reverts commit 17d453ea85703a5bc26c0669231be4d6f0d8bbac. Reason for revert: b/127750694 Change-Id: I0ffbf0e64109b3ec724e0687a27b231e335f76b4
* Checkng upper bound in *Array classes.Kweku Adams2019-03-051-1/+18
| | | | | | | | | | *Array classes will now throw an IndexOutOfBoundsException if a caller tries to get or set a value for an index that's invalid based on the current size. Bug: 118339123 Test: atest CtsUtilTestCases Change-Id: Iddc9a0c7c89e0ac743b0380049527a1b2dfb434f
* Expose a few APIs in util collections.Jake Wharton2018-09-291-4/+6
| | | | | | | | | | These are either already exposed on other specialized collection variants or are exposed as public API on the androidx versions, or both. With these APIs exposed, all of the unsupported app usage can be done through public API. As a result, all unsupported app usage is now locked to apps targeting API 28 or earlier. Bug: 116877302 Test: none, no implementation change Change-Id: I548d71319bffb0a6b529e380ea936df674dbf515
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-141-0/+4
| | | | | | | | | | | | | | | | | | | For packages: android.util.proto android.util.jar android.util.apk android.util This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ia0f48c244b0fbe33d40d797702a82303648196ed
* Expose removeAt(int) for parity with other sparse collections.Jake Wharton2017-12-211-1/+5
| | | | | | Bug: 70934959 Test: none Change-Id: Ic26a9fba610d6361247e0485803b52569fbf4a38
* Push equals impl into SparseBooleanArray.Steve McKay2015-07-221-0/+35
| | | | | | Also, implement hashcode, because it is naughty to not. Change-Id: I2042dac6840cf07027871783a7b6763578fa805d
* Update DirectoryFragment to use RecyclerView.Steve McKay2015-07-211-0/+5
| | | | | | | | | | | | | | Add MultiSelectMaanger class to manager selection on a RecyclerView instance. There are several outstanding issues that still need to be addressed surrounding Grid mode as the GridLayout manager doesn't support automatic column count calculation. Also, we're missing the puddle effect on touch... And probably other stuff. But it all *mostly* works. Oh, also. Footers are currently commented out. Add traditional unit tests for MultiSelectManager. BUG: 22225617 Change-Id: I3cd26a10683f42053556d463a5d2f0d2a0bbde84
* Uses VMRuntime.newUnpaddedArray for ideal array sizesAdam Lesinski2014-03-271-45/+12
| | | | | | Bug:13028925 Change-Id: I0a9301248b10a339afbdc5e4ffe3310ac4fa1fb7
* Battery stats: more events, fixes.Dianne Hackborn2014-02-071-0/+12
| | | | | | | | | | | | | | | | | | | Add new history events for top application package and foreground application packages. Doing this involved a fair amount of improvement to history events. The event code is now separated out to have "start" and "finish" identifies, and we use that to now keep track of which events are active. With that, when resetting the stats, we can spit out all of the currently active events at the front of the new history. Also fixed some problems when I re-arranged the history delta int bits that were conflicting with the packing of the battery status bits. These packing structures are changed to work together correctly. Change-Id: Ic8b815060dd8a50ff4a0a209efc2e1044215cd88
* Fix javadoc typo in SparseArray.Newton Allen2013-11-211-1/+1
| | | | Change-Id: Ie69b2cf96dae95b6ebe7b7797d3755749aec9f35
* Document the order of values returned by keyAt().Flavio Lerda2013-09-081-3/+20
| | | | | | | | | | | The values returned by keyAt() are currently guaranteed to be in ascending order. This is helpful to users of the API to be able to make assumptions about the keys and values when iterating over one of the sparse array implementations. This commit adds documentation about this. Change-Id: I3d7eb78e115ce174f1167b83904b44bf5120b223
* Make ArrayMap public! :)Dianne Hackborn2013-07-161-9/+34
| | | | | | | | | | 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
* Update SparseArray docs to be more informative.Dianne Hackborn2013-07-121-2/+12
| | | | Change-Id: I5d8d17d46a69ccdcf6b29f93be3d44addd80ab61
* New ArrayMap class.Dianne Hackborn2013-05-241-29/+17
| | | | | | | | | | | | | | | | | | | | | | | | | This is a new kind of key/value mapping that stores its data as an array, so it doesn't need to create an extra Entry object for every mapping placed in to it. It is also optimized to reduce memory overhead in other ways, by keeping the base object small, being fairly aggressive about keeping the array data structures small, etc. There are some unit and performance tests dropped in to some random places; they will need to be put somewhere else once I decided what we are going to do with this for the next release (for example if we make it public the unit tests should go in to CTS). Switch IntentResolver to using ArrayMap instead of HashMap. Also get rid of a bunch of duplicate implementations of binarySearch, and add an optimization to the various sparse arrays where you can supply an explicit 0 capacity to prevent it from doing an initial array allocation; use this new optimization in a few places where it makes sense. Change-Id: I01ef2764680f8ae49938e2a2ed40dc01606a056b
* Touch exploration separate setting and API to poll the latter state.Svetoslav Ganov2011-07-181-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | 1. Seperated touch exploration to be a seperate setting rather being magically enabled by the system of accessiiblity is on the there is at leas one accessibility service that speaks enabled. Now there is a setting for requesting touch exploration but still the system will enabled it only if that makes sense i.e. accessibility is on and one accessibility service that speaks is enabled. 2. Added public API for checking of touch exploration is enabled. 3. Added description attribute in accessibility service declaration which will be shown to the user before enabling the service. 4. Added API for quick cloning of AccessibilityNodeInfo. 5. Added clone functionality to SparseArray, SparseIntArray, and SparseBooleanArray. bug:5034010 bug:5033928 Change-Id: Ia442edbe55c20309244061cd9d24e0545c01b54f
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+245
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-245/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+245