1077 Commits

Author SHA1 Message Date
Maxim Siniavine
a305d7229f Fixes for download manager test.
When checking that the download is in progress, check the number number
of bytes downloaded as reported by download manager, rather than looking at the file size.

When waiting for the download to complete rely on the received broadcast.

Bug: 13326931

Change-Id: I4c2431dd71e17602e758bc482be185683040ea98
2014-03-12 18:22:02 -07:00
Xia Wang
6bed599aa7 Merge "Fix state transition verification." 2014-03-08 00:15:53 +00:00
Xia Wang
71aae0b6fd Fix state transition verification.
When there is connectivity state change, the network states could be broadcasted multiple times.
The state transition should consider that.

Bug: 13277256
Change-Id: I3d400900a0e2454f9d198629f1c062cbb15bdcd8
2014-03-06 16:09:05 -08:00
Yohei Yukawa
f06569561f Introduce InputMethodSubtypeArray for memory efficient IPCs
This CL introduces InputMethodSubtypeArray which compresses
multiple instances of InputMethodSubtype to reduce the risk
of TransactionTooLargeException during IPCs.

There are some IMEs which rapidly adding new subtypes into
their supported language list. One problem here is that each
instance of InputMethodInfo internally owns the list of
supported subtypes. Basically it requires additional
200 ~ 300 bytes for each subtype when InputMethodInfo is
transffered via IPCs. We should keep the size less than
100 KB in typical scenario.

With this CL, the list of InputMethodSubtype is marshalled
with GZIP compression. Approximately one InputMethodInfo is
marshalled within 10 KB even when it has 100 subtypes.

No negative performance impact is observed so far. The cost of
decompression seems to be compensated by another optimization
in this CL. Actually marshalling cost is reduced with this CL
by caching the compressed data on demand.

BUG: 12954290
Change-Id: Ibb2940fcc02f3b3b51ba6bbe127d646fd7de7c45
2014-03-06 11:25:57 +09:00
Xia Wang
0df3cdbc81 Merge "Add timer to wait for screen off" 2014-03-04 00:51:37 +00:00
Xia Wang
df362d264c Add timer to wait for screen off
bug#: 13278052

Change-Id: Ic4dc847f3f3fe86750343ffabedb13dbeb4f61a7
2014-03-03 15:39:46 -08:00
Yohei Yukawa
c18cd393f6 Make sure InputMethodInfo implements Parcelable transitively
This CL adds one more test to make sure InputMethodInfo
implements Parcelable correctly. This test makes sure that
one can marshall and unmarshall again from an unmarshalled
copy of InputMethodInfo.

BUG: 12954290
Change-Id: I5aa1552a8089fe0bac54513ba224e5bfc494be97
2014-03-03 14:14:10 +09:00
Yohei Yukawa
589800485d Add unit test for InputMethodInfo
This CL adds a unit test to make sure that InputMethodInfo
implements Parcelable correctly.

BUG: 12954290
Change-Id: I0abe8c266b4b035bf8ef4688d11069b355fabe9f
2014-02-27 17:32:48 +09:00
Yohann Roussel
1ec1370a5d Merge "Add support.multidex tests app for an update bug." 2014-02-26 16:23:34 +00:00
Yohann Roussel
05e2a94c8b Add support.multidex tests app for an update bug.
The failing scenario is
- install v1
- run
- update to v2
- update to v3
- run
last run was failing with initial multidex library versions because
it's still running on v1 extracted secondary dex files.

Change-Id: Id9811371fc70b0a4e9b49de913ee38d18699b21d
2014-02-26 17:02:13 +01:00
John Spurlock
8a985d24ce Tabs -> spaces in frameworks/base.
Change-Id: I5a84e8e93ac99b5ed0212b37bf66efa5e53864be
2014-02-25 09:49:29 -05:00
Narayan Kamath
b2e0733fe6 am 94b7c749: am 37e6af75: am 92a09fbd: am a14d9c31: Merge "Move Json{Reader,Writer} test to cts."
* commit '94b7c749fd0bc5bbd80dbabfd412c2a212584343':
  Move Json{Reader,Writer} test to cts.
2014-02-17 18:32:44 +00:00
Narayan Kamath
94ccb6bf95 Move Json{Reader,Writer} test to cts.
These tests aren't really run automatically (or perhaps
even manually) in their present location, and increasing
CTS coverage is never a bad thing.

Change-Id: I81cce1211021011dca551fde62e725e177ca4df0
2014-02-17 17:51:43 +00:00
Dianne Hackborn
f75f6e323c am 32acb5e9: am 97de064a: am 133f6826: am 89492190: Merge "Runtime resource overlay, iteration 2, test cases"
* commit '32acb5e9d130ac858f34d83526e7460c624b41c7':
  Runtime resource overlay, iteration 2, test cases
2014-02-12 23:01:30 +00:00
Jeff Sharkey
ebf8ad5d91 Update DrmOutputStream to use raw FileDescriptor.
This allows DownloadManager to use FDs, paving the way for downloading
directly to content:// Uris.

Also return flag indicating if deleteOlderFiles() actually deleted
anything.  Update tests to verify.

Bug: 5287571
Change-Id: I2579e5e2113f31b2860d7b021bd61c91b6310963
2014-02-06 09:47:38 -08:00
Maxim Siniavine
b15c0e512c Using large file for download manager test.
This should decrease the chance of the file being downloaded too quickly and
confusing the test.

Change-Id: I8f4debbb51798162493d6a8005e1aa142738dbd4
2014-02-04 18:19:08 -08:00
Mårten Kongstad
ad6ed950db Runtime resource overlay, iteration 2, test cases
Add automated test cases for runtime resource overlay, iteration 2.

The test cases are a mixture of 'adb shell' commands and regular
instrumentation tests. The device is rebooted between tests to setup
different overlay scenarios for framework-res.apk.

To verify Runtime resoure overlay, iteration 2, run
    $ frameworks/base/core/tests/overlaytests/testrunner.py

For a list of supported options, run
    $ frameworks/base/core/tests/overlaytests/testrunner.py --help

Change-Id: I692aa1a7ad073efd116b24f9ec7f197dfd65dfef
2014-02-03 11:20:33 +01:00
Jeff Sharkey
4ca728c064 Detect removable and emulated secondary storage.
Also rename existing secondary storage API to match naming
convention in rest of class.

Bug: 11536709
Change-Id: I2684c817de4982b414893d2d9927a21e3f171d53
2014-01-15 17:00:56 -08:00
Narayan Kamath
98fcf484ef am d2098682: am 3f2843a4: am c47b7d37: am 9d4ebdca: am cf1aa551: Merge "XmlUtils#readThisMapXml should handle null keys."
* commit 'd2098682ab269d311dd482a38e8557df6717ee17':
  XmlUtils#readThisMapXml should handle null keys.
2014-01-07 10:17:04 +00:00
Narayan Kamath
f748257eee XmlUtils#readThisMapXml should handle null keys.
Both readThisValueXml & writeThisValueXml have been
implemented to handle values with "null" names.

Change readThisMapXml to allow such names as well, and
map them to the null key in the resulting HashMap.
readThisListXml and readThisSetXml already support
null names.

bug: https://code.google.com/p/android/issues/detail?id=63463

Change-Id: I1c93976656e45e7733113eb67d29b6bad5d25f1f
2014-01-06 11:18:21 +00:00
Lorenzo Colitti
4598ea4e5e am 263c4788: am 30253d7a: am 2daa0c93: Merge "Add address flags and scope to LinkAddress."
* commit '263c4788dcf45f104f8668fd6621d1a7c39689b9':
  Add address flags and scope to LinkAddress.
2013-12-09 18:34:44 +00:00
Lorenzo Colitti
2daa0c93c4 Merge "Add address flags and scope to LinkAddress." 2013-12-07 02:43:04 +00:00
Lorenzo Colitti
64483947fd Add address flags and scope to LinkAddress.
This is necessary so that the framework can know whether an IPv6
address is likely to be usable (i.e., if it's global scope and
preferred). Also, it will simplify the address notification
methods in INetworkManagementEventObserver, which currently take
the address, the flags, and the scope as separate arguments.

1. Add flags and scope to the class and update the unit test.
   Use the IFA_F_* and RT_SCOPE_* constants defined by libcore.
   Since most callers don't know about flags and scope, provide
   constructors that default the flags to zero and determine the
   scope from the address. Addresses notified by the kernel will
   have these properly set. Make multicast addresses invalid.
   Update the class documentation.
2. Provide an isSameAddressAs() method that compares only the
   address and prefix information between two LinkAddress
   objects. This is necessary because an interface can't have
   two addresses with the same address/prefix but different
   flags.
3. Update LinkProperties's addLinkAddress and removeLinkAddress
   to identify existing addresses to add/remove using
   isSameAddressAs instead of implicit equals(). Specifically:
   - If addLinkAddress is called with an address that is already
     present, the existing address's flags and scope are updated.
     This allows, for example, an address on an interface to go
     from preferred to deprecated when it expires, without it
     having to be removed and re-added.
   - If removeLinkAddress is called with an address that is
     present but with different flags, it deletes that address
     instead of failing to find a match.
4. Update the INetworkManagementEventObserver address
   notification methods to take just a LinkAddress instead of
   LinkAddress, flags, and scope. While I'm at it, change the
   order of the arguments for consistency with the other
   functions in the interface.

Change-Id: Id8fe0f09a7e8f6bee1ea3b52102178b689a9336e
2013-12-06 13:54:35 +09:00
The Android Open Source Project
ebcb32f58a Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
2013-12-05 13:10:46 -08:00
Lorenzo Colitti
66c621496f am 13d9dfb4: am 86570409: am 453a5233: Merge "Minor changes to LinkAddress."
* commit '13d9dfb495db1431623c712b36cac1fe2f3c2fc0':
  Minor changes to LinkAddress.
2013-12-04 01:35:11 +00:00
Lorenzo Colitti
86570409a2 am 453a5233: Merge "Minor changes to LinkAddress."
* commit '453a5233086b216f2a95d0879954a2af39279095':
  Minor changes to LinkAddress.
2013-12-03 17:26:06 -08:00
Lorenzo Colitti
e1ad1849f3 Minor changes to LinkAddress.
1. Simplify the parceling code. Since the InetAddress inside a
   LinkAddress can never be null, we don't need to special-case
   the case where it is.
2. Add / update method documentation.
3. Write a unit test.

Change-Id: Iba0a8cecc683d55d736419965e72ee33dd66dc22
2013-12-03 19:46:36 +09:00
Maxim Siniavine
5267bb247f am 134b9146: am d66cbc0b: am 598a7aed: Merge "Fix BandwidthTest to report correct stats." into klp-dev
* commit '134b91469c2894477dda786c1572b80b596c62ac':
  Fix BandwidthTest to report correct stats.
2013-11-07 21:30:31 -08:00
Maxim Siniavine
ca76692417 Fix BandwidthTest to report correct stats.
The test used to report report stats for a random uid. Fixed it to report
stats for the Instrumentation uid or download manager uid, depending on the test.

Change-Id: I089162c19e25cbf0dfb05645a9a1018dd7567423
2013-11-06 12:11:07 -08:00
Narayan Kamath
0b3bcedccc Merge "Get rid of coretests/android.text.HtmlTest" 2013-10-23 17:35:49 +00:00
John Spurlock
e27564fbae am 759bc4f4: am 7539a5af: am 2f566900: Merge "Ensure the simple CAB appears below the status bar." into klp-dev
* commit '759bc4f421e01460cff92522bf70d52c53b79e85':
  Ensure the simple CAB appears below the status bar.
  Add 'no system permission' test app.
2013-10-23 10:24:23 -07:00
Narayan Kamath
515662fa6f Get rid of coretests/android.text.HtmlTest
This is a strict subset of android.text.cts.HtmlTest and
is currently completely broken (due to ltr changes).

Change-Id: If8d5c8a03f96ef3712cd398f297c8872d91403bb
2013-10-23 15:36:18 +01:00
Brett Chabot
305258da75 Add 'no system permission' test app.
Used in PackageManagerOTATests to verify upgraded system apps
are granetd new permissions.

Bug 11271490

Change-Id: Idbc07bc043d06ea15dc41285ecbfb8186a7ecc95
2013-10-22 04:58:50 +00:00
Chris Wren
fd5f566db8 add a test for BackupData helpers.
Bug: 10821481
Change-Id: I3e28123d36927ae4a22d26378b8bf1cd4e87cfd2
2013-09-25 19:33:21 +00:00
Xia Wang
b2ca5bf607 am bac2fcac: am 326f4505: Merge "Update the Connectivity Manager test suit to use InstrumentationTestCase." into klp-dev
* commit 'bac2fcacbef1366327aa3450d6be942688fb6a68':
  Update the Connectivity Manager test suit to use InstrumentationTestCase.
2013-09-16 14:19:18 -07:00
Xia Wang
326f4505e0 Merge "Update the Connectivity Manager test suit to use InstrumentationTestCase." into klp-dev 2013-09-16 21:11:31 +00:00
Igor Murashkin
8f64e3cd42 am 14297141: am 5cf86aa7: Merge "media: Update ImageReader to remove MaxImagesAcquiredException" into klp-dev
* commit '142971418c8e9ca539dae40f3c2532956f258e6b':
  media: Update ImageReader to remove MaxImagesAcquiredException
2013-09-16 14:08:23 -07:00
Xia Wang
19306af73a Update the Connectivity Manager test suit to use InstrumentationTestCase.
- Remove ConnectivityManagerTestActivity as the test activity could be destroyed
  after a system config change, which cause test failure in the wifi stress test.
- Update all tests to use InstrumentationTestCase, which instruments the test package.

Bug : 10426067

Change-Id: Ibf6f1f7cffd7a7eabc4cc63c7e033b59274b724e
2013-09-16 14:07:25 -07:00
Igor Murashkin
5454e3ddcc am 720b1fce: am 26cb5fd5: Merge "media: Update ImageReader APIs" into klp-dev
* commit '720b1fcecd6c21bf4fbe6d3822e52c8a092b93c4':
  media: Update ImageReader APIs
2013-09-16 13:24:58 -07:00
Igor Murashkin
e3351f1942 media: Update ImageReader to remove MaxImagesAcquiredException
* acquiring images now throws IllegalStateException instead of
    MaxImagesAcquiredException

Bug: 10691447
Change-Id: I7ce68f990fb96703705b9181012a28633fea0b7a
2013-09-13 23:27:44 -07:00
Igor Murashkin
5e712064df media: Update ImageReader APIs
Bug: 10461757
Change-Id: Ic04e4c41965e3d417b29004f3f08e0cd56b8f4cb
2013-09-12 16:57:57 -07:00
Xia Wang
486ad2a7ba am 6c2ad7ac: am b32a8042: Merge "Use setAirplaneMode() API for Connectivity Manager tests" into klp-dev
* commit '6c2ad7ac97ecc23525ff5ad499edaa9316c230e9':
  Use setAirplaneMode() API for Connectivity Manager tests
2013-09-11 17:31:04 -07:00
Xia Wang
0076729d38 Use setAirplaneMode() API for Connectivity Manager tests
Change-Id: I2e35c58e4101b6b5fe9efdb5adad922402d38b6f
2013-09-11 14:44:30 -07:00
Narayan Kamath
d6b37fdf6c Allow SSL caches to be installed directly on SSLContexts.
This allows clients to enable ssl session caching without
having to use SSLCertificateSocketFactory.

Change-Id: Id63b8b31f51c96e73beefe9ecc5fd0cf0a1852c6
2013-09-11 08:49:59 +00:00
Jeff Sharkey
af9272349f Merge changes I7b3f4c68,I9f022a08 into klp-dev
* changes:
  Rename offer() to add(), remove/hide some APIs.
  Sort order is sticky for session, back leaves.
2013-09-10 04:40:41 +00:00
Xia Wang
11f2b42d8c Remove system user id for cm tests
Change-Id: I51f500c8e7b4e2963093e20c6f20bcfe020995c9
(cherry picked from commit 575495c29007503566e28004bf60018a824b1f1b)
2013-09-10 01:07:33 +00:00
Jeff Sharkey
b7757a6b32 Rename offer() to add(), remove/hide some APIs.
Change MatrixCursor offer() to add() based on review feedback.  Remove
some now-unused XML metadata.  Hide document creation, since it's not
supported in initial version.

Bug: 10577809, 10461706, 10678563
Change-Id: I7b3f4c6899c28f633471ef816bee22bf032aa0d2
2013-09-09 17:55:10 -07:00
Robert Greenwalt
69df743f74 Fix the build.
Change-Id: Ia5d29de9db7ea8fd467b3bde551a8cfb95877b41
2013-09-06 16:49:37 -07:00
sy.yun
9d9b74a900 Setting MTU size for specific network.
Able to config network specific MTU size. Normally, the default size of MTU is 1500.
 US - ATT 1410, TMUS 1440, SPRINT 1422
 KR - SKT 1440, KT 1450, LGU+ 1428
 JP - KDDI 1420, SoftBank 1340
 CA - RGS 1430, FIDO 1430, MTS 1430, BELL 1358, SaskTel 1358
 AU - TEL 1400

Bug: 10195070
Change-Id: Ie18650b37a3d44af944f2dae4aa97c04fb12cd5e
2013-09-06 15:26:19 -07:00
Lorenzo Colitti
22f407b11e Add a function to replace all the link addresses.
Bug: 10232006
Change-Id: I689ce4735999dac2ab5e1fae09d80b1f734292a1
2013-09-05 13:02:54 +09:00