1207 Commits

Author SHA1 Message Date
Guang Zhu
7d41c138d2 am f59ce468: am b477fc6c: Merge "add command to enable bt snoop log" into klp-modular-dev
* commit 'f59ce46880ebe2c2466a2c862ec2ed401f635d51':
  add command to enable bt snoop log
2014-07-19 00:33:58 +00:00
Guang Zhu
f59ce46880 am b477fc6c: Merge "add command to enable bt snoop log" into klp-modular-dev
* commit 'b477fc6c2fcd04e6952a7eec856d30b64fd95e0c':
  add command to enable bt snoop log
2014-07-18 03:31:43 +00:00
Guang Zhu
946f207d3d add command to enable bt snoop log
Change-Id: I22a6482a90c2bb976a5ce44946e9f0fb8b59e6b2
2014-07-17 20:24:56 -07:00
dcashman
9d2f441f9b Initial KeySet API.
Previously submitted but reverted due to doc-compilation bug.

Bug: 6967056
Change-Id: I9bd7ef299a4c92c4b327f5b5d7e951f0753b4c8a
2014-07-14 12:50:51 -07:00
dcashman
5de7377fec Revert "Initial KeySet API."
This reverts commit 9a643fe02bc960e266484547dda5572b094a4c72.
2014-07-12 13:04:20 -07:00
dcashman
405912bce0 Initial KeySet API.
Bug: 6967056
Change-Id: I47a01bd5dc25591cc70f58f38920ad0a021094ae
2014-07-12 12:09:40 -07:00
Wei Wang
af74e66e29 Unhide Bluetooth batch APIs. Deprecate BluetoothAdpater scan APIs. (1/2)
Change-Id: Ib0c4ea6c8372a15473269660355fb5ccf4284457
2014-07-11 11:06:10 -07:00
Narayan Kamath
4b8299b844 Merge "Add a test multiarch app." 2014-07-10 20:16:40 +00:00
Narayan Kamath
e99f69a484 Add a test multiarch app.
Will be used in an upcoming change for PackageManagerService
handling of multiArch APKs.

Change-Id: I363a02ce7b91569bb86880cf511ab9fbfcf2665c
2014-07-11 15:07:49 +01:00
Yohei Yukawa
638e4787ba Add simple InputMethodSubtypeTest
Change-Id: I87105c4935adfca249378e667161d2998cf77840
2014-07-11 19:51:19 +09:00
Yohei Yukawa
a52aeda808 Consolidate test cases for InputMethodSubtype
We have accepted any arbitrary text as a locale
string when instantiating InputMethodSubtype object.
As a consequence, some existing code might assume
that InputMethodSubtype never canonicalize/normalize
the given locale string.

This CL add a test case for such scenario.

Change-Id: Ie08d6e149e22a60d6c4d40049a3e6afeee87dc44
2014-07-11 23:08:34 +09:00
dcashman
989eb371bf Change key-set/public-key manifest relationship.
Separate definition of public keys and keysets in the manifest to better
represent their relationship. The 'key-set' tags should have nested additional
'public-key' tags that indicate which of the defined 'public-key' tags are
associated with them.  The first use of a given 'public-key' name should define
its value; subsequent uses may refer to it only by name.  'key-set' and
'public-key' names may not intersect.

Also, change 'keys' tag to 'key-sets' to avoid issues with previous keysets
implementation.

Bug: 6967056
Change-Id: I7534e4a42326e97b67b55509187c0d3c21a2bb32
2014-07-10 18:23:11 -07:00
Yohei Yukawa
0b01e7fc58 Polish new IME API for L: CursorAnchorInfo
This CL allows application authors and input method authors to
communicate with each other more precisely on the visibility of
insertion marker and composing characters. Now we can describe
the situation where the coordinates of them are available but
they are overlapped by other UI elements.

This change is based on feedbacks from internal customers of
this preview API.

Change-Id: I82eba0e844a6f8b99ba11a68fad272399034cc24
BUG: 16118303
2014-07-10 20:23:26 +09:00
Yohei Yukawa
eea0b8b051 Fix inconsistencies in CursorAnchorInfo#equals
This CL addresses some inconsistencies found in
CursorAnchorInfo#equals.

- #mComposingText is now taken into consideration when
  compared with other instances.
- NaN is now treated as if it was just a number in
  CursorAnchorInfo#equals if and only if NaN is used in
  -- #mInsertionMarkerHorizontal
  -- #mInsertionMarkerTop
  -- #mInsertionMarkerBaseline
  -- #mInsertionMarkerBottom.
  This is useful if we want to use NaN as a marker to
  indicate that no value is specified.

Change-Id: Ibff31bc34b9d488731b294ad38240c567a06b627
2014-07-10 03:06:04 +00:00
Maxim Siniavine
6b1e88e5d0 Add test apps for shared uid package manager test
Change-Id: I00c0db7a122774260d93d06212f4485210f86532
2014-07-09 19:36:19 -07:00
dcashman
ca76cccb61 Merge "Initial work for key rotation." 2014-07-02 18:22:50 +00:00
dcashman
55b1078e2a Initial work for key rotation.
Introduces the upgrade-keyset tag to AndroidManifest.xml. This specifies a
KeySet by which an apk must be signed in order to update the app. Multiple
upgrade KeySets may be specified, in which case one of them must be used to
sign the updating apk.  If no upgrade-keyset is specified, the current logic
involving signatures is used.

Current Key Rotation Design Decisions:
-Apps using a shared user id may not rotate keys.
-All acceptable upgrade keysets must be specified, including the key signing
the app.  This enables key rotation in one update, but also 'locks' an app if
an incorrect upgrade keyset is specified.
-Minimal changes to existing KeySet code.

Bug: 6967056
Change-Id: Ib9bb693d4e9ea1aec375291ecdc182554890d29c
2014-07-02 12:51:28 -07:00
Yohei Yukawa
b5268dcc17 Require coordinate transformation matrix if necessary
With this CL, CursorAnchorInfo.Builder#build() raises
IllegalArgumentException when an application author attempts to
instantiate CursorAnchorInfo without the coordinate
transformation matrix but with specifying some positional
parameters such as composing character rectangle.

Since any other positional members in CursorAnchorInfo are
supposed to be specified in local coordinates, the application
author must provide the coordinate transformation matrix for
such positional data.

Change-Id: I2b0fd0f146a2b95fe4fa1324837d8cfee667208c
2014-07-02 16:03:16 +09:00
Jeff Davidson
b6646a8987 Allow network scorers to provide an opt-in activity.
A candidate scorer may have an activity registered to listen for the
ACTION_CUSTOM_ENABLE intent action. If so, when the user attempts to
select this scorer as the active one, this custom activity will be
launched and will be responsible for requesting that the framework
activate the scorer. This is to enable more complex opt-in flows prior
to becoming the active scorer.

Scorers which do not specify this activity will default to using the
framework switcher (currently ActiveNetworkScorerDialog, though this
may change).

Note that all switches must still go through the framework switcher;
the opt-in activity simply allows scorers to first show another screen
and perform the framework switch on their own terms.

Bug: 15775314
Change-Id: I3847e5d3161a8fcc9622abc03218795697c32778
2014-06-30 14:06:40 -07:00
Yohann Roussel
85fa4e19b2 Manually disable dexopt for multidex test apps.
Because at the moment, omitting to explicitly disable dexopt produces apks with
no classes.dex inside.

Change-Id: I44ffc6b013a7b119c7deb332cf60f4fe8a11068c
2014-06-30 16:48:20 +02:00
Yohei Yukawa
9a9c112737 Fix test failures due to unexpected overload resolution
Starting with Ie04e8a27050849fee1c93ef14b9944acc70fafe4,
CursorAnchorInfo#getComposingText() returns CharSequence rather
than String.  This causes unexpected overload resolution,
which results in test failures.

BUG: 15088391
Change-Id: I51e2b23573e92be7e5b1dcca6402e85364408215
2014-06-27 17:13:32 +09:00
Jeff Davidson
a3b9ca5ade Merge "Use/expose the receiver's label as the scorer name." 2014-06-26 08:19:24 +00:00
Jeff Davidson
c741553644 Use/expose the receiver's label as the scorer name.
Allows scorer apps to set a custom name for the scoring functionality,
even if the app has other non-scoring responsibilities, in which case
the application's label would be too generic.

Bug: 15775300
Change-Id: I61a7d1966742d463508e6801b7845ced8392db84
2014-06-24 09:24:19 -07:00
Lorenzo Colitti
76ea6c68d3 Teach LinkProperties whether it's provisioned or not.
In IPv4, a link is provisioned when DHCP succeeds. In IPv6, a
there is no such signal, because addresses and DNS servers can
be notified by the kernel at different times.

Add an isProvisioned method that returns true if we believe that
enough information has configured to use a network. For IPv6,
this requires an IP address, default route, and DNS server. For
IPv4, this requires only an IPv4 address, because we support
static configuration that doesn't have a default route or DNS
server.

To do this we use the existing hasIPv4Address method, rename the
all-but unused hasIPv6Address method to hasGlobalIPv6Address
(which is what we want anyway) and add new hasIPv[46]DefaultRoute
and hasIPv[46]DnsServer methods.

Bug: 9180552
Change-Id: Ib2f5ff8af920f7b6f1edf0e2afaaa0edce9bc72d
2014-06-26 03:23:31 +09:00
Lorenzo Colitti
64c43b1948 Minor changes to RouteInfo.
1. Realize that mDestination can never be null and update the
   code accordingly.
2. Simplify isDefaultRoute.
3. Provide two new hidden utility methods, isIPv4Default() and
   isIPv6Default(), that can be used by LinkProperties to
   to determine if the system has connectivity.
4. Update tests.

Bug: 9180552
Change-Id: I85028d50556c888261d250925962bdedfe08e0c6
2014-06-25 18:22:12 +00:00
Lorenzo Colitti
1603eadc5a Unbreak LinkPropertiesTest.
This was broken by the changes that made addRoute add routes
only if they did not already exist.

Change-Id: I1d227df9223fbecf106efde05b709f320824ee9d
2014-06-25 18:19:47 +00:00
Jeff Sharkey
275e085d5a Stronger PackageParser contract, more split work.
Require that method callers always provide relevant paths, instead of
relying on constructor.  Move DisplayMetrics to be an overall parser
parameter, and move PARSE_TRUSTED_OVERLAY to flags.

Parse split APKs and apply deterministic ordering based on split
names.  Assert consistent package name and version code across all
split APKs in a package, and enforce unique split names and required
base APK.

Collect certificates for split APKs, enforcing they're all signed
consistently.  Better flow control and resource cleanup when
collecting certs.  Refactor validation code so it's easier to reason
about.  Cleaner maintenance of read buffer when draining stream
contents.

Change-Id: I8bc8c62095fbb933227b9e76ad8771f4b1246fe8
2014-06-18 16:04:13 -07:00
Lorenzo Colitti
0f50bbfe45 Merge "IpPrefix improvements." 2014-06-17 04:11:04 +00:00
Lorenzo Colitti
8c6c2c3c92 IpPrefix improvements.
1. Allow IpPrefixes to be created from strings. In order to do
   this, factor out the code from LinkAddress which already does
   this to a small utility class in NetworkUtils.
2. Truncate prefixes on creation, fixing a TODO.
3. Add a toString method.
4. Write a unit test.

While I'm at it, make RouteInfoTest pass again, and convert it
to use IpPrefix instead of LinkAddress.

Change-Id: I5f68f8af8f4aedb25afaee00e05369f01e82a70b
2014-06-17 11:18:53 +09:00
Adam Lesinski
e75b2c2677 Fix runtime overlay tests
The runtime overlay tests were crafting bad locales.

Change-Id: I33c87e71752756f40a954db9f01ea3cdde488a42
2014-06-17 01:22:57 +00:00
Jeff Sharkey
c4858a2ba9 Switch PackageParser to reference single path.
It previously kept mPath separate from mScanPath for some very odd
edge cases around moving apps-on-SD.  This changes it to always use
a single path, refactors moving to keep separate paths.

Refactors method names in PackageParser to be clearer about their
APK-versus-package relationship.

Beginnings of a split package parser.  Instead of requiring that
callers check error codes when null, switch to always throwing on
parse errors, to require that callers deal with the error.  Longer
term the entire parser should switch to this style, but its too
pervasive for a simple refactoring.

Change-Id: If071d8e55e46e56cc201fadfb51cb471713ae973
2014-06-16 13:20:18 -07:00
Lorenzo Colitti
62388936c8 Assert that RT_SCOPE_* and IFA_F_* are not zero.
If these constants are zero (or, rather, if they're not all
different), the test will fail with more cryptic error messages
whose cause is not obvious. Clearly check for that here.

Bug: 15602893
Change-Id: I7ca4a9c5e3d592fd93fbfa1b50666a1861a0031d
2014-06-13 17:20:20 +09:00
Yohei Yukawa
2a97b54f49 am f09cb58d: Merge "Rename CursorAnchorInfoBuilder with Builder" into lmp-preview-dev
* commit 'f09cb58d5f528665e6e96d8740eeeeab4167e357':
  Rename CursorAnchorInfoBuilder with Builder
2014-06-12 19:58:02 +00:00
Robert Greenwalt
756c4b795e am f7c964fa: Merge "Fix Build" into lmp-preview-dev
* commit 'f7c964fa06257d6db1b894bfbe905ca125c755c8':
  Fix Build
2014-06-12 19:57:23 +00:00
Robert Greenwalt
54e312a51b am 9c6d406e: Fix build breakage.
* commit '9c6d406eb7ab0fce40fb7cd1257714a29d06774c':
  Fix build breakage.
2014-06-12 19:57:11 +00:00
Robert Greenwalt
130669992c Fix build breakage.
Change-Id: Ideb32704ce5dc37ef36b05609f88da2aa55b3a00
2014-06-11 18:06:55 -07:00
Yohei Yukawa
13592c623c Merge "Rename CursorAnchorInfoBuilder with Builder" into lmp-preview-dev 2014-06-10 22:36:02 +00:00
Robert Greenwalt
6f0ec45a3b Fix Build
Change-Id: Iebbce8eaf21b3d2ba01ec720812d38018b13529e
2014-06-11 18:36:36 -07:00
Robert Greenwalt
594b456b6e Merge "Minor changes to the LinkAddress API docs." into lmp-preview-dev 2014-06-10 22:12:51 +00:00
Sreeram Ramachandran
6307b35e1d Add a new IpPrefix class and use it in RouteInfo.
This change uses IpPrefix only in the public API and continues
to use LinkAddress for everything else. It does not change the
callers to use the new APIs, with the exception of changing
all current uses of getDestination to getDestinationLinkAddress
to make room for the new getDestination method that returns an
IpPrefix.

Based on Sreeram's earlier change:
https://googleplex-android-review.git.corp.google.com/#/c/477874/
but a bit simplified and with a bit more documentation.

Bug: 15142362
Bug: 13885501
Change-Id: Ib4cd96b22cbff4ea31bb26a7853989f50da8de4e
(cherry picked from commit 7d3b4b9a3d4de9673119632da0ebd583e50126f7)
2014-06-11 16:32:21 -07:00
Lorenzo Colitti
00a0fd650b Minor changes to the LinkAddress API docs.
1. Rename getNetworkPrefixLength to getPrefixLength. Update all
   callers in frameworks/base and add a shim method and a TODO
   for the rest.
2. @hide isSameAddressAs. It doesn't add much, and it's just
   one-liner that callers can implement if they want.
3. Fix the alignment of the initial paragraph (<ul> should have
   been </ul>).
4. Remove the documentation that talks about creating
   LinkAddresses, since there's no public API for creating them.

With these changes I think LinkAddress is fine as a public API.

Bug: 15142362
Change-Id: Iaf3b1db577745bb68a9e1dd7f96d666dd3f3ec7c
(cherry picked from commit 9ab53650cfcd91a2a151b44b3fd1381841f76269)
2014-06-11 18:52:19 +00:00
Robert Greenwalt
25702b3967 Fix public API of LinkProperties.
bug:15142362
(cherry picked from commit 51d898fd0223a4b7c728980ab987dd985c02df5f)
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
2014-06-10 15:42:19 -07:00
Lorenzo Colitti
7dc78cf3af Minor changes to the LinkAddress API docs.
1. Rename getNetworkPrefixLength to getPrefixLength. Update all
   callers in frameworks/base and add a shim method and a TODO
   for the rest.
2. @hide isSameAddressAs. It doesn't add much, and it's just
   one-liner that callers can implement if they want.
3. Fix the alignment of the initial paragraph (<ul> should have
   been </ul>).
4. Remove the documentation that talks about creating
   LinkAddresses, since there's no public API for creating them.

With these changes I think LinkAddress is fine as a public API.

Bug: 15142362
Change-Id: Iaf3b1db577745bb68a9e1dd7f96d666dd3f3ec7c
2014-06-10 14:46:39 -07:00
Sreeram Ramachandran
cc91c7b804 Add a new IpPrefix class and use it in RouteInfo.
This change uses IpPrefix only in the public API and continues
to use LinkAddress for everything else. It does not change the
callers to use the new APIs, with the exception of changing
all current uses of getDestination to getDestinationLinkAddress
to make room for the new getDestination method that returns an
IpPrefix.

Based on Sreeram's earlier change:
https://googleplex-android-review.git.corp.google.com/#/c/477874/
but a bit simplified and with a bit more documentation.

Bug: 15142362
Bug: 13885501
Change-Id: Ib4cd96b22cbff4ea31bb26a7853989f50da8de4e
2014-06-10 14:30:15 -07:00
Yohei Yukawa
c46b5f04aa Rename CursorAnchorInfoBuilder with Builder
Inner Builder class should not inherit full class name of outer
class.

BUG: 15516230
Change-Id: I2d56edebb0c85639db57ca5b2aadb22c67fc5926
2014-06-10 14:19:28 +09:00
Robert Greenwalt
df2b878ff4 Fix public API of LinkProperties.
bug:15142362
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
2014-06-08 12:54:23 -07:00
Yohei Yukawa
083a3e6151 Merge "Reenable DynamicRotationList for language-switching-aware IMEs" 2014-06-03 00:51:32 +00:00
dcashman
559321abbf Merge "Add ArrayUtils methods and tests for consumption by KeySet code." 2014-06-02 17:34:09 +00:00
dcashman
874d0d4032 Add ArrayUtils methods and tests for consumption by KeySet code.
Adds methods for dealing specifically with long data types.  Used by
PackageKeySetData as part of the KeySet work.  Add appropriate test methods
to MoreAsserts as well.

Bug: 6967056
Change-Id: I1e263301b353e0cd1b45126be6ef5ec310f311a8
2014-06-02 10:29:40 -07:00
Yohei Yukawa
07bd732034 Reenable DynamicRotationList for language-switching-aware IMEs
In order to reenable DynamicRotationList for
language-switching-aware IMEs, this CL reverts
I84291fd4a7d6192b3bd0c366c49 with fixing a bug that the dynamic
rotation state is reset even when the list of input methods is
not changed.

With this CL, the dynamic rotation state is preserved when the
enabled input methods is not changed actually.

BUG: 7043015
Change-Id: I506828c7a363e79f1c767eeb28f0d3746ff1cb0d
2014-06-02 19:20:36 +09:00