40 Commits

Author SHA1 Message Date
Mike LeBeau
4b71fc0fa8 Merge "Add constant to android-common for voice search's EXTRA_CALLING_PACKAGE, and use it from SearchDialog." 2010-02-16 16:10:09 -08:00
Shimeng (Simon) Wang
e8cb5ab7c0 Merge "Enhance URL regular expression to match more Unicode chars." 2010-02-16 10:49:37 -08:00
Doug Zongker
fb45088976 remove Base64 from android-common
This is now available in the framework as android.util.base64.*;

Change-Id: I54901d32b2b5b291cfa0b4c2479b805038ba12ac
2010-02-14 15:31:27 -08:00
Dianne Hackborn
b125dc5599 Fix MotionEvent pointer API.
Ooops.  The API said that the pointer down and up actions contained
the pointer id, but it is actually the index.  Actually it makes
much more sense for it to be the index, and those ACTION_POINTER_1_DOWN
etc. constants were stupid.
2010-02-12 17:52:22 -08:00
Mike LeBeau
c2fd9adf0e Add constant to android-common for voice search's EXTRA_CALLING_PACKAGE,
and use it from SearchDialog.
2010-02-12 17:51:31 -08:00
Mike LeBeau
85c4e99382 Merge "Oops, unbreak the build by removing Recognition.java, not intended for submission at this time." 2010-02-12 15:27:12 -08:00
Mike LeBeau
5741848d1e Oops, unbreak the build by removing Recognition.java, not intended for
submission at this time.
2010-02-12 15:26:22 -08:00
Mike LeBeau
80eeeb7095 Merge "Make the corresponding frameworks change to add VoiceRecognitionService to the list of SDK sample apps." 2010-02-12 14:31:00 -08:00
Mike LeBeau
9c57aca188 Make the corresponding frameworks change to add VoiceRecognitionService to
the list of SDK sample apps.
2010-02-12 14:09:55 -08:00
Dianne Hackborn
90d2db3d21 Add Pointer Location to the window manager.
The window manager now has pointer location built into it.
Viva la touch!
2010-02-12 13:19:06 -08:00
Doug Zongker
2dc87f6824 add Base64InputStream
Change-Id: I777b54bd6d01c86105b473a6701a06d350cee8d1
2010-02-12 10:53:46 -08:00
Shimeng (Simon) Wang
51c02dbf75 Enhance URL regular expression to match more Unicode chars.
Enhance URL regular expression to match legal one byte Unicode characters in
Internationalized Resource Identifiers as detailed in RFC 3987.  Specifically
two byte Unicode characters are not included.  Not all things in RFC 3987 is
implemented, this is just an enhancement for recognizing more common used one
byte Unicode characters.

This change helps Browser address bar identify more valid URL without scheme
typed in, such as 현금영수증.kr

make-iana-tld-pattern.py is modified to contain only Top Level Domain
regular expression generation.  Other parts of WEB_URL pattern are in
solely in Patters.java for better consistency and maintenance.
2010-02-11 14:07:44 -08:00
Doug Zongker
7b40233581 add NO_CLOSE flag for use by Base64OutputStream
Change-Id: Ib2884e7b3853e4e4b2e329edf47c6f64c2f165a7
2010-02-11 14:07:17 -08:00
Shimeng (Simon) Wang
ea23206c28 Merge "Add back lost python script." 2010-02-10 14:52:07 -08:00
Dan Egnor
60586f2ec6 API CHANGE: Add SSLSessionCache public API to allow unbundled SSL session caching.
Generally clean up the associated SSLCertificateSocketFactory API as well,
change AndroidHttpClient to use this new thing, and make the android-common
library build SDK-clean (woo hoo).

Bug: 2362543
Bug: 2357311
2010-02-10 14:43:21 -08:00
Shimeng (Simon) Wang
b4489000d1 Add back lost python script.
The script is used to generate top level domains' regular expressions.
This is enhanced and used to regenerate the new top level domains.

	new file:   common/tools/make-iana-tld-pattern.py
2010-02-10 11:22:01 -08:00
Doug Zongker
b90d44808a add Base64OutputStream to android-common
Base64OutputStream is a FilterOutputStream that can encode or decode
base-64 data (with any of the flags supported by the Base64 class --
crlf, padding vs not, line wrapping vs not, etc.)

We change Base64 to have package-private decodeInternal and
encodeInternal methods that save all their state in objects and can be
called multiple times to stream data.  The existing functions for
in-memory encoding/decoding call the internal method once; the output
stream calls it multiple times.

Change-Id: Iac661d05329bc2e6b2863088efcedc974415ec44
2010-02-10 11:10:53 -08:00
Bjorn Bringert
9bc82c3531 Add Search.SOURCE to android-common
Part of http://b/issue?id=2429556

Change-Id: I1e37e092c8a1319d5f703b065dba8a6fbde31db5
2010-02-10 14:04:21 +00:00
Shimeng (Simon) Wang
3ed6fbd9e1 Regenerate the TopLevelDomain from iana.org website.
This is to capture recently added top level domains.
	modified:   common/java/com/android/common/Patterns.java

	modified:   common/tests/src/com/android/common/PatternsTest.java
2010-02-09 15:13:09 -08:00
Doug Zongker
8799149974 add explicit Base64.DEFAULT flag to request default behavior
Also fix some grammar problems in the javadoc, and prevent the class
from being instantiated.

Change-Id: I4d83184236566a1e77d5f5cce1c4dd3776bcfca3
2010-02-08 11:16:20 -08:00
Doug Zongker
17fe395dab Merge "rename encodeString to encodeToString" 2010-02-05 05:44:17 -08:00
Dan Egnor
f6e003bc4a Merge "Add ability to parse HTTP-format moratorium times (since pretty much every user wants this)." 2010-02-04 19:48:52 -08:00
Doug Zongker
e2127fb486 rename encodeString to encodeToString
Change-Id: I777530b80a9e8be8c487e140574621cd9d35dc35
2010-02-04 17:07:59 -08:00
Doug Zongker
6123eafa2c a new java implementation of base64 for android-common
A new Base64 encoder/decoder class.  Some benchmarks comparing the
decoder it to those from android.os.Base64Utils (a decode-only native
implementation not accessible to apps) and
org.apache.commons.codec.binary.Base64, all with the JIT enabled:

  1k encoded data
  APACHE   avg:   811 us    min:   244 us    max: 13671 us
  COMMON   avg:   263 us    min:    30 us    max:  4730 us
  NATIVE   avg:   102 us    min:    61 us    max:  5493 us

  10k encoded data
  APACHE   avg:  3624 us    min:  2746 us    max: 23895 us
  COMMON   avg:   979 us    min:   518 us    max:  7751 us
  NATIVE   avg:   817 us    min:   762 us    max:  3143 us

  100k encoded data
  APACHE   avg: 33167 us    min: 31829 us    max: 140411 us
  COMMON   avg:  6047 us    min:  5493 us    max: 45227 us
  NATIVE   avg: 10109 us    min: 10009 us    max: 12451 us

Change-Id: Ic622e3a967a62d57d30bd25b80cbe4e0dd60e764
2010-02-04 15:54:00 -08:00
Dan Egnor
2991425379 Add ability to parse HTTP-format moratorium times
(since pretty much every user wants this).
2010-02-03 18:28:08 -08:00
Doug Zongker
7ad12a5f44 move HttpDateTime from android.webkit to android-common jar
Some to-be-unbundled classes want to use HttpDateTime as well.

Change-Id: I40a001970682f6fbd4d9cd3546bd3f63ebfbe89b
2010-02-03 11:14:29 -08:00
Maryam Garrett
1a939bbac6 Remove 2 unused imports.
Change-Id: I4ada5f3dccdbb2e7ede29693f7211068808f2d75
2010-02-01 11:47:45 -05:00
Maryam Garrett
1fd8c98fba Move LoggingEvents.java to android-common & add UserHappiness
The LoggingEvents move will allow Gmail, Voice Search and other apps to
access the LoggingEvents needed. This file will replace
packages/inputmethods/LatinIMEsrc/com/android/inputmethod/voice/LoggingEvents.java
vendor/google/apps/VoiceSearch/apps/VoiceSearch/src/com/google/android/voicesearch/logging/LoggingEvents.java

In addition to moving the file, I have added 3 new fields:
TIMESTAMP, IME_TEXT_ACCEPTED, CALLING_APP_NAME. I needed to
create CALLING_APP_NAME b/c I can't re-use EXTRA_APP_NAME
because that is reserved for one of two values: voice
search or voice IME.

I added another file to android-common: UserHappinessSignals
This can be imported by different applications to broadcast
various user happiness metrics. It is currently used by Gmail's
CompseActivity.java to indicate that a user "accepted" the IME
text when they pressed the send button.

Change-Id: Ia859140facb7fb66a12706735d5132ba9eaa5ea0
2010-01-29 13:27:56 -05:00
Paul Westbrook
68f2f547f5 Bug 2330111
Make NumberPicker public

Made setCurrent() more robust, as the value needs to be within the range
specified earlier. setCurrent() will now throw an exception
if the specified doesn't fall in the range
2010-01-21 16:56:57 -08:00
Makoto Onuki
2683c6f72c DomainNameValiator: Remove workaround
Remove the workaround introduced in CL 68137-p9.
Validation should fail when a certification can't be parsed.

Bug: 2369689
2010-01-20 09:58:42 -08:00
Makoto Onuki
691c07031a Addign more tests for DomainNameValidator.
Added tests that use actual certificates.

See bug:2369689 for background.
2010-01-19 15:03:10 -08:00
Fred Quintana
30d203050e allow + in usernames 2010-01-14 14:57:20 -08:00
Makoto Onuki
8f028a94fc Moved DomainNameChecker to android common.
- Moved DomainNameChecker from android.net.http to android common, and renamed to DomainNameValidator.
- Added a simplified version of DNParser, which DomainNameValidator uses instead of X509Name in order to extract Subject Name from a certificate.
- Added unit tests for DomainNameChecker and DNParser.

There's a suspicious comment in DomainNameChecker saying something like "X509Certificate fails to parse a certificate when a subject alt name begins with '*'".  I think we should fix it if it's really the case -- otherwise certificates with the wildcard wouldn't work.  I'll see if it's true after submitting this patch.
2010-01-12 10:27:13 -08:00
Doug Zongker
edc5189c33 change remaining frameworks/base Gservices to Secure settings
Change-Id: I61bdb05a2526523700c2833154d5a4133881ef10
2010-01-07 15:00:37 -08:00
Tom Taylor
087ff0b935 Move various utility classes to android-common
In the process of making Mms unbundled, copy a few non-public-API
classes into the android-common library. The Mms app now uses this
library. The next step is to update the other apps that use these classes
and then delete the classes from their original location.
2009-12-18 10:08:35 -08:00
Paul Westbrook
7762d93621 Unbundling work
Moved AndroidHttpClient, Rfc822InputFilter, Rfc822Validator
NumberPicker, NumberPickerButton to android-common
---
2009-12-14 09:24:09 -08:00
Dan Egnor
494a1dc5e9 Add OperationScheduler (and test) to the common static library;
includes new string parsing function (and test).
2009-11-21 10:09:46 -08:00
Dan Egnor
cc342e3365 Solve the mutual interdependency problem between common and framework:
Have framework include the common source files directly when building,
then build common as a static library separately (depending on
framework, like everything else).

Goes with a companion change to build/core/pathmap.mk.
2009-11-18 15:08:18 -08:00
Dan Egnor
c9e6581809 Attempt to fix the build server build: make the common library
not depend on the framework library (for now, at least).
2009-11-18 14:14:10 -08:00
Dan Egnor
ded0e6447e Create android-common static library which gets included in frameworks.jar,
but can also be used by unbundled apps.  Move android.text.util.Regex there as
a starting example, renamed to a more sensible (?) com.android.common.Patterns.
Set up a corresponding test package, and move RegexTest (to PatternsTest).
Update clients.
2009-11-18 12:05:04 -08:00