summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Fix StaleDataException in isPartitionEmptyJay Shrauner2015-04-021-1/+1
| | | | | | | Check whether the cursor is closed before querying getCount() Bug:20052582 Change-Id: I4f205cba25428a95d8416d7f7bcedbda40d622c4
* am 7158b670: Fix StaleDataExceptionsJay Shrauner2015-01-051-2/+9
|\ | | | | | | | | * commit '7158b6705d330ac1e61d5aa51c51b54507c4ab88': Fix StaleDataExceptions
| * Fix StaleDataExceptionsJay Shrauner2014-12-191-2/+9
| | | | | | | | | | | | | | | | | | In ensureCacheValid, check whether the cursor is closed before querying its count. In getItem, check whether the cursor is closed before moving it to position, as was already being done in getItemId. Bug:18815354 Change-Id: I4cf2509923695afe9499d0507383c4e0d51bd23e
* | Remove apache dependency from android-common.Narayan Kamath2014-12-153-3/+227
|/ | | | | | | | | | | | | | | | | | | This static library was relying on HttpDateTime via AndroidHttpClient. (and is the only user of this API in our tree). Regrettably, the most reasonable way forward seems to be copy that class into frameworks/ex. Using reflection is possible too, but it's riskier since we have to ensure this class exists unmodified all the way back to froyo. See API council request b/2553589 for why this was in AndroidHttpClient in the first place. Also, this change sets LOCAL_SDK_VERSION := 8 for tests to match the library version. bug: 18027885 Change-Id: I9c473f60f0314758120e0d6c6f9b56e4d77ba658
* Add public method to check if the partition is empty.Nancy Chen2014-08-151-1/+5
| | | | | | | | | Currently the size of the partition is hidden from public. The isEmpty method will allow outside classes to check if the partition does not have any entries in it. Bug: 15596340 Change-Id: I0a0f8f7c7a350b802e58e9138801c13b6e74a059
* fix race condition in OperationSchedulerDoug Zongker2014-06-231-4/+12
| | | | | | | | | | | | | OperationScheduler's toString() method got the set of keys from a SharedPreferences, and then did individual lookups of those keys assuming they would all succeed, but the shared prefs object can be mutated by a another thread while that is going on. Fix to take a snapshot with getAll() and then iterate over the snapshot. Bug: 15744821 Change-Id: I6a901ec7f4e632e149db3bf6c226f935bc152402
* Remove unnecessary versions from android-common's build.gradle.Jeff Davidson2014-06-181-3/+0
| | | | | | | frameworks/ex/common does not stand alone as a gradle project and should always be inheriting these values from the parent build. Change-Id: I9ec38573504d84ac6a08d076e45dc60d842463d0
* am 4edf1e54: am a03388cf: am e53ad9ba: Merge "Let Rfc822Validator validate ↵Régis Décamps2014-06-112-20/+94
|\ | | | | | | | | | | | | IEA in Punycode or Unicode." into klp-ub-dev * commit '4edf1e548cec17a3856f1ac659c08b865ecd7817': Let Rfc822Validator validate IEA in Punycode or Unicode.
| * Let Rfc822Validator validate IEA in Punycode or Unicode.Régis Décamps2014-06-062-20/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let Rfc822Validator validator internation email adresses. The implementation is based on a regular expression. Fixes: - b/13364030 ComposeActivity rejects TLD that are Punycode - ComposeActivity rejects TLD that are Unicode Improve unit tests: - Use RFC example domains, instead of potentially existing domains. - Add unicode punycode internationalized email address. - Add validity check for email with special characters. - Add validity check "a..b@example.com" (RFC says dot cannot be succesive but it is allowed by major providers) - Add invalidity check for "a@b-.com" (domain name cannot end with a dash) ; "john@doe@example.com" (@ must be unique) - Remove a@b.12 from invalid emails. There is no tld made of numbers, but no spec strictly prohibits it. Bug: 13364030 Change-Id: I78bc5d696f587753d776020ef1f9feded2065ad0
* | Update sdk and build tools versionsJeff Hamilton2014-05-161-1/+1
| | | | | | | | Change-Id: I713e6b2bf9643ecf446f6e5d2a1f314b8923f5e6
* | Make logtags an official buildSrc pluginJustin Morey2014-04-241-24/+6
| | | | | | | | Change-Id: I4390ac85d03bd5293af3e21aae1bd4750486d610
* | am 92591524: am e0b5c555: am 49f3ffd3: am 194dda10: Fix some warningsScott Kennedy2014-03-251-1/+2
|\| | | | | | | | | * commit '92591524182a086e666f66e087032a646a27d20e': Fix some warnings
| * Fix some warningsScott Kennedy2014-03-241-1/+2
| | | | | | | | Change-Id: I43b3b9e5d6ecf4f5ca46da2cfe8d07e2d647355e
* | Fix buildDir issue.Xavier Ducrohet2014-02-251-2/+0
| | | | | | | | Change-Id: I2d441100f9ab85bd6631c60621438363b67ca6bd
* | Resolve tag conflict between exp_det_snet and gmail_perf_end.William Luh2014-01-311-1/+1
| | | | | | | | Change-Id: I4fd904113cd09ea84c3e80bb25b4e433f35638be
* | Rename exp_det_snet tag to snet.William Luh2014-01-301-1/+3
| | | | | | | | | | Bug:12824174 Change-Id: Ia81c998aa3ec7309c68f98ee04a5364be37b52b5
* | Fix gradle's buildDirXavier Ducrohet2014-01-291-1/+1
| | | | | | | | Change-Id: Ida0f465ae6705db041469c5a5fe461a8affedf74
* | Disable break on lint error.Xavier Ducrohet2014-01-291-0/+4
| | | | | | | | Change-Id: I95b6301074f9a2d72ad26b9ada49d3b3b1020c01
* | Update build-tools version for gradle.Xavier Ducrohet2014-01-231-1/+1
| | | | | | | | Change-Id: Idab026ff51832d799775e32c9955b238e1240e43
* | Add event log tag for Android SNet.William Luh2014-01-061-0/+3
|/ | | | | Bug: 12004174 Change-Id: I0023bbadba93354db2c0e5cc5b3b803d58d6f94a
* Refactor List<Partition> to Partition[]Alon Albert2013-08-261-69/+66
| | | | | | | And add an addPartition(int location, Partition partition) method. The refactoring make adding this method much easier. Change-Id: Ife051b19837c2719e9487d7bc4f14095e76cc141
* Merge "Set the build dir to be relative to a root folder."Adam Metcalf2013-07-091-1/+1
|\
| * Set the build dir to be relative to a root folder.Adam Metcalf2013-07-081-1/+1
| | | | | | | | Change-Id: I61614f9cf0564ebf077c27bebfb02f4a06e00f64
* | am b5e00794: Fix some javadoc bugs.Andrew Sapperstein2013-07-011-5/+4
|\ \ | |/ |/| | | | | * commit 'b5e0079419300f09253f160e0bdd28aa1bef4605': Fix some javadoc bugs.
| * Fix some javadoc bugs.Andrew Sapperstein2013-07-011-5/+4
| | | | | | | | Change-Id: I10c04c3b69f68b44ff27bbbb1abcc2a0b60fd18a
* | Gradle project file.Adam Metcalf2013-06-182-0/+38
| | | | | | | | | | | | | | Adds a gradle project file so that other projects can use the android-common library. Change-Id: I02a2b7a50c7cbb101b360c083257d5acba21230a
* | Fix for CompositeCursorAdapter returning wrong item view typesYorke Lee2013-05-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Cherrypick of https://googleplex-android-review.googlesource.com/#/c/306995/, which fixes the bug that causes getItemViewType to be called with the wrong position, causing new views to be created unnecessarily. Bug: 8398321 Change-Id: I6c921fe7d5135cf9f9d9bdd08b5aa4df7662ac1c
* | Clean up dist files.Ying Wang2013-05-211-3/+0
|/ | | | Change-Id: I32968b7d055e2d21252ae111826912bacb8faf1b
* add exponential backoff option to OperationSchedulerDoug Zongker2012-11-072-12/+81
| | | | Change-Id: I583f2d628726a3579aba66a49310a0ccffa94c0a
* Add getSuggestions() to SearchBjorn Bringert2012-03-021-0/+75
| | | | | | | | This is a copy of the hidden SearchManager.getSuggestions(), which I plan to remove. It doesn't depend on any hidden APIs and is purely a helper method. Change-Id: I7915cdf327cca9f701e56bcedbf3f5388acf3a66
* Adding minor tweaks to SQLiteContentProvider.Tom Wilson2012-02-231-1/+11
| | | | | | | Allows sub-classes to specify a max number of batch operations, and makes this data accessible as a public method. Change-Id: I3d1cb7b996b23e45b479613b0af4f01a8a641f04
* Add an addAll(String[]) method to ProjectionMap.Dave Santoro2012-01-261-0/+7
| | | | | | | This is useful if the columns for a table are already declared in a String[]. Change-Id: I0140081f149a6354984bf3eb1cb3763f5edf369b
* am f7da24b3: Make static fields of DUSU package-privateConley Owens2011-12-211-2/+2
|\ | | | | | | | | * commit 'f7da24b37a0c94e9bfb5e317548999d418fb12ae': Make static fields of DUSU$DUF package-private
| * Make static fields of DUSU$DUF package-privateConley Owens2011-12-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | DataUsageStatUpdater$DataUsageFeedback This makes a little more sense since they are accessed outside of the class that they are defined in. In addition, this fixes errors created by proguard when building with OpenJDK. Change-Id: I2c2c514e83fbf789cca59a8ff11df9fd0ac7ffda
* | Moving ProjectionMap into frameworks/ex.Dave Santoro2011-12-131-0/+85
|/ | | | Change-Id: Ida7831c961dd4a132e6c5bb3fffacceca2f41d44
* Remove ArrayListCursor.Jeff Brown2011-10-121-167/+0
| | | | Change-Id: Iadf4bfbc86efdb04ba2917d9def65061e3cc3a23
* Use ICS version codeDaisuke Miyakawa2011-09-141-6/+3
| | | | | Bug: 5047678 Change-Id: I748525684b82f16d7a799b035ad2cfed22fa02d9
* Use ICS release name instead of version codeDaisuke Miyakawa2011-08-231-2/+3
| | | | | Bug: 5148810 Change-Id: I1b4d5d6280fb94e8cd514e3379aecee888eba479
* b/5122753 Make Rfc822Validator a bit smarterErik2011-08-052-3/+63
| | | | Change-Id: Iffea9735b906466077ce03a97ab49b614917dbf3
* Adds tests for Variable Speed code.Hugo Hudson2011-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test changes: - Adds many, many test cases against a MediaPlayerProxy, checking that it behaves to the contract of a MediaPlayer. - Adds the RealMediaPlayer class to check a real MediaPlayer. - Adds the VariableSpeed class, to check a VariableSpeed instance against the same contract as the MediaPlayer. - Adds an Android.mk for the unit tests. - Adds also an AndroidManifest.xml for the unit tests. - Adds some test asset media files (3gpp file and mp3 file). Required for the test changes: - Adds a DynamicProxy class to adapt a MediaPlayer as a MediaPlayerProxy class, i.e. to test the implementation of MediaPlayerProxy, required to avoid writing an adapter. - Adds a couple of listeners, OnErrorListener and OnCompletionListener, that can be waited for synchronously in unit tests. Improvements as a result of the tests: - During the testing, fixes the case where we weren't throwing IllegalStateException if asked for the duration on released player. - Refactored the create engine, create and realize output mix, create and realize audio player, get play interfaces and callbacks, all separated into their own static methods. - This allows me to create the audio player during the main while loop actually after the decoding has begun rather than before starting. This work is a precursor to using the decoder's report on sample rate and channels as the input to these methods. - slSampleRate and slOutputChannels no longer computed in the constructor, but computed when needed in the construction and realization of the audio player. Other changes: - Remove some overly verbose logs on getDuration() and getCurrentPosition(). - Adding the decoder interface to the callback. - Extract metadata from decoder method now takes the metadata interface, so this will be usable from the decoder callack in a follow up. - Temporarily stop getting the metadata out of the decoder, I'm going to be doing it on the decoding callback instead. - Renames the comment in AndroidManifest.xml to describe the correct invocation to run the common tests. Bug: 5048252 Bug: 5048257 Change-Id: Icdc18b19ef89c9924f73128b70aa4696b4e727c5
* Use HC MR3's verison code instead of MR2'sDaisuke Miyakawa2011-07-191-2/+2
| | | | | Bug: 5047405 Change-Id: I479778c36b2e6706dd0d171bfbe9123cc45c0217
* Enhance the URL Regex script to handle i18n TLDs.Shimeng (Simon) Wang2011-07-181-4/+10
| | | | | | | | Decode punycode and put in Unicode scripts also into the Regex matcher, this will match internationalized characters in TopLevelDomains. issue: 4384739 Change-Id: Ic1aac6e05509f00ef3a2c19a06cacda6e9cd8b42
* Adds the MoreCloseables utility file.Hugo Hudson2011-07-141-0/+46
| | | | | | | | | | - This has methods for closing objects iff they are not-null, in exactly the same way as Closeables, but for objects that don't implement the Closeable interface. - Specifically at the moment this involves Cursor and AssetFileDescriptor objects. Change-Id: I92e8719e6deab7652f940d129594cdee3c8f3061
* Add the new global-search field to android-common.Mark Brophy2011-07-071-0/+11
| | | | | | | For unbundled apps which don't build against ICS yet, but need to support this feature. Change-Id: I3aca93d007ae05e2c59dc8e0613e761ec52ecdea
* Merge "Pass query parameters for primary account."Daisuke Miyakawa2011-06-151-3/+12
|\
| * Pass query parameters for primary account.Daisuke Miyakawa2011-04-071-3/+12
| | | | | | | | | | | | | | | | | | Should be after: - Ibce363d336cb3e3a1fca10bddbd912ec96e4b059 - I2a22be56822226e3ea6b6f2ef23bb77816d0345a Bug: 3510087 Change-Id: I7e4f4fa01a237fa82521c5f57c258ee599933d60
* | Introduce utility library for sending usage feedback.Daisuke Miyakawa2011-06-091-0/+263
|/ | | | | | | | | | | | | | | | | | | It allows each app to conveniently send data usage feedback to ContactsProvider, which includes TIMES_CONTACTED/LAST_TIME_CONTACTED existing before ICS and DataUsageFeedback stuff introduced in ICS. This library checks API version and update relevant data appropriately, so each application doesn't need to take care of details of API (and possible API change in ICS) TODO: - need test for this. Must be after I602c0b83afca674904946f59bbdfc4dca07d46e4 Bug: 4371572 Change-Id: Id84ef81392c48d8c59eb89e0407eec0c592f3b31
* am 86018e02: Merge "Preventive fix in setNotificationsEnabled" into honeycombGilles Debunne2011-01-191-2/+2
|\ | | | | | | | | * commit '86018e0266578b120b9ad4133a6f189d2a3eac47': Preventive fix in setNotificationsEnabled
| * Preventive fix in setNotificationsEnabledGilles Debunne2011-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This code setNotificationsEnabled(false); ... notifyDataChanged(); ... setNotificationsEnabled(false); should not notify that a change happended. Change-Id: Ia639530dcc2a34c24a7edbe2d2ba3530d22cacb9
* | am 10c28c7f: Don\'t change the visibility of overridden methods.Ficus Kirkpatrick2011-01-161-4/+4
|\| | | | | | | | | * commit '10c28c7f31687ff57476d0a7381461fef71cc5cb': Don't change the visibility of overridden methods.