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
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
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
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
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
Because at the moment, omitting to explicitly disable dexopt produces apks with
no classes.dex inside.
Change-Id: I44ffc6b013a7b119c7deb332cf60f4fe8a11068c
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
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
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
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
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
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
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
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
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)
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)
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
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
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
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
* commit '19bdd64c3b9dd16778575164c13c8af798832f01':
Address API review comments. 1. Moved le stuff to it's subpackage. Remove BluetoothLe for all classes except *Scanner, *ScanSetting, *Advertiser and *AdvertiseSettings. 2. Make all callbacks abstract classes instead of interfaces. 3. Moved AdvertisementData and ScanRecord out and removed AdvertiseBaseData 4. Removed newBuild and use new Builder for all builders. 5. Using setxxx in builders. 6. Misc other changes.
1. Moved le stuff to it's subpackage. Remove BluetoothLe for all classes
except *Scanner, *ScanSetting, *Advertiser and *AdvertiseSettings.
2. Make all callbacks abstract classes instead of interfaces.
3. Moved AdvertisementData and ScanRecord out and removed
AdvertiseBaseData
4. Removed newBuild and use new Builder for all builders.
5. Using setxxx in builders.
6. Misc other changes.
Fixes b/15140940
Change-Id: I32ae3d24a9491baf96048040b5ac78f6f731e468
NO_SQ: multi-project submit
Ic005b94379f9d847ea, which introduced DynamicRotationList for
smarter input method rotation, is suspected to be causing a
strange behavior that InputMethodManager#switchToNextInputMethod
is choosing unexected/disabled IME/subtype.
With this CL, we switch back to StaticRotationList until the root
cause is addressed.
BUG: 7043015
Change-Id: I95fc8b28536cea6d09ea325e0caee14007cfc0a7
With this CL, the IME rotation order will be updated dynamically
based on user actions on IMEs. Currently only onCommitText is
took into considered.
Imagine that we have the following rotation order.
[A, B, C, D, E]
If a user action for C is observed, the rotation order will be
updated as follows:
[C, A, B, D, E]
Then another user action for D updates the rotation order as
follows:
[D, C, A, B, E]
BUG: 7043015
Change-Id: Ic005b94379f9d847ea87046473ed77d8018d930e
This CL does not change the existing behavior.
In I84291fd4a7d6192b, the IME rotation group is logically
devided into two groups, one is for IMEs that are declared as
supportsSwitchingToNextInputMethod == true, and the other is
IMEs that are not declared so. The problem is that the logic
was implemented with a single ime/subtype list where these two
kinds of IMEs are completely mixed. This makes the code
unnecessarily complex.
With this CL, these two rotation groups are actually managed
as two different collections separately. This allows us to
simplify the rotation logic as well as its test cases.
This CL is also a groundwork to implement smarter
language-switching logic that is applied to
language-switching-aware IMEs only.
BUG: 7043015
Change-Id: I7f08ec299ec41d614e2cd3912320687db1576e80
Installers are interested in both streaming APK data and establishing
a happens-after relationship to support resuming downloads after a
process kill or battery pull.
This exposes a generic OutputStream for writing, and hooks up flush()
to be a blocking call which returns only when all outstanding write()
data has been fsync()'ed to disk.
Tests to verify behavior.
Bug: 14975160
Change-Id: I38289867c80ac659163bb0c2158ef12d99cc570d