1319 Commits

Author SHA1 Message Date
Ying Wang
63ae9f3309 Merge "New trick to install bad dex file." 2015-01-20 19:39:43 +00:00
Neil Fuller
d3ef970ca8 am b3f73dc5: am b55011e4: am f9c04f17: Merge "Removing HttpResponseCacheTest"
* commit 'b3f73dc5179532d587f743a9831faff3584c7c5b':
  Removing HttpResponseCacheTest
2015-01-16 10:35:30 +00:00
Neil Fuller
b3f73dc517 am b55011e4: am f9c04f17: Merge "Removing HttpResponseCacheTest"
* commit 'b55011e4265f866604ed0c3ffe0241436682c3d2':
  Removing HttpResponseCacheTest
2015-01-16 10:29:51 +00:00
Neil Fuller
60cf05c1b3 Removing HttpResponseCacheTest
Moving HttpResponseCacheTest.java from
frameworks/base/core/tests/coretests/src/android/net/http
to
cts/tests/tests/net/src/android/net/http/cts

Change-Id: I61a07c53f8d0ef55d35b928f244e4680725b76ef
2015-01-15 16:00:42 +00:00
Ying Wang
f122d90c29 New trick to install bad dex file.
Previously we use LOCAL_JAVA_RESOURCE_FILES to override the normally
generated classes.dex with a bad dex file.
Now as we have moved Java resource processing before running jarjar, dx
would fail for the bad classes.dex inside the classes.jar.
Instead we override the target specific variable PRIVATE_DEX_FILE to
inject the bad dex file.

Bug: 18837479
Change-Id: I73f82c8a15e1d8935d9c2f290ba9456184a56ec7
2015-01-14 16:22:45 -08:00
Neil Fuller
60b268f039 am f5f345cf: am 837261cc: Merge "Fix HttpResponseCacheTest in anticipation of an OkHttp upgrade."
* commit 'f5f345cf929908bd863143815743c44778d29e4a':
  Fix HttpResponseCacheTest in anticipation of an OkHttp upgrade.
2015-01-12 16:44:36 +00:00
Neil Fuller
b7260cbcc4 Fix HttpResponseCacheTest in anticipation of an OkHttp upgrade.
OkHttp recently changed the behavior of their caching with
commit e74e3f3bf744ef7f4d8ee724a7cf2347e486cfab - it is now
neccessary to close the inputstream (or disconnect the
HttpURLConnection) for a response to be cached.

This change is (effectively) a no-op prior to the upgrade.

The behavior is undefined as to whether closing the
input stream is required for caching. OkHttp's new behavior
is consistent with other HttpURLConnection implementations
tried.

(cherry-picked from commit 62d0677b0f6cc5ae48fd0b816ea5caad82264fd6)

Change-Id: Ibe698a443ec98866787ed9da2698322fab856518
2015-01-12 16:05:26 +00:00
Neil Fuller
62d0677b0f Fix HttpResponseCacheTest in anticipation of an OkHttp upgrade.
OkHttp recently changed the behavior of their caching with
commit e74e3f3bf744ef7f4d8ee724a7cf2347e486cfab - it is now
neccessary to close the inputstream (or disconnect the
HttpURLConnection) for a response to be cached.

This change is (effectively) a no-op prior to the upgrade.

The behavior is undefined as to whether closing the
input stream is required for caching. OkHttp's new behavior
is consistent with other HttpURLConnection implementations
tried.

Change-Id: Iaf57371651296ac84850971ef60a9338cead57c0
2015-01-09 11:50:50 +00:00
Elliott Hughes
fcc0788419 am 93241de7: Merge "Remove a bitrotted test." automerge: ba6982a
automerge: 9962ed5

* commit '9962ed55759336642cfaba27e8b2a47822f562fe':
  Remove a bitrotted test.
2014-12-18 02:42:27 +00:00
Elliott Hughes
9962ed5575 am 93241de7: Merge "Remove a bitrotted test."
automerge: ba6982a

* commit 'ba6982a16cb3b9f6196fdac11d1d90a02eb32cfd':
  Remove a bitrotted test.
2014-12-18 02:40:10 +00:00
Elliott Hughes
988fd73499 Remove a bitrotted test.
Change-Id: I4c44f2da0544dbfde8e340f7f477191725c5fb8b
2014-12-17 16:29:04 -08:00
Yohann Roussel
e1c00320b6 Merge "Allow compilation with Jack." 2014-12-04 09:26:54 +00:00
Jeff Sharkey
45207128c5 am 05d455ca: am b9ccc047: Merge "Sanitize display names, keep extensions intact." into lmp-mr1-dev
* commit '05d455ca2b83793a81aac2544c388eec8ac140cd':
  Sanitize display names, keep extensions intact.
2014-12-01 20:00:32 +00:00
Jeff Sharkey
0cce5355b4 Sanitize display names, keep extensions intact.
When creating or renaming files on external storage, sanitize the
requested display names to be valid FAT filenames.  This also fixes
a handful of directory traversal bugs.

Also relax logic around generating display names to allow any
extension which maps to the requested MIME type.  Tests to verify.

Bug: 18512473, 18504132
Change-Id: I89e632019ee145f53d9d9d2050932f8939a756af
2014-12-01 09:38:49 -08:00
Yohann Roussel
8596021c3b am 3e5223fd: am 6829daa4: Merge "Add tests about annotations and enum."
* commit '3e5223fd02d0f096ca50c964378c717adbb2e3e9':
  Add tests about annotations and enum.
2014-12-01 10:12:09 +00:00
Yohann Roussel
6829daa44a Merge "Add tests about annotations and enum." 2014-12-01 09:30:59 +00:00
Conley Owens
e1fe4fa431 am 6a53bd9d: am 69d28437: Merge "RRO tests: fix potential NPE"
* commit '6a53bd9ddbff5dcccec3cd3928e10317007031d3':
  RRO tests: fix potential NPE
2014-11-26 18:14:34 +00:00
Conley Owens
ea796d7028 am c657b302: am ed23786c: Merge "RRO tests: adapt tests to split apks"
* commit 'c657b302e5744e7de9ca142126ba3b428ce5a143':
  RRO tests: adapt tests to split apks
2014-11-26 18:14:28 +00:00
Conley Owens
69d28437d3 Merge "RRO tests: fix potential NPE" 2014-11-26 17:57:09 +00:00
Conley Owens
ed23786cc5 Merge "RRO tests: adapt tests to split apks" 2014-11-26 17:56:48 +00:00
Jeff Sharkey
79ef5ef7a5 am 54c11274: am c0491a2e: Merge "Lightweight checkin output for network stats." into lmp-mr1-dev
* commit '54c11274b5e7ce9f774f7c846d7165563279b96a':
  Lightweight checkin output for network stats.
2014-11-21 22:09:28 +00:00
Jeff Sharkey
55a442e582 Lightweight checkin output for network stats.
Define and print a compact version of network statistics when dump
is requested with the "--checkin" flag.  Defaults to last 24 hours,
but included data can be tweaked with various flags.

Groups together detailed network identities into larger umbrella
terms like "mobile" and "wifi."

Bug: 18415963
Change-Id: I70cf9c828ea5c6e5bb6884837d3608f66fbad2e6
2014-11-21 10:11:10 -08:00
Eric Rowe
496c67031b am 1d76d397: Merge "Fix wifi reconnection tests." into lmp-mr1-dev
automerge: 3b442e2

* commit '3b442e23d859e84fe0550242257294c0b1e37438':
  Fix wifi reconnection tests.
2014-11-21 02:43:06 +00:00
Eric Rowe
37368d7ae4 am 79de0066: Merge "Fix wifi tethering tests." into lmp-mr1-dev
automerge: d2fd1bd

* commit 'd2fd1bd9d631e822b03bfabd41853cc3075f61bf':
  Fix wifi tethering tests.
2014-11-21 02:35:36 +00:00
Eric Rowe
ef1a177e6c Fix wifi reconnection tests.
Bug: 18417638
Change-Id: I1710e8b16d4ae1b32317deb0322a98ad45b4e1aa
2014-11-20 12:32:58 -08:00
Eric Rowe
4902ac4e24 Fix wifi tethering tests.
Bug: 18418170
Change-Id: Ic3e8b74523c6a8b6003c05258447e9a673541248
2014-11-20 11:21:54 -08:00
Yohann Roussel
79b4ee8e97 Add tests about annotations and enum.
For reproduction of https://code.google.com/p/android/issues/detail?id=78144

Bug: 18385117

Change-Id: I23be53a0ae481a501d13adc8abf518ac664a772f
2014-11-20 15:17:43 +01:00
Yohann Roussel
248ef6f9c4 Allow compilation with Jack.
Change-Id: I03ccd6cd92102f03d1316b6a1184c49029c91ea0
2014-11-13 12:05:23 +01:00
Adam Lesinski
ffd4785e3c am 648f8106: am db3d76ab: Merge "Fix ParceledListSlice to enforce the same concrete types among its elements." into lmp-mr1-dev
* commit '648f81064747b58be7ea9efab6d5744d6b49397a':
  Fix ParceledListSlice to enforce the same concrete types among its elements.
2014-11-13 00:40:28 +00:00
Adam Lesinski
db3d76ab68 Merge "Fix ParceledListSlice to enforce the same concrete types among its elements." into lmp-mr1-dev 2014-11-13 00:33:00 +00:00
Jeff Sharkey
bea6648df5 am a2781fda: am 521ca5f8: am 2e700004: am d68b87cd: Recover apps with malformed certificates.
* commit 'a2781fdac332c4f6277a986c88e34daa25a3b5f9':
  Recover apps with malformed certificates.
2014-11-12 23:50:47 +00:00
Jeff Sharkey
521ca5f8fb am 2e700004: am d68b87cd: Recover apps with malformed certificates.
* commit '2e7000040e3d836bb591e29515974817afc49488':
  Recover apps with malformed certificates.
2014-11-12 22:24:24 +00:00
Jeff Sharkey
d68b87cdd4 Recover apps with malformed certificates.
There was a window of time in Lollipop where we persisted certificates
after they had passed through a decode/encode cycle.  The well-written
OpenSSL library was liberal when decoding (allowing slightly malformed
certs to be parsed), but then strict when encoding, giving us
different bytes for effectively the same certificate.

A related libcore change (0c990ab4a90b8a5492a67b2b728ac9a4a1ccfa1b)
now returns the original bytes verbatim, fixing both pre-Lollipop
installs and installs after that change.

This change recovers any apps that had been installed during the
window of time described above by doing a one-time check to see if
the certs are effectively equal.

Bug: 18228011
Change-Id: Ib82bd6db718d0490d7a26c9c1014b7c8457a7f2d
2014-11-12 13:16:06 -08:00
Elliott Hughes
2fa1e48692 am 7c4ef052: Merge "Fix for CharSequenceCreator test case"
* commit '7c4ef052d521d5ccf8acfb03c9332b59ea737cea':
  Fix for CharSequenceCreator test case
2014-11-12 02:53:22 +00:00
Adam Lesinski
3df1c38ee0 Fix ParceledListSlice to enforce the same concrete types among its elements.
Bug:17671747
Change-Id: I896f75738e5b464ccb6c03290f139cc2fa72f966
2014-11-12 02:28:11 +00:00
Jeff Sharkey
58159b320c am 6e2e4b73: Merge "Resurrect dusty PackageManagerTests." into lmp-mr1-dev automerge: 9a2db6b
* commit '6e2e4b7343eeae8ac8439bcf6bf3678609b4a230':
  Resurrect dusty PackageManagerTests.
2014-11-08 03:00:02 +00:00
Jeff Sharkey
9a2db6bfb9 Merge "Resurrect dusty PackageManagerTests." into lmp-mr1-dev 2014-11-08 01:57:02 +00:00
Jeff Sharkey
2a53332343 Resurrect dusty PackageManagerTests.
Mostly just getting them running again, still a few failures related
to native library symlinks that need more investigation.

Bug: 18048725
Change-Id: I4642adab9fb2b9ec1488b700edcee48c09e36005
2014-11-07 16:24:51 -08:00
Mårten Kongstad
840796a3c2 RRO tests: fix potential NPE
Bug: 17765434

Check for null before closing streams.

Change-Id: I651785649575725009f270d4d8eb5f4bf90952a6
2014-11-07 16:07:21 +01:00
Mårten Kongstad
97b5df7643 RRO tests: adapt tests to split apks
The introduction of support for split apks has resulted in the move of
applications from /partition/app/pkg.apk to /partition/app/pkg/pkg.apk.
Update the RRO testrunner to use the new paths.

Bug: 17765434
Change-Id: I6eebfb6f879404077b9447c750ddc395ecd9a547
2014-11-07 16:06:18 +01:00
Mattias Petersson
fc2bd335d1 Fix for CharSequenceCreator test case
The test case testCharSequenceCreator() in TextUtilsTest fails
because the data position is not reset before calling
createFromParcel().

Change-Id: I6d5cc093ff65019ab0d2191bb0bd9c10ae49612b
2014-11-07 12:27:28 +00:00
Yohei Yukawa
d1f629f36b am 42be51bd: Merge "Minimize the number of default enabled IMEs part 4" into lmp-mr1-dev automerge: 50ef3d9
* commit '42be51bd98660b608596e6a8db63735ae552c996':
  Minimize the number of default enabled IMEs part 4
2014-11-07 00:09:50 +00:00
Yohei Yukawa
50ef3d93ad Merge "Minimize the number of default enabled IMEs part 4" into lmp-mr1-dev 2014-11-06 23:45:23 +00:00
Yohei Yukawa
b21220efae Minimize the number of default enabled IMEs part 4
This is a follow up CL for recent attempt to minimize
the number of default enabled IMEs.
- part1: I831502db502f4073c9c2f50ce7705a4e45e2e1e3
- part2: Ife93d909fb8a24471c425c903e2b7048826e17a3
- part3: I6571d464a46453934f0a8f5e79018a67a9a3c845

It turned out that the changes made in part2 and part3 are
a bit overkill, and users will see no software keyboards
in some particular situations. The problem we missed in
the previous CLs is the fact that
InputMethodInfo#isDefault is indeed a locale-dependent
value, hence it may vary depending on the system locale.
Existing unittests also failed to abstract such
locale-dependent nature.

In order to addresses that regression, the selection logic
is a bit widely reorganized in this CL.  Now the logic is
implemented as a series of fallback rules.

Also, unit tests are updated to be able to 1) test the
order of the enabled IMEs, and 2) emulate the
locale-dependent behavior of InputMethodInfo#isDefault
to enrich test cases.

BUG: 17347871
BUG: 18192576
Change-Id: I871ccda787eb0f1099ba3574356c1da4b33681f3
2014-11-06 15:28:06 +09:00
Jeff Davidson
fb68a97620 am dd40ccf3: am b42bdef5: Merge "Rename BROADCAST_SCORE_NETWORKS to BROADCAST_NETWORK_PRIVILEGED." into lmp-mr1-dev
* commit 'dd40ccf36203c740aea3849f54495d1287d02b2b':
  Rename BROADCAST_SCORE_NETWORKS to BROADCAST_NETWORK_PRIVILEGED.
2014-11-05 21:43:10 +00:00
Jeff Davidson
161977998f Rename BROADCAST_SCORE_NETWORKS to BROADCAST_NETWORK_PRIVILEGED.
This is necessary/desired for two reasons:

1. UX around network scoring shipped with L despite lacking underlying
platform support. We do not want network scoring applications to
trigger this UX on L devices, and therefore we must break the contract
of what defines a network scorer so that apps build against the new
contract don't trigger the old UX.

2. As a start towards generalizing the term "score" for a potentially
broader role in the future, though that role is very much undefined.

Bug: 18160480
Change-Id: If228977513e32e45bc44dbeda24aa18436fdfca6
2014-11-04 10:55:49 -08:00
Erik Kline
0d74973a08 am befe778c: Treat optimistic addresses as global preferred.
automerge: 9a8351d

* commit '9a8351d9d7d1e002187fca20fea48d1e9214d829':
  Treat optimistic addresses as global preferred.
2014-10-30 19:10:04 +00:00
Erik Kline
befe778c73 Treat optimistic addresses as global preferred.
If the kernel sends notification of an optimistic address then
treat is a useable address (isGlobalPreferred()).

Note that addresses flagged as IFA_F_OPTIMISTIC are
simultaneously flagged as IFA_F_TENTATIVE (when the tentative
state has cleared either DAD has succeeded or failed, and both
flags are cleared regardless).

Additionally: do not consider RFC 4193 ULA addresses sufficient
for "global preffered".  They are, by definition, of global scope
but not sufficient for global reachability.

Bug: 17769720
Change-Id: I759623b28fd52758f2d4d76d167f3cafd9319d6a
2014-10-29 19:11:58 +09:00
Erik Kline
e9810e8d53 Merge "(re)define the definition of "provisioned"" into lmp-mr1-dev automerge: dd91fb4
automerge: 8fc600d

* commit '8fc600d1a8fc4f9cedceee185d129a19b06001c5':
  (re)define the definition of "provisioned"
2014-10-28 08:54:03 +00:00
Lorenzo Colitti
9d6f408ab5 am 111cc9f5: Merge "Change removeStackedLink to take an interface name." into lmp-mr1-dev
automerge: 35261c4

* commit '35261c4351ea42b2bbd057e852f50158de8eda9c':
  Change removeStackedLink to take an interface name.
2014-10-28 08:50:41 +00:00