77 Commits

Author SHA1 Message Date
Brett Chabot
0dc59e78e1 More framework tests cleanup.
Move all tests for android.* classes from tests/AndroidTests and
tests/CoreTests into framework/base/<core|graphics>/tests.

Consolidate all tests for java.* classes to tests/CoreTests.
Eventually hopefully these will be moved to dalvik/ somewhere.

Remove tests/AndroidTests entirely.

Change-Id: I86584d086ab7bd045bb38a10b699907805298a95
2010-04-01 18:31:11 -07:00
Brian Carlstrom
778ce48665 Issue 5697: getContextClassLoader returns a non-application classloader
ActivityThread should try to set the value for Java
Thread.getContextClassLoader to the PathClassLoader that loaded the
APK's classes so that Java frameworks that use the Java context class
loader, which is not to be confused with the
android.content.Context.getClassLoader which serves a similar purpose
in the Android framework.

However, we avoid setting the Java context ClassLoader to the APK's
PathClassLoader if there is a static indication that multiple packages
may share the VM, since they could load in an unpredictable order
leading to different values for the thread local Java context
ClassLoader. In this case, we instead use a specially created
WarningContextClassLoader that warns the user the first time the Java
context ClassLoader.

Currently the static indications that a package might share a VM with
other packages are the presence in the AndroidManifest of a
sharedUserId or requesting a non-default application process name.
2010-02-23 15:58:00 -08:00
Brett Chabot
e70f61b116 Retry test-runner tests move.
This time change the frameworks makefile so it only includes test-runner/src
in the public API.
2010-02-20 17:29:05 -08:00
Brett Chabot
c1ca8c51c6 Revert "Move framework test-runner unit tests to be closer to their source."
This reverts commit 12093976a4842a795491cfd2b1d3b71e18503f2d.
2010-02-19 10:31:05 -08:00
Brett Chabot
12093976a4 Move framework test-runner unit tests to be closer to their source.
Move the test-runner source into a separate src folder to accommodate the test
move.
2010-02-19 09:58:29 -08:00
Fred Quintana
c5d1c6db61 add sync polling
- added the ability to specify that a sync (of account/authority/extras)
  should occur at a given frequency
- the existing daily poll code was replaced with seeding each
  account/authority with a 24 hour periodic sync
- enhanced the "adb shell dumpsys content" output to show the
  periodic syncs and when they will next run
2010-02-05 15:16:20 -08:00
Elliott Hughes
809cf4481f Remove "StringTest.java".
This only tests stuff that's already better tested in dalvik/libcore, plus
private ICU API (RuleBasedNumberFormat) we'd like to remove, and that this
is the only caller of.
2010-02-03 11:33:47 -08:00
Patrick Scott
9d0f609251 There is no ../com directory and the build (find) agrees. 2010-01-28 09:03:14 -05:00
Neal Nguyen
22e31e5b60 Moving framework core tests closer to their source files.
Phase 2 of test case cleanup; distributing CoreTests files closer to their respective sources under frameworks.
2010-01-27 13:36:38 -08:00
Fred Quintana
307da1a46b enhance the sync manager backoff logic and add support for retry-after
moved SyncQueue and SyncOperation into their own top-level classes
to ease maintainability and testing6

removed some dead code
2010-01-25 16:41:58 -08:00
Neal Nguyen
ae51f0a857 Merge "Framework Tests Cleanup: Removing CTS duplicate files" 2010-01-13 14:17:56 -08:00
Doug Zongker
edc5189c33 change remaining frameworks/base Gservices to Secure settings
Change-Id: I61bdb05a2526523700c2833154d5a4133881ef10
2010-01-07 15:00:37 -08:00
Neal Nguyen
a5411f5b8d Framework Tests Cleanup: Removing CTS duplicate files
CookieTest.java is already included in CTS, so removing this one under frameworks.
2009-12-23 16:02:55 -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
Wei Huang
fd7b4f1d12 bug #2180646: make comparing "404-04" and "40404" return true in PhoneNumberUtils.compare().
- when comparing two numbers whose dialable char length is less than the MIN_MATCH (7), treat them as equal if the dialable portion of the numbers match.
- update unit test.
2009-10-23 01:17:17 -07:00
Tammo Spalink
9e53415326 Let PLUS occur once anywhere in dial-str network portion.
Create a new extractNetworkPortion() function, since the old one is
public, that does effectively the same thing but is more flexible as
just mentioned.

Addresses issue:
http://buganizer/issue?id=2013998

Change-Id: Ie5df08ef9c871881e8728a44abf0385908000823
2009-10-21 10:30:58 +08:00
Jesse Wilson
e78fcbac04 DO NOT MERGE: Cleaning up the PipedStreamTest 2009-09-26 09:28:17 -07:00
Android (Google) Code Review
c3c6621a2c Merge change 25879 into eclair
* changes:
  Setting the default HTTP user agent at runtime init.
2009-09-22 22:04:05 -04:00
Wei Huang
35fd2e5853 fix bug 2134685: fix tests for PhoneNumberUtilsTest.
Change-Id: I28c4e69775c7ce20983c052b8b77ba2df6d5c63b
2009-09-21 12:56:21 -07:00
Jesse Wilson
d0f80d4456 Setting the default HTTP user agent at runtime init.
I can't do this in HttpURLConnection directly, since that would
cause a forbidden dependency from Dalvik on Android.
2009-09-18 18:16:16 -07:00
Grace Kloba
d0990d4a78 The empty path and no path mean default path. So "a=d" should replace "a=c". 2009-09-09 18:22:44 -07:00
Tammo Spalink
d0085ed5e2 Fix CDMA BCD unit test.
Addresses issues:
http://buganizer/issue?id=2056263

Change-Id: I80e2412bd53b9045ae3cdc95cdf132da0946c2ea
2009-09-07 16:17:45 +08:00
Ken Shirriff
5f5989de7c Add tests for RecurrenceSet.
Tests only cover populateContentValues.  See bug 1594638
2009-08-21 17:09:33 -07:00
Libin Tang
7850cdde66 Fix +NANP issue and cleanup plus code conversion.
This patch includes the plus code conversion clean up.
1. change the plus code conversion based on the current and default
   number systems retrieved from MCC.
2. for format such as +NANP, replace the '+' with the current IDP (011).
3. comments changes.
2009-08-21 10:26:58 -07:00
Android (Google) Code Review
763101efcd Merge change 21171
* changes:
  Allow max_retires to be set to infinite.
2009-08-13 15:14:12 -07:00
Wink Saville
a03ab1a6a0 Allow max_retires to be set to infinite.
Setting max_retires to infinite sets mRetryForever to true and therefore
isRetryNeeded will always be true. This is better than an alternative
which is to set max_retires to a large value such as 2147483647.
2009-08-13 14:18:00 -07:00
Wink Saville
9688c6046f Rename bcdByteToInt to gsmBcdByteToInt and beBcdByteToInt to cdmaBcdByteToInt. 2009-08-13 11:11:46 -07:00
Tang@Motorola.com
18e7b98c1c Fix the issue of incorrect conversion of the plus sign in a dial string.
The issue is that the plus sign in a dial string is always converted
to the IDP (International Dial Prefix).

This fix implements a plus sign conversion mechanism based on the default
telephone numbering system that the phone is activated and the current telephone
number system that the phone is camped on. Currently, we only support the cases
where the default and current telephone numbering system are NANP.
2009-08-12 15:41:33 -07:00
Wink Saville
3918e13b24 Add configurable data-retry.
Add RetryManager and change GsmDataConnectionTracker and
CdmaDataConnectionTracker to use it.

Add TelephonyUtilsTest which tests RetryManager.
2009-08-09 15:23:45 -07:00
Grace Kloba
699c646839 fix the build. handleSslErrorRequest needs a return value now. 2009-08-03 11:46:44 -07:00
Android (Google) Code Review
ba58c6f228 am ad346278: Merge change 8208 into donut
Merge commit 'ad346278fe129a341543d4a75bf9cc08c50742f8'

* commit 'ad346278fe129a341543d4a75bf9cc08c50742f8':
  Removing MD2
2009-07-29 16:45:22 -07:00
Android (Google) Code Review
ad346278fe Merge change 8208 into donut
* changes:
  Removing MD2
2009-07-29 00:38:53 -07:00
Android (Google) Code Review
1186bb1eca am ae1ba650: Merge change 8227 into donut
Merge commit 'ae1ba650074ab7b9a73f4430c1fc3576a8199383'

* commit 'ae1ba650074ab7b9a73f4430c1fc3576a8199383':
  Handle null in MatrixCursor.get*()
2009-07-22 13:29:31 -07:00
Bjorn Bringert
f2cec58d90 Handle null in MatrixCursor.get*()
Before, if a column contained null, MatrixCursor.getString()
returned the string "null", and the get<Number>() methods
threw exceptions.

Now, getString() returns null, and get<Number>() return 0.

Fixes http://b/issue?id=1996628
2009-07-22 21:20:51 +01:00
Android (Google) Code Review
c33bd02e0f am 113eaa59: Merge change 8131 into donut
Merge commit '113eaa59c1dfafd548a13919e48c0346c0c925ac'

* commit '113eaa59c1dfafd548a13919e48c0346c0c925ac':
  Fix android.core.FileTest#testFile: add sdcard write permission to test.
2009-07-22 11:50:57 -07:00
Urs Grob
dbda5ceb49 Removing MD2 2009-07-22 20:09:52 +02:00
Brett Chabot
d0bff15377 Fix android.core.FileTest#testFile: add sdcard write permission to test. 2009-07-21 18:17:05 -07:00
Patrick Scott
fe4fec7c66 Remove all our old high priority knowledge since WebCore will manage it.
Also removed an unused variable in RequestQueue.java.
2009-07-15 15:48:02 -04:00
Jaikumar Ganesh
1c42769339 Rename registerPhoneStateChange to registerPreciseCallStateChange
As registerPhoneStateChange was actually notifying CallStateChange,
rename appropriately.
2009-07-14 21:29:41 -07:00
Android (Google) Code Review
4a301cb495 am 8aadf7ae: Merge change 5359 into donut
Merge commit '8aadf7ae278961926de5452a46863503303735cf'

* commit '8aadf7ae278961926de5452a46863503303735cf':
  fix potential string index problems in PhoneNumberUtils.numberToCalledPartyBCDHelper
2009-07-01 11:19:19 -07:00
Tammo Spalink
3a08cec99e fix potential string index problems in PhoneNumberUtils.numberToCalledPartyBCDHelper
addresses http://buganizer/issue?id=1489784
2009-06-29 12:51:22 +08:00
Android (Google) Code Review
969a74ae5e am 6190fe6e: Merge change 2758 into donut
Merge commit '6190fe6e7d7c8a917472637f5ab2fb21fc8a6eea'

* commit '6190fe6e7d7c8a917472637f5ab2fb21fc8a6eea':
  Fix concat SMS for GSM.
2009-05-29 17:15:10 -07:00
jsh
ef354fdd63 Fix concat SMS for GSM.
Bug 1883998: We only support sending 8-bit references for now.
Bug 1885080: Also fix the GsmAlphabetTest, which started failing when SmsHeader
was re-worked.
2009-05-29 17:11:28 -07:00
Ficus Kirkpatrick
5214376d2b Stop the NANP number formatter from putting dashes in shortcodes.
This changes the result of PhoneNumberUtils.formatNumber("46645") from
"466-45" to "46645".
2009-05-26 18:28:38 -07:00
Android (Google) Code Review
f68498eaed am 5bc21aa0: Merge change 1127 into donut
Merge commit '5bc21aa0671d83e406b46e0431816dea8d9ca5cb'

* commit '5bc21aa0671d83e406b46e0431816dea8d9ca5cb':
  SmsHeader rewrite, in preparation for migration to public API.
2009-05-20 08:54:39 -07:00
Tammo Spalink
64c499113a SmsHeader rewrite, in preparation for migration to public API.
See http://b/issue?id=1751571

Changes the semantics of SmsHeader from containing only opaque data
to exposing occurs-once frequently-used fields together with a list
of opaque fields.  Also changes the coding to and from byte array to
be symmetrical, whereas previous encoding had an extra length field.

Cdma SmsMessage -- cleanup of code paths along with adjustments to
match the new header semantics, which should address at least some
of the issues with concatenated messages.  See http://b/issue?id=1809759
2009-05-20 09:27:10 +08:00
Android (Google) Code Review
8ba63601ab am 15e74b9d: Merge change 1939 into donut
Merge commit '15e74b9da8b4cda11ee54da1e77a02d1a86c944a'

* commit '15e74b9da8b4cda11ee54da1e77a02d1a86c944a':
  Temporarily suppress flaky test LocationManagerProximityTest until test harness support can be rolled out.
  Fix build breakage
  Revise the ImageButton class description to include information
  Record statistics about whether HTTP connections are reused.
2009-05-19 01:19:15 -07:00
Brett Chabot
78a1c9067f Temporarily suppress flaky test LocationManagerProximityTest until test harness support can be rolled out. 2009-05-18 19:15:09 -07:00
Jorg Pleumann
86dbf0d798 am b4735b6: am 25f9637: AI 148665: Disabling a test that does not work a
Merge commit 'b4735b6c04c6bca3219115395748a1b5ef02ff6c'

* commit 'b4735b6c04c6bca3219115395748a1b5ef02ff6c':
  AI 148665: Disabling a test that does not work as
2009-05-11 00:44:29 -07:00
Jorg Pleumann
b4735b6c04 am 25f9637: AI 148665: Disabling a test that does not work as
Merge commit '25f963753ea762c12c74c0dcb861b023ac92177a' into donut

* commit '25f963753ea762c12c74c0dcb861b023ac92177a':
  AI 148665: Disabling a test that does not work as
2009-05-11 00:39:55 -07:00