1289 Commits

Author SHA1 Message Date
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
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
Erik Kline
dd91fb4474 Merge "(re)define the definition of "provisioned"" into lmp-mr1-dev 2014-10-28 07:53:37 +00:00
Lorenzo Colitti
f3cab63ef2 Change removeStackedLink to take an interface name.
This simplifies callers.

Also remove all "implementations" of addStackedLink and
removeStackedLink except the one in LinkProperties, because they
are unused.

Bug: 12111730
Change-Id: Ie294b855facba4b1436299dcb3211b72d9ba448e
2014-10-28 15:13:57 +09:00
Erik Kline
d3b9fd33c6 (re)define the definition of "provisioned"
Specifically:

    [1] provide a hasIPv4(), and
    [2] a hasIPv6()

each of which requires an IP address, a default route, and
address-family-specific DNS servers to evaluate to true.

Additionally:

    [3] redefine isProvisioned() to return the logical OR
        of [1] and [2] above.

Any external caller can still use any of the has*() methods to
construct its own, different definition of "provisioned".

Bug: 17769720
Change-Id: Ia692fb8508484ff403d3920c94d0e1db4563f807
2014-10-28 14:47:42 +09:00
Yigit Boyar
ab43570f5d am f3ab4410: am fa9ed8ca: Merge "Added a generic configuration and theme based cache" into lmp-mr1-dev
* commit 'f3ab441090a05bd428b9488b2e8e175f33bd6fe9':
  Added a generic configuration and theme based cache
2014-10-23 22:04:11 +00:00
Yigit Boyar
fa9ed8ca0a Merge "Added a generic configuration and theme based cache" into lmp-mr1-dev 2014-10-23 21:06:24 +00:00
Yigit Boyar
d422dc358f Added a generic configuration and theme based cache
For now, only animators use it but we can consider migrating
drawable cache to it as well.

Bug: 17456416
Change-Id: I571b96856805edb171f0fc52e6bff5a365f46b70
2014-10-23 11:46:01 -07:00
Eric Rowe
b85d5ac85a am 868878bd: am 46ca296c: am d2983ced: am 34766d9c: Merge "Add delay in ping connectivity test retry" into lmp-dev
* commit '868878bd91583590badd9aae882247358bfd695f':
  Add delay in ping connectivity test retry
2014-10-23 15:59:42 +00:00
Eric Rowe
58a3ddf5aa Add delay in ping connectivity test retry
Change-Id: Id6e36f42b2a2d84605185780fb7a3f2144e7a9b9
2014-10-22 18:34:43 -07:00
Neil Fuller
1f2ad9eb74 am dfcf0655: am 09fd5a18: Merge "Replacing FloatMath native implementation with calls to Math"
* commit 'dfcf065505a12aa358af5cd2607fd355eee964c4':
  Replacing FloatMath native implementation with calls to Math
2014-10-20 10:16:29 +00:00
Neil Fuller
38b63f0ede am dfcf0655: am 09fd5a18: Merge "Replacing FloatMath native implementation with calls to Math"
* commit 'dfcf065505a12aa358af5cd2607fd355eee964c4':
  Replacing FloatMath native implementation with calls to Math
2014-10-20 10:16:08 +00:00
Nick Kralevich
7b3db39aa4 Replacing FloatMath native implementation with calls to Math
On modern versions of Android running in AOT mode
FloatMath is slower than Math. Calls to Math.sqrt(),
etc. are replaced by intrinsics which can be as small
as a single CPU opcode.

When running in interpreted mode the new
implementation is unfortunately slower, but I'm
judging this acceptable and likely to be improved
over time. This change saves a small amount of native
code.

Example timings:

Mako AOSP AOT:

Method: Original / New / Direct call to Math
ceil: 596ns / 146.ns / 111ns
sqrt: 694ns / 56ns / 25ns

Mako AOSP interpreted:

Method: Original / New / Direct call to Math
ceil: 1900ns / 2307ns / 1485ns
sqrt: 1998ns / 2603ns / 1788ns

Other calls Mako AOT:

Method: Original / New
cos: 635ns / 270ns
exp: 566ns / 324ns
floor: 604ns / 150ns
hypot: 631ns / 232ns
pow: 936ns / 643ns
sin: 641ns / 299ns

The advice to use Math directly, in preference to
FloatMath, is still good. FloatMath will be deprecated
separately.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: If07fcbd78543d13bc6d75f9743f999860e8d58d7
2014-10-20 09:24:11 +01:00
Elliott Hughes
870367567a am 84e6d466: am 4cd671e4: Merge "Revert "Replacing FloatMath native implementation with calls to Math""
* commit '84e6d466edc2aba711f90431a1cd209d11c0e70d':
  Revert "Replacing FloatMath native implementation with calls to Math"
2014-10-18 20:54:05 +00:00
Elliott Hughes
5fc9f9c293 am 84e6d466: am 4cd671e4: Merge "Revert "Replacing FloatMath native implementation with calls to Math""
* commit '84e6d466edc2aba711f90431a1cd209d11c0e70d':
  Revert "Replacing FloatMath native implementation with calls to Math"
2014-10-18 20:53:38 +00:00
Elliott Hughes
b3b68d0333 Revert "Replacing FloatMath native implementation with calls to Math"
This reverts commit 32b88b48daa7383880088246d7222dd93cf55285.

Change-Id: I40ea17f3a68f2b53eb013aebd3ba1becdc724f94
2014-10-18 20:41:27 +00:00
Neil Fuller
06965cfd12 am 8a3785ca: am fd2d41b7: Merge "Replacing FloatMath native implementation with calls to Math"
* commit '8a3785cafec4b47fe8d61614b04a0e193d616428':
  Replacing FloatMath native implementation with calls to Math
2014-10-16 09:35:43 +00:00
Neil Fuller
4ef9403577 am 8a3785ca: am fd2d41b7: Merge "Replacing FloatMath native implementation with calls to Math"
* commit '8a3785cafec4b47fe8d61614b04a0e193d616428':
  Replacing FloatMath native implementation with calls to Math
2014-10-16 09:32:33 +00:00
Eric Rowe
500f7583ed Add CHANGE_NETWORK_STATE permission to bt tests
Change-Id: Ie0a579de3b7d1163a8fe245eb377f21eeed048a3
2014-10-15 14:06:30 -07:00
Neil Fuller
32b88b48da Replacing FloatMath native implementation with calls to Math
On modern versions of Android running in AOT mode
FloatMath is slower than Math. Calls to Math.sqrt(),
etc. are replaced by intrinsics which can be as small
as a single CPU opcode.

When running in interpreted mode the new
implementation is unfortunately slower, but I'm
judging this acceptable and likely to be improved
over time. This change saves a small amount of native
code.

Example timings:

Mako AOSP AOT:

Method: Original / New / Direct call to Math
ceil: 596ns / 146.ns / 111ns
sqrt: 694ns / 56ns / 25ns

Mako AOSP interpreted:

Method: Original / New / Direct call to Math
ceil: 1900ns / 2307ns / 1485ns
sqrt: 1998ns / 2603ns / 1788ns

Other calls Mako AOT:

Method: Original / New
cos: 635ns / 270ns
exp: 566ns / 324ns
floor: 604ns / 150ns
hypot: 631ns / 232ns
pow: 936ns / 643ns
sin: 641ns / 299ns

The advice to use Math directly, in preference to
FloatMath, is still good. FloatMath will be deprecated
separately.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I8d1947d88b3c576643138b1df589fb9da7c1ab88
2014-10-15 11:47:58 +01:00
Dianne Hackborn
2d7576b082 Fix issue #17752399: Multiple apps broken by GET_TASKS permission change
Keep around GET_TASKS as a permission available to apps, so apps still
think they have it and don't get all uppity because they don't.

Add a new REAL_GET_TASKS that is the actual permission now.

Plus some temporary compatibility code until everyone can transition
fromn GET_TASKS to REAL_GET_TASKS.

Change-Id: I12c1102eed24844685dcbd2fa3b612811603958f
2014-10-03 16:26:04 -07:00
Jeff Sharkey
7a8f1a32dc NetworkStats always needs arrays.
Internal logic relies on Arrays.copyOf(), so always give ourselves
valid arrays, using shared empty objects to save overhead.

Bug: 17502649
Change-Id: I5dbb00545bdfe45bbd48144ab505ea08cc92cbcd
2014-09-17 09:26:31 -07:00
Yohei Yukawa
84f20ec49d Merge "Minimize the number of default enabled IMEs part 3" into lmp-dev 2014-09-16 00:19:55 +00:00
Yohei Yukawa
dc489241cf Minimize the number of default enabled IMEs part 3
With this CL, the behavior of getDefaultEnabledImes() changes
as follows:

- Previously system IMEs are always enabled by default as long
  as it is a software keyboard that supports En_* subtype. With
  this CL, getDefaultEnabledImes() relies on the locale returned
  from getFallbackLocaleForDefaultIme() instead of calling
  isSystemImeThatHasEnglishKeyboardSubtype() to minimize the
  number of enabled IMEs.
- Previously default enabled system IMEs are chosen in a
  country-agnostic way. As a result, "en_IN" is enabled even
  when the system locale is "en_US". With this CL, the system
  first tries to find IMEs with taking the coutnry into account,
  and use the country-agnostic way when and only when fallback
  logic is required.

BUG: 17347871
Change-Id: I6571d464a46453934f0a8f5e79018a67a9a3c845
2014-09-15 13:13:45 +09:00
Guang Zhu
ac60bea01f Merge "temporarily enable wifi verbose logging in download manager test" into lmp-dev 2014-09-14 22:35:30 +00:00
Guang Zhu
da7638db2e temporarily enable wifi verbose logging in download manager test
also temporarily compile against platfrom, not SDK, since we are
using private API

Bug: 17446070
Change-Id: I6da18aca2d5eaf305940514186ef2434e52f15b9
2014-09-14 15:33:49 -07:00
Yohei Yukawa
68c860bb29 Minimize the number of default enabled IMEs part 2
Previously the system tried to enable at least one auxiliary IME
even when the system is not ready.  However, this doesn't make
much sense because the user should be able to set up their phone
without auxiliary IMEs. Also, IMEs enabled before the system
becomes ready are kept to be enabled after the system becomes
ready. Thus, we should minimize the number of enabled IMEs
until the system becomes ready.

BUG: 17347871
Change-Id: Ife93d909fb8a24471c425c903e2b7048826e17a3
2014-09-14 13:47:33 +09:00
Yohei Yukawa
59cccf93d2 Enrich test cases when enabling default IMEs part 4
This is another groundwork for subsequent fixes.

Notable changes in test cases are:
- simplified test cases for voice IMEs.
- added more test cases for keyboard IMEs.
- introduced assertDefaultEnabledImes() to reduce code duplicate.

BUG: 17347871
Change-Id: I8cf61cfa18ac425a2cccc7823474c3f06dc0fa1e
2014-09-13 00:29:49 +09:00
Eric Rowe
a8e4c740a8 Merge "Fix wifi association tests" into lmp-dev 2014-09-11 21:23:01 +00:00
Eric Rowe
485ceb8506 Fix wifi association tests
Before fix, test assumed that it was already connected to wifi so remove
these assertions.  Also, since association test may be used against
access points with no outside connectivity, remove the ping test to
8.8.8.8 at the end.

Change-Id: I3d4f3d752b72028f642da9f8e9adda4ad18a6a56
2014-09-11 14:14:25 -07:00
Yohei Yukawa
d77adfe52d Enrich test cases when enabling default IMEs part 3
This is another groundwork for subsequent fixes.

Notable changes in test cases are:
- A dummy Hinglish IME ("en_US" + "hi") is added
- Added test cases where system locale is "en_GB",
  "en_IN", and "hi" as well as "en_US".

BUG: 17347871
Change-Id: Iacf0f47c4dbc147f8153df50ba58fc4da4dacd29
2014-09-12 00:07:41 +09:00
Yohei Yukawa
bca817b2e2 Enrich test cases when enabling default IMEs part 2
This is another groundwork for subsequent fixes.

Notable changes in test cases are:
- isSystemReady == false is now coverted.
- tests can run even when the system locale of test
  environment is different from "en_US"

BUG: 17347871

Change-Id: I9434270735d3b37d8b788d41250b23d7950aaeed
2014-09-11 23:44:43 +09:00