• Home
  • History
  • Annotate
  • only in /frameworks/base/core/tests/coretests/src/com/
History log of /frameworks/base/core/tests/coretests/src/com/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a920f25fe55fc9afc7640902a200f19ce278588b 29-Jun-2013 Elliott Hughes <enh@google.com> resolved conflicts for merge of fca0f92e to stage-aosp-master

Change-Id: I4791f0ffa324a313b8390fbde6d8f82f716ecf74
d396a448b2e36e29598c954b64bfddef73f3fae0 29-Jun-2013 Elliott Hughes <enh@google.com> Switch frameworks/base over from @hidden Charsets to public StandardCharsets.

Bug: 3484927
Change-Id: I5d136d2ee629588538602766a182ae14ce5fc63c
ndroid/internal/util/ProcFileReaderTest.java
94c91dca55de9ffdbe072fcc5dd6dbf1efe5e4c1 07-Mar-2013 Jeff Sharkey <jsharkey@android.com> ArrayUtils.indexOf(), containsAll() with tests.

Change-Id: I040164d4e45126e4a6c1df54bd114f47951da560
ndroid/internal/util/ArrayUtilsTest.java
8e7b3b15f7a4f888d55f080d3ed61860cd5fab55 01-Feb-2013 Jeff Sharkey <jsharkey@android.com> Support optional values in ProcFileReader.

When new values are added to proc files, we need to handle reading
them from both old and new kernels. This change supports optionally
reading long values. Tests to verify.

Bug: 7903145
Change-Id: I9fe250c0486c3cce3cf3d8624f01af01128d1191
ndroid/internal/util/ProcFileReaderTest.java
ed1ad7fadae1ed0fae2946dbe3e3ee9eea299bde 31-Jan-2013 Jeff Sharkey <jsharkey@android.com> Merge "Add wrapping support to IndentingPrintWriter."
71cb446f010e791ca77a27c416a79b5ccb3f075b 31-Jan-2013 Jeff Sharkey <jsharkey@android.com> Add wrapping support to IndentingPrintWriter.

When created with a wrapping width, any content longer than the
requested width will be wrapped onto additional lines. This supports
use-cases like dumping lots of data with printPair().

Improve documentation and add tests to verify behavior.

Change-Id: Ibdfce198f0e69f4df7725544fd1cd02fa029c647
ndroid/internal/util/IndentingPrintWriterTest.java
d21e24bccec8309839a264da95c5dc1573fc65c3 30-Jan-2013 Wink Saville <wink@google.com> Merge "Cleanup StateMachine LogRec handling and get tests working."
efcc3d35661c0cd978bb2b2f808fade4c4734e21 30-Jan-2013 Wink Saville <wink@google.com> Cleanup StateMachine LogRec handling and get tests working.

Change-Id: I13107e846812b16f1c95be11626500dbd7a13b2a
ndroid/internal/util/StateMachineTest.java
3029bf225cfa2c4b5b6e76303b0eba0d91c21026 30-Jan-2013 Jeff Sharkey <jsharkey@android.com> Check text length when testing for newline.

Also add tests to verify.

Bug: 8102140
Change-Id: I7e5dbff53caeb50bfa0fb4ea5dce73e3c742986a
ndroid/internal/util/FastXmlSerializerTest.java
4fbbda4cecb078bd3867f416b02cc75f5455284f 25-Sep-2012 Jeff Sharkey <jsharkey@android.com> Handle multi-user mountObb() requests.

Since emulated external storage paths differ based on execution
context, carefully fix up paths for various use-cases:

1. When sending paths to DefaultContainerService, always scope
OBB paths as belonging to USER_OWNER.
2. When sending paths to vold, always build emulated storage paths
visible to root.
3. Always use the original untouched path when talking with apps.

Mount OBB containers using shared app GID, so that an app can read
the mount point across users.

Handle legacy paths like "/sdcard" by resolving the canonical path
before sending to MountService. Move tests to servicestests, and
add tests for new path generation logic.

Bug: 7212801
Change-Id: I078c52879cd08d9c8a52cc8c83ac7ced1e8035e7
ndroid/server/MountServiceTests.java
bbf30dfd767f823f5f40d14b498e2a593454c5c9 29-May-2012 Wink Saville <wink@google.com> Enhance StateMachine Quitting and logging support.

Make StateMachine#quit non-conditional and remove the need to
process the SM_QUIT_CMD it is now private.

Rename halting to onHalting.

Add onQuitting

Change the message specific logging to be more generic and change
the xxxProcessedMessagesYyy methods to xxxLogRecXyy names. Also add
addLogRec(String) and addLogRec(String, State) as the generic logging
methods.


bug: 5678189
Change-Id: I22f66d11828bfd70498db625fe1be728b90478b7
ndroid/internal/util/StateMachineTest.java
6de357e4d10fa5977ab9a6c665dc858765e95d34 09-May-2012 Jeff Sharkey <jsharkey@android.com> Recover from Throwable in FileRotator, dump.

In rewriteSingle(), catch Throwable to rollback to backup file,
instead of just IOException. Also add dumpAll() to pack up contents
for later debugging, and use it when encountering bad stats.

Bug: 6467868
Change-Id: Ic8e287cf5a235706811a304a88d71d11d3a79cd4
ndroid/internal/util/FileRotatorTest.java
c065a8af1561544f1557e3f5036e45a4be4a6d7e 04-May-2012 Jeff Sharkey <jsharkey@android.com> Merge "Begin collecting xtables iface counters." into jb-dev
2d6c580262ba1c19fc4f20c3566889e332fbdcb6 03-May-2012 Jeff Sharkey <jsharkey@android.com> Support full 32 bits for socket tags.

Bug: 5321184
Change-Id: Iadb3a4ad541ef012cea35b70ad440eca4c879f42
ndroid/internal/net/NetworkStatsFactoryTest.java
e8914c36276710de50b347c1e6aecfa45d6a56cd 02-May-2012 Jeff Sharkey <jsharkey@android.com> Begin collecting xtables iface counters.

Add method to parse new iface_stat_fmt proc stats, or return null
when kernel support is unavailable. Add test and remove older, unused
parsing code. Create new "xt" recorder to persist the new xtables
counters when available.

Add SSID support to NetworkIdentity to fix policy tests.

Bug: 6422414
Change-Id: I77f70e9acb79a559ab626f3af5c4f3599801ed43
ndroid/internal/net/NetworkStatsFactoryTest.java
54dfa5d90e49037eba05f5278076b45428b2bd11 24-Apr-2012 Chris Wren <cwren@android.com> Don't allow children of a SizeAdaptiveLayout to measure outside their declared range of valid sizes.

Bug: 6377749
Change-Id: Ie706006eee9c0ed8dda468212a652941b8e20be0
ndroid/internal/widget/SizeAdaptiveLayoutTest.java
d84e5937468f6ebf2313ccd5ae54d5405f5e9cde 19-Apr-2012 Chris Wren <cwren@android.com> fix press feedback on notification rows

Change-Id: I50de2f4d6142c2553428abc853c820f4354d0640
Bug: 6362246
ndroid/internal/widget/SizeAdaptiveLayoutTest.java
a51a9564fd53b661446cd63eea23208656acc678 18-Apr-2012 Craig Mautner <cmautner@google.com> Add call-stack reporting methods into Debug

Added two public methods to Debug. These methods return a String
indicating the caller (getCaller()) or callers (getCallers(int depth))
of the calling method. The String indicates the class, method and line
number of the caller(s). Similar to using Throwable.fillInStackTrace()
but much more concise.

Change-Id: I53d0085aa50e4501d28e8eb3ad5b91ef700ac218
ndroid/internal/os/DebugTest.java
3a59d6e26dbec61ede7d6f87d966698e27c91d78 31-Mar-2012 Chris Wren <cwren@android.com> A layout that switches between its children based on the requested layout height.

Change-Id: I5a4e5892fbed7cab2470e458a38accbbcb05ae51
ndroid/internal/widget/SizeAdaptiveLayoutTest.java
8fc27e8b87bd1def854a03d84009143b315d4176 05-Apr-2012 Jeff Sharkey <jsharkey@android.com> Support metered Wi-Fi NetworkPolicy.

Add networkId field to NetworkIdentity to identify Wi-Fi networks by
SSID. Add support for policies without usage cycles.

Only apply mobile policies when SIM state is ready, which is cleaner
than just checking for airplane mode. Also avoids creating no-op
default policies when subscriberId is null.

Bug: 3001465, 3291052
Change-Id: I1f8aaa49a5db306df022c402ea7f3f5d4bc0cfc7
ndroid/internal/net/NetworkStatsFactoryTest.java
3e3c3f80a90b156ff500076f8655647dfb317acf 06-Feb-2012 Jake Hamby <jhamby@google.com> Add support for CMAS warning notifications over CDMA.

Refactor SMS Cell Broadcast support to enable receiving CMAS warning
notifications over CDMA. The CellBroadcastReceiver app must also be
updated with the corresponding change. All cell broadcasts are now
delivered as a Parcelable SmsCbMessage object in the "message" extra
of the SMS_CB_RECEIVED_ACTION or SMS_EMERGENCY_CB_RECEIVED_ACTION,
instead of as a GSM/UMTS "pdu" byte array.

Existing functionality for ETWS and CMAS alerts over GSM/UMTS continues
to be supported using the new radio-technology independent SmsCbMessage
and related objects. Test cases are added to verify that valid and
invalid broadcast data is handled appropriately.

Unit testing discovered a bug in the BitwiseOutputStream utility class
used by the added test cases. When the BitwiseOutputStream object must be
expanded (in the private possExpand() method), the mEnd field is not
updated to the new array size. This causes a new array to be allocated
on every new write, and for all data beyond the original array allocation
to be replaced with zeroes. Fixed by adding a line to possExpand() to
update mEnd. Added a test case to BitwiseStreamsTest to verify the fix.
Besides the test cases, BitwiseOutputStream is only used by BearerData in
two places, both of which allocate a sufficient initial buffer. So the
bug in BitwiseOutputStream is not critical to fix for normal operation,
but should be fixed so that the test cases using it function correctly.

Bug: 5856308
Change-Id: I201ecbf11607fd200aaae3cbb32561efabf65672
ndroid/internal/util/BitwiseStreamsTest.java
efba344b5a7b20e400daf5f41b2fbd688337f789 29-Feb-2012 Jake Hamby <jhamby@google.com> Revert "Add support for CMAS warning notifications over CDMA." I'll submit again when the app change is ready.

This reverts commit 0c49f03a0429b5c0c4a619256f7bca86a4997ae8
ndroid/internal/util/BitwiseStreamsTest.java
0c49f03a0429b5c0c4a619256f7bca86a4997ae8 06-Feb-2012 Jake Hamby <jhamby@google.com> Add support for CMAS warning notifications over CDMA.

Refactor SMS Cell Broadcast support to enable receiving CMAS warning
notifications over CDMA. The CellBroadcastReceiver app must also be
updated with the corresponding change. All cell broadcasts are now
delivered as a Parcelable SmsCbMessage object in the "message" extra
of the SMS_CB_RECEIVED_ACTION or SMS_EMERGENCY_CB_RECEIVED_ACTION,
instead of as a GSM/UMTS "pdu" byte array.

Existing functionality for ETWS and CMAS alerts over GSM/UMTS continues
to be supported using the new radio-technology independent SmsCbMessage
and related objects. Test cases are added to verify that valid and
invalid broadcast data is handled appropriately.

Unit testing discovered a bug in the BitwiseOutputStream utility class
used by the added test cases. When the BitwiseOutputStream object must be
expanded (in the private possExpand() method), the mEnd field is not
updated to the new array size. This causes a new array to be allocated
on every new write, and for all data beyond the original array allocation
to be replaced with zeroes. Fixed by adding a line to possExpand() to
update mEnd. Added a test case to BitwiseStreamsTest to verify the fix.
Besides the test cases, BitwiseOutputStream is only used by BearerData in
two places, both of which allocate a sufficient initial buffer. So the
bug in BitwiseOutputStream is not critical to fix for normal operation,
but should be fixed so that the test cases using it function correctly.

Bug: 5856308
Change-Id: Ie3e6af747976ce9b8a3e71e76fec71709cf86545
ndroid/internal/util/BitwiseStreamsTest.java
a27a3e8ad7d20dea63ef2d5cb8b6ec7e56c20a89 09-Jan-2012 Jeff Sharkey <jsharkey@android.com> Introduce FileRotator.

Utility that rotates files over time, similar to logrotate. There is
a single "active" file, which is periodically rotated into historical
files, and eventually deleted entirely. Files are stored under a
specific directory with a well-known prefix.

Bug: 5386531
Change-Id: I29f821a881247e50ce0f6f73b20bbd020db39e43
ndroid/internal/util/FileRotatorTest.java
52cd299eef703030f8fcf7a92f413791301771cc 27-Dec-2011 Jesse Wilson <jessewilson@google.com> Move the frameworks/base hostname verifier into libcore. Part 2/2

Bug: http://b/5619726
Change-Id: I165eb3befcef104ff56ffb466c87c60b632f3194
ndroid/internal/net/DNParserTest.java
ndroid/internal/net/DomainNameValidatorTest.java
163e6443f27884a9bfcb9a48ef606dc635852c23 01-Nov-2011 Jeff Sharkey <jsharkey@android.com> Correct proc file reader, optimizations.

Moved away from BufferedReader, which only reads the first 8KB of
some proc files because it aggresively fills its buffer. Optimized
proc parsing, now double the speed. Tests to cover.

Log when NetworkStats counters roll backwards when subtracting, and
optimizations around findIndex(). When system removes UID, also
remove from last stats snapshot to avoid xt counters from rolling
backwards.

Bug: 5472949, 5458380
Change-Id: I07c08fe5233156fac2b84450f6291868bf9bfaf2
ndroid/internal/net/NetworkStatsFactoryTest.java
ndroid/internal/util/ProcFileReaderTest.java
1059c3c30ad96a15695c1a92ae8896e078a6309f 05-Oct-2011 Jeff Sharkey <jsharkey@android.com> Move battery stats to xt_qtaguid for data stats.

Replace TrafficStats calls by reading values from xt_qtaguid kernel
module. To keep BatteryStatsImpl changes lightweight, cache recently
parsed stats. Tracks mobile ifaces from ConnectivityService.

Refactor xt_qtaguid parsing into factory outside of NMS. Add stats
grouping based on UID, and total based on limiting filters like iface
prefix and UID.

Bug: 4902271
Change-Id: I533f116c434b77f93355bf95b839e7478528505b
ndroid/internal/net/NetworkStatsFactoryTest.java
1515c0b5192996fdaf49c6ab8841a0d5b8ea9ca9 17-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Remove HanziToPinin.java

Those files are moved to ContactsProvider package.

Must be after If786dd286dab47ca1b2ccab38c5fa43ae390c0f7

Bug: 4645142
Change-Id: I774426347e8331fc1c203d5d8e6887e83baffc9f
ndroid/internal/util/HanziToPinyinTest.java
64c42cae4482fe0157e977b8ddd0f2c2436b3f31 18-Apr-2011 Wink Saville <wink@google.com> Rename HierarchicalStateMachine and HierarchicalState to StateMachine and State.

Change-Id: Ib4b33894da75f5f156066092fb145b478e52f7d7
ndroid/internal/util/HierarchicalStateMachineTest.java
ndroid/internal/util/StateMachineTest.java
d3059487abd526b91b912f70939c1c6994eecf52 11-Apr-2011 Wink Saville <wink@google.com> Move ProcessedMessage into HierarchicalStateMachine.

ProcessedMessage is really private to HSM and so moving
it into the HSM class.

Change-Id: Ida476fc7aae5e9bfb6ac632dac979e11f489b6fc
ndroid/internal/util/HierarchicalStateMachineTest.java
6b888d98f7fffe5b87b3d5421d2f9a119899c7dd 15-Nov-2010 Wink Saville <wink@google.com> Move AsyncChannelTest and HierarchicalStateMachineTest to proper directory.

Change-Id: Ifa0f14aad3fee7cad47cdf762c6cff457b56a473
ndroid/internal/util/AsyncChannelTest.java
ndroid/internal/util/HierarchicalStateMachineTest.java
af9d667ccf3e24058214cf4cc0a8aa8bc5100e3c 08-Oct-2010 Kenny Root <kroot@google.com> OBB: rearrange to be entirely asynchronous

Rearrange structure of MountService handling of OBBs to be entirely
asynchronous so we don't rely on locking as much. We still need the
locking to support dumpsys which has been improved to output all the
data structures for OBBs.

Added more tests to cover more of the error return codes.

Oh and fix a logic inversion bug.

Change-Id: I34f541192dbbb1903b24825889b8fa8f43e6e2a9
ndroid/server/MountServiceTests.java
17eb6fb07cc6965f09c51adc70b3c291f57a784a 07-Oct-2010 Kenny Root <kroot@google.com> Add MountService tests and fix a bug it found

Add some MountService tests that are based partially on some stuff done
in PackageManagerTests. This allows us to test the OBB changes in an
easy way.

Also, it found some bugs in the DefaultContainerService connection state
machine, so fix those while we're at it.

Change-Id: I18f38593be754eb32fb6e842f88eec47e2beefce
ndroid/server/MountServiceTests.java
2ad24f944ee68c6e14f3a214f0eef60f8cdb9eb8 05-Oct-2010 Brett Chabot <brettchabot@android.com> Failing test cleanup.

Change-Id: I7cabc6ff2ec1fcb80dede5da03b03622a5bae021
ndroid/internal/os/LoggingPrintStreamTest.java
be81f4f15dad6d690efcab1973d1e174ce3b001b 15-Jun-2010 Brett Chabot <brettchabot@android.com> Move out all framework-tests classes.

Previously tests/framework-tests contained a quarantined set of test classes
that needed access to package-private framework api. Running these tests
normally would cause the dalvik verifier to throw errors.

runtest now has support for turning off the dalvik verifier for frameworks
tests, so move this tests into their recommended location, close to the source
being tested.

Also move policy source into a 'src' folder to accommodate the tests move.

Change-Id: I62f839da185a55bc553b653bf583fd99da438512
ndroid/internal/http/multipart/MultipartTest.java
ndroid/internal/os/LoggingPrintStreamTest.java
0dc59e78e18493aecd37427531d093e800846c3e 02-Apr-2010 Brett Chabot <brettchabot@android.com> 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
ndroid/internal/net/DNParserTest.java
ndroid/internal/net/DomainNameValidatorTest.java
ndroid/internal/util/HanziToPinyinTest.java
1c9131c91f27c8258dfad0a92cee105275f5422a 13-Feb-2010 Dan Egnor <egnor@google.com> Remove all traces of the old checkin service (and its associated parental
control interfaces) from the framework.
oogle/android/net/ParentalControlTest.java
1a44d5dcabc18cd5ef111f732ccff91683a1a093 13-Jan-2010 Neal Nguyen <tommyn@google.com> Phase 2 of test cleanup: moving test files from AndroidTests closer to their sources.

Most of these are file moves; a couple notable exceptions are the changes due to the move, and fixing up test code:
- database/DatabaseCursorTest.java
- database/DatabaseStatementTest.java
- net/UriTest.java
ndroid/internal/util/BitwiseStreamsTest.java
ndroid/internal/util/CharSequencesTest.java
oogle/android/net/ParentalControlTest.java
22e31e5b609136d5bf7d77b1dccd6b042b83ebdf 07-Jan-2010 Neal Nguyen <tommyn@google.com> 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.
ndroid/internal/util/PredicatesTest.java