1013 Commits

Author SHA1 Message Date
Elliott Hughes
b8292830f7 resolved conflicts for merge of a920f25f to jb-mr2-dev-plus-aosp
Change-Id: I3349f8d2e6715171e2677c1385122ceb2810c1f6
2013-06-28 16:50:13 -07:00
Elliott Hughes
a920f25fe5 resolved conflicts for merge of fca0f92e to stage-aosp-master
Change-Id: I4791f0ffa324a313b8390fbde6d8f82f716ecf74
2013-06-28 16:41:19 -07:00
Elliott Hughes
d396a448b2 Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
Bug: 3484927
Change-Id: I5d136d2ee629588538602766a182ae14ce5fc63c
2013-06-28 16:24:48 -07:00
Kenny Root
67f7d8fbd5 am 6c042b6d: am a5a2de55: Merge "Add ALPN support to SSL socket factory"
* commit '6c042b6d678edea0f936da994f85ba62f9a1950e':
  Add ALPN support to SSL socket factory
2013-06-27 14:55:41 -07:00
Kenny Root
6c042b6d67 am a5a2de55: Merge "Add ALPN support to SSL socket factory"
* commit 'a5a2de55082b1f2a9ec0b99962a88063ac6d1bbf':
  Add ALPN support to SSL socket factory
2013-06-27 14:52:17 -07:00
Kenny Root
100d729026 Add ALPN support to SSL socket factory
This adds the ability to use Application-Layer Protocol Negotiation
(ALPN) through the SSLCertificateSocketFactory. ALPN is essentially
like Next Protocol Negotiation (NPN) but negotiation is done in the
clear. This allows the use of other protocols on the same port (e.g.,
SPDY instead of HTTP on port 80).

Change-Id: Ie62926b455e252c4c98670bbbecc1eb5c6f13990
2013-06-26 10:35:39 -07:00
Xia Wang
7ea4e277fd am 8fcb169f: am edc3bb66: Disable a flaky test case
* commit '8fcb169f7989123f993adfac5894d1ad5f35ed0b':
  Disable a flaky test case
2013-06-17 17:51:57 -07:00
Xia Wang
edc3bb661e Disable a flaky test case
Change-Id: I4ef780ed0c5394b67aa002baefc00e835018c4a0
2013-06-17 17:14:10 -07:00
Xia Wang
af19aef675 am ac561b8b: Merge "Add option to set frequency band" into jb-mr2-dev
* commit 'ac561b8bdd52a6ac5e4f9b92f1033cd385f149d8':
  Add option to set frequency band
2013-06-03 21:26:21 -07:00
Xia Wang
1c6911ac1d Add option to set frequency band
- The reason to add the test runner is to set frequency band when the runner
  is created which happens before the test activity is actually launch.
  As the test activity will disable/enable wifi when it
  is created, this cycle will ensure the frequency is set successfully.

Change-Id: Ie9de3d8bab3dda7d4bb9ba604ddd5cb33164e397
2013-05-31 14:10:12 -07:00
Xia Wang
3cbe3b271c am 4550dba5: Merge "Add wifi association test" into jb-mr2-dev
* commit '4550dba53d49a689de6000e5e5864c28f91dd945':
  Add wifi association test
2013-05-08 15:21:12 -07:00
Xia Wang
58a5db37b3 Add wifi association test
Change-Id: I1f3f49a1857835522c9c5e02ed4f530b83df1d02
2013-05-08 11:27:27 -07:00
Kenny Root
e9ae6822a8 resolved conflicts for merge of 1f6e789b to jb-mr2-dev-plus-aosp
Change-Id: I06c05d637613215b6d83df3e29cd495f6a5a0176
2013-04-29 23:09:03 -07:00
Kenny Root
12e752225a Track change to JSSE provider
Change-Id: I35e824e47ad758ab6408e91e2ba5dcda053a82f5
2013-04-29 15:15:27 -07:00
Maxim Siniavine
5877687b38 Make download manager tests more reliable.
Use larger files in tests. Using small files fails because downloads
complete too quickly. Using files that are too large fails because
downloads take too long.

Change-Id: I0786ece21e0acffa09dd8d85abf70ec4cde5e477
2013-04-09 15:08:43 -07:00
Kenny Root
75827d4a31 Merge "Add direct API to get ManifestDigest" into jb-mr2-dev 2013-04-03 20:27:43 +00:00
Kenny Root
6c918cec31 Add direct API to get ManifestDigest
This makes it faster for applications that don't want to collect all the
certificates but do want the AndroidManifest.xml digest.

Bug: 8528639
Change-Id: Ide9498d0981188960af194a9568387337c075bcc
2013-04-02 14:22:03 -07:00
Lorenzo Colitti
213f98b6fe Fix LinkProperties's equals() method.
LinkProperties's equals() method was broken by the addition of
stacked interfaces. The reason was that equals() was checking
the equality of mStackedInterfaces.keys(), which is just an
enumeration, instead of mStackedInterfaces.keySet(), which
actually contains the keys. The test was failing, but I didn't
notice.

Fix the bug and make the test check the objects more in depth
so it can give more detailed error messages when equals() fails.

Bug: 8276725
Change-Id: Ie990bd75f641c28e63e54d953dcd0f4de13f7c9f
2013-04-02 10:08:59 +09:00
Lorenzo Colitti
cdee9727e2 Merge "Make isHostRoute match only host routes" into jb-mr2-dev 2013-03-27 21:59:10 +00:00
Chiao Cheng
972a9255a7 Merge "Allow leading slash in path argument for addURI() method." into jb-mr2-dev 2013-03-27 17:18:30 +00:00
Lorenzo Colitti
fdadc4e242 Make isHostRoute match only host routes
Currently, isHostRoute returns true iff the gateway address is
the unspecified address (0.0.0.0 or ::). Thus, it will return
true for any route that has no gateway (e.g., a route pointing at
a point-to-point interface), even if the route is not a host
route.

Fix this by checking the prefix length instead. This should be
safe because:

1. mDestination cannot be null, since it's created using new.
2. Host routes created using makeHostRoute (which is what
   ConnectivityService calls) always have the correct prefix
   lengths (/32 or /128) set.

Bug: 8276725
Change-Id: I14285398823fa6c312349128c7cc216cad4a84c9
2013-03-27 19:41:06 +09:00
Jeff Sharkey
8fa9bb5210 Benchmarks for IndentingPrintWriter.
Current timings on a mako listed below, which show minimal overhead
compared to writing directly. The increased code readability and
automatic indenting is worth the overhead.

Also worth noting is that writing concatenated strings is
substantially faster than printing components separately.

           benchmark      us linear runtime
       ComplexDirect 10712.7 =========================
    ComplexIndenting 12623.7 ==============================
       PairIndenting    45.8 =
             PairRaw    82.1 =
        SimpleDirect   282.2 =
     SimpleIndenting   294.4 =

Change-Id: I7c38690c14b017fa46248ebb0be69f6beff03371
2013-03-26 20:16:44 -07:00
Chiao Cheng
ef23bf198d Allow leading slash in path argument for addURI() method.
The original documentation for this class indicated a leading slash was possible
but the code did not support it.  Since then, the docs were changed to reflect
what the code does.

The purpose of this change is to allow the use of uri.getPath() as an argument.
With this change, the following can be done

matcher.addURI(ContactsContract.AUTHORITY,
        ContactsContract.CONTENT_FILTER_URI.getPath(), CONTACTS_FILTER)

instead of

matcher.addURI(ContactsContract.AUTHORITY,
        "contacts/filter", CONTACTS_FILTER)

Change-Id: I76a9e3133365be9fe7a8de86eae57f9eea1cd2a3
2013-03-26 11:20:47 -07:00
Chet Haase
be19e030a1 Add auto-cancel ability to ObjectAnimator
Add a method that enables a new auto-cancel option to
ObjectAnimator. When set, any ObjectAnimator (when started) will
cause any running ObjectAnimator instance (with that flag set)
that has the same target and properties to cancel() itself prior
to starting the new one.

Issue #7426129 Add auto-cancel to animators

Change-Id: I586659c365289cdb9afb6c416bdbaf5630477149
2013-03-20 09:06:20 -07:00
Elliott Hughes
6d3b13384e am c9fe40ea: am 71558f1f: Merge "Fix times in debugging output to use H rather than k."
* commit 'c9fe40ead549ff18393c0cc5c6e3bd67548f9da6':
  Fix times in debugging output to use H rather than k.
2013-03-19 10:13:34 -07:00
Elliott Hughes
64a277d837 Fix times in debugging output to use H rather than k.
Bug: 8359981
Change-Id: I4fccf3ed7e469b77f6e755dacbcd025005390505
2013-03-18 17:47:22 -07:00
Lorenzo Colitti
b91e50c266 Fix build.
Change-Id: Iac84a5f35d7fcaebd096e605a4590f8c90fe97b0
2013-03-16 02:42:30 +09:00
Lorenzo Colitti
419a4ce9e4 Add stacked interfaces to LinkProperties.
Bug: 8276725
Change-Id: I2f592d4c690e9af0459ae742ab16107a10d89353
2013-03-15 14:35:32 +09:00
Jeff Sharkey
d9526907d1 Move deleteOlderFiles() to framework, tests.
Supports both age and count based constraints.  Added light docs and
tests to verify behavior.

Bug: 8387555
Change-Id: If4d0dac8bc54ce705c2a339bc09a60ea748728b8
2013-03-14 15:04:12 -07:00
Lorenzo Colitti
1994bc14ab Unit test routes with interfaces in LinkProperties
Change-Id: Ie41a56bc9863ee72f4d7a8f72e436fc57e57b1af
2013-03-12 15:01:05 -07:00
Lorenzo Colitti
45b9a5bb93 RouteInfo changes.
- Add the interface name.
- Fix a bug where a default route would match an address of
  another protocol (e.g., 0.0.0.0/0 would match 2001::).
- Tweak the hashCode method.
- Write a unit test.

Change-Id: Ida8266de440a9b1d9eaa132f182b9f1ce8978c44
2013-03-08 16:41:25 -08:00
Elliott Hughes
09ed05ceae am 4a1bd464: am d0d1be2d: Merge "Explain why the frameworks/base DateUtilsTest isn\'t merged with CTS\' DateUtilsTest."
* commit '4a1bd4640c5e915ed1ebd320a515725e31992545':
  Explain why the frameworks/base DateUtilsTest isn't merged with CTS' DateUtilsTest.
2013-03-07 15:41:14 -08:00
Elliott Hughes
025148cc4d Explain why the frameworks/base DateUtilsTest isn't merged with CTS' DateUtilsTest.
Change-Id: Icbdb4e9133a9ae1c1b37f822367e1ac86e9e36cb
2013-03-07 14:30:17 -08:00
Jeff Sharkey
94c91dca55 ArrayUtils.indexOf(), containsAll() with tests.
Change-Id: I040164d4e45126e4a6c1df54bd114f47951da560
2013-03-06 16:28:36 -08:00
Irfan Sheriff
d99375528c Merge "Clean up scan handling" 2013-02-22 18:40:24 +00:00
Irfan Sheriff
bcc97ca43a Clean up scan handling
Remove obsolete active/passive scan handling - drivers always
do active scan.

Also, remove AP_SCAN hack for preventing connections and use
the TYPE=ONLY scan.

Bug: 8158647
Change-Id: I8f70e19219ad789b7501a40529bcd6b6524739e8
2013-02-22 09:23:55 -08:00
Wink Saville
fb053cde74 am f7bf667d: am b5a1ce2f: Merge "Allow three digit phone numbers"
* commit 'f7bf667d4a5e8e3fca75640f6352724826705128':
  Allow three digit phone numbers
2013-02-21 15:19:53 -08:00
Wink Saville
b5a1ce2f5d Merge "Allow three digit phone numbers" 2013-02-20 23:04:32 +00:00
Wink Saville
1c2acdc6e8 Fix broken test.
Change-Id: I8c5649c9b3d917cf13b94d49da44eaf510643df6
2013-02-15 15:20:37 -08:00
Irfan Sheriff
46e0931080 Fix connectivitymanagertest
Change-Id: If5687eacec0f502c39b102eb5cf7d9383f0ec056
2013-02-15 14:55:15 -08:00
Bin Zhu
a37fc575a4 Allow three digit phone numbers
The comment for the PHONE pattern says:

"<digit><digit|sdd>+<digit>"

But the actual pattern requires that the string contains
more than that. A phone number should be allowed to be
three digits.

Change-Id: I86d2f3d634cd0c1654dad9814906f151055dc23a
2013-02-15 11:54:41 +01:00
Jeff Sharkey
9a2c2a6da9 Parse network stats using native code.
Switch to parsing detailed network stats with native code, which
is 71% faster than ProcFileReader.

Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
2013-02-13 17:40:49 -08:00
Wink Saville
35185a9ccf Fix broken test.
Change-Id: I8c5649c9b3d917cf13b94d49da44eaf510643df6
2013-02-12 17:07:21 -08:00
Jeff Sharkey
92be93a94e Improve TrafficStats UID APIs.
Deprecate transport layer statistics, leaving only the summarized
network layer statistics.

Improve documentation to be clear about layers where measurements
occur, and their behavior since boot.  Under the hood, move to using
xt_qtaguid UID statistics.

Bug: 6818637, 7013662
Change-Id: I9f26992e5fcdebd88c671e5765bd91229e7b0016
2013-02-07 13:59:26 -08:00
Maggie Benthall
d2726582f1 Fix for SettingsProvider to query for correct user.
insertForUser takes a specified user and attempts to adjust that user's
settings, first looking at their existing settings to determine the difference.
However it was querying the settings for the calling user, rather than for
the user whose settings were being changed.

Also add a test that exercises the fix.

Change-Id: I6ed6fd79154ac1b6e6ab880769ac9081dfff6b80
2013-02-06 18:53:47 -05:00
Xia Wang
eb22ed9171 Fix Connectivity Manager test:
-Due to security change, the test pid is not allowed to broadcast
ACTION_AIRPLANE_MODE_CHANGED intent, which is a pretected intent and
can only be sent by the system, change the test app to use system user id.

Change-Id: I2525e30c13a97d5fcab0fc9537e8fac18e0b5457
2013-02-01 16:44:57 -08:00
Jeff Sharkey
8e7b3b15f7 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
2013-01-31 18:27:00 -08:00
Xia Wang
c5401d4451 am 63d25816: am 599f9611: am f3ef10b1: am 2297d1e7: Merge "Fix WiFi test:" into jb-mr1.1-dev
# Via Android Git Automerger (3) and others
* commit '63d258167637309c0c85725ecc9112a88bf57824':
  Fix WiFi test:
2013-01-30 19:03:39 -08:00
Xia Wang
63d2581676 am 599f9611: am f3ef10b1: am 2297d1e7: Merge "Fix WiFi test:" into jb-mr1.1-dev
# Via Android Git Automerger (2) and others
* commit '599f9611aab587d13b4d7bac94fc628c675591a1':
  Fix WiFi test:
2013-01-30 19:01:14 -08:00
Xia Wang
f2991add02 Fix WiFi test:
-- In environment where there are too many APs, sometimes, the AP will not show in the scan list.
    Part of the reason is due to the change that the scanning on each frequency is shortened to save power.
    to avoid that, change the test to connect without scanning.

 -- Increase the timer to wait for WiFi to be connected

Change-Id: If1a72607b3c7ad13dbbf788607665986eaf5b6b3
2013-01-30 18:52:27 -08:00