There are two major changes in this CL:
1. Now IMMS resets its internal state whenever the system locale list
is changed, rather than just checking the primary system locale.
2. For software keyboard subtypes,
InputMethodUtils#getImplicitlyApplicableSubtypesLocked() now takes
the entire system locale list into account when determining what
subtypes should be enabled by default when the user does not
explicitly enable one or more subtypes.
Bug: 27129703
Change-Id: Iaf179d60c12b9a98b4f097e2449471c4184e049b
This is a preparation CL to take secondary system locales into
account in InputMethodUtils#getImplicitlyApplicableSubtypesLocked().
Suppose the following situation:
available subtypes:
en-US, en-IN, and en-GB, fr, fr-CA, fr-CH, fr (QWERTZ)
system locales:
en-GB, en-US, fr-MC
Basically we want to have at most one subtype for each language appears
in system locales. Hence the goal of this utility method is to filter
the above available subtypes into en-GB and fr. In other word, we do
not want to enable both en-GB and en-US subtypes in this scenario.
This CL introduces LocaleUtils#filterByLanguage() for this purpose, with
some unit tests. Note that that method is not used in production yet.
Bug: 27129703
Change-Id: I315cf3722a06e00bdbfac284c4949578da8fe78d
These are very simple tests with no dependencies, and moving them
out of FrameworksCoreTests makes it possible to iterate much more
quickly. "runtest frameworks-core" takes almost a minute just to
push to the device, before any tests even start running.
Bug: 25691379
Change-Id: I8d99316a5940e0171883b97c578f9a6882b699a0
Backup requires both CE and DE storage to be available, so delay
spinning up the backup system until the user is unlocked, since
that's when CE storage becomes available. Note that devices without
FBE immediately transition USER_SYSTEM into the unlocked state,
since their CE is always available.
Offer to backup and restore files under both CE and DE. Since DE
is effectively the same as CE, most logic is simply duplicated for
now, but it could be simplified in the future. Since system apps
can force their default storage location to DE, we always build
explicit CE and DE paths.
Add getDataDir() to give clean access to the top-level private data
directory, but disclaim that apps shouldn't create files there.
Bug: 26279618
Change-Id: Ic34a4b330223725db93b1d0f5c9dffc88002c61f
This CL makes backspace handling aware of variation selector, combining
enclosing keycaps, zero width joiner, regional indicator symbols and
emoji modifiers.
BUG: 25737208
Change-Id: I740578bfee955cc623e2831778e5b7ec4b8cb627
* changes:
Have unified setter/getter for Secure Settings.
Remove redundant arguments.
Use Context#getSystemService(Class<T>) in IMMS.
Use Java7 diamond operator in InputMethodUtils.
When linking against .jack files that contain 1.8 language
features Jack (currently) requires -D jack.java.source.version=1.8.
"core-tests" includes 1.8 language features.
Bug: 27113322
Bug: 26953739
Change-Id: If40239d4af59a3d3f71b22e8ef2a07e553c8d5c2
This CL changes nothing except for deleting redundant type parameters by
using diamond operator.
No behavior change is intended.
Bug: 26279466
Change-Id: I276c7eb0136d373464ba6e997685d440beaca674
In case of writing single character, check against the buffer length,
not the maximum buffer size.
Bug: 27099774
Change-Id: I83d49ea74cc3d25342ec540b654d3dc68e4e802e
NetworkScorerAppManager was recently updated to use
queryBroadcastReceiversAsUser() in place of
queryBroadcastReceivers() but its unit test wasn't changed accordingly.
Change-Id: Ib41195fe8b9cf8c8da9a9090a4f26e1cde3db4f0
Nothing is changed in the test expectations.
Major changes in this CL are:
1. To obtain a custom context with the given locale,
Context#createConfigurationContext() is the way to go.
Modifying any internal state of the resource that is owned by the
context is not supported at all.
2. As a preparation to test cases where multiple locales are specified
in the system settings, unit tests need to switch to
Confituration#setLocales(LocaleList).
Bug: 27076327
Change-Id: I6caa76627677c7625a1c42d76a275f67ae65a9b2
EditText tried to draw outside of the padding boundaries because of a
cursor positioning issue in RTL. This CL removes that fix and instead
clamps the cursor position if cursor is outside of the clipped view
boundary.
Bug: 23397961
Change-Id: Id5f1fbe2a0f571100c89b21758fbb81b14d5da57
Bug 26963113
When a Fade transition is interrupted and reversed, the
View started the animation from the beginning. This change
captures the previous transitionAlpha and starts the animation
from the previous alpha state.
Change-Id: I801fe9ade6af4cf8446838e231bdc71841668a18
(cherry picked from commit 3cf9fa3db0231d035142c27992818d8f7827ac3e)
- Remove the LocaleList#getPrimary() API. It had become confusing
after locale negotiation was completely implemented. For example,
it could create the confusion that calling getPrimary() on the
default locale list would provide the default locale, etc.
- Use the adjusted locale list from LocaleList.getAdjustedDefault()
in Paints created with no locale list provided.
- Change LocaleList#get() to treat out of bound indexes from both
negative indexes and too large indexes the same way.
Bug: 26984092
Bug: 26193251
Bug: 26834387
Change-Id: I75f77aea6b75e38793ed8477e5e5a4420d5e6d85
Previously, locale resolution happened at Resources level, which
could result in different Resources in the same app using different
locales.
This change moves the locale negotiation to ResourcesManager, which
remembers the locales supported by each Resources as they are
created, and negotiates the locale based on their union.
It also makes sure that the old model of apps getting the default
locale by accessing it through the Configuration's locale attribute
continues to work, since the negotiated locale will be moved to the
top of the list before Resources are created and when they are
updated with a Configuration change.
Bug: 25800576
Bug: 26404653
Change-Id: I0dd81df288327fd8d1229188c9544ee2209c161a
- Propagate nullness and non-null-ness up and down from the interfaces.
- Add non-CTS print tests for IPrintManager binder.
Change-Id: I0c310d9cea8aefba5ce386931521ffaf19712bbb
SpannableStringBuilder used to return the result of getSpans in the
order of start indices because of the interval tree it uses. However,
style spans has to be applied in the order of insertion to get
predictable results. Sorted the results of getSpans ordered first by
priority flag and then by insertion time. Moreover improved the
performance of SpannableStringInternal copy constructor.
Bug: 26240132
Change-Id: I0b0fa7bb30a3bd9ca37dedca66d8993718586027
Whether a network is deemed roaming or not was already being tracked
as part of the NetworkIdentitySet, so the underlying data store
already tracks roaming and native data separately. However, this data
was being aggregated together in NetworkStatsCollection#getSummary,
since the NetworkIdentitySet is converted to an iface name for the
purposes of matching, and the iface name will be identical whether or
not the iface is considered roaming. Now it is separated.
Also fixes a long-standing bug in NetworkIdentitySet where an identity
read from a saved file would always be considered roaming == false,
even if it wasn't at the time it was written.
Bug: 25813438
Change-Id: I11ab5b51182ed8da7af8fde468df065f9fdc3dad
This test used to fail consistently, but currently passes.
Adding it back to see whether whatever was causing it to fail has
since been fixed. If not, need to get failure logs to see what the problem
is during the automatic runs.
Issue #23807249 Fix AutoCancelTest or delete it
Change-Id: Ied0e0d3a700d9ba36d4d5ef8ca95b8072e639851
Keyboard shortcuts are requested via WindowManager, and
the request pipes through to the view root and the window
callback.
Bug: 22405482
Change-Id: Ic0071e91c7b554be3ac9df71e9539ee8a60e822e
Two setters are added, a hidden one for fast unsafe calls when the
input is known to be OK, and a public one for normal users.
A hidden constructor is also added for adjusting locale lists and
moving a locale to the front.
Finally, an indexOf method is added. It's only used in testing now,
but it's potentially useful for others too.
Bug: 26404035
Change-Id: I4ab3140134325456a8c3df1b126ccc6f8e3f43fd
In practice, a lot of apps provide English resources as their default
resources, so assume that English is always supported.
With this change, users can safely set secondary locales after
English in their preferred locale lists. Such settings would help
the apps (and parts of the system that are aware of multiple locales)
consider the user's familiarity with the secondary locale or the
user's preference for glyphs forms in the secondary locale. This
change makes sure that no app unintentionally switches to such
secondary locales.
Note that this doesn't break from the tradition of previous releases.
Traditionally, if the user had set the system locale to English, they
would get the default resources when the app didn't explicitly
provide English resources. This will continue to be the case where
the user's locale list has English in it before another supported
language. (English will be the first locale in most cases.)
Bug: 26192817
Change-Id: I2c1a003760299157786c1b3f9fb116ce18db3b8c
Introduced a new regular expression to autolink URLs. Previous regular
expression used the protocol as an optional rule. The new expression
applies separate rules for strings that do not start with a known
protocol and strings that do start with a known protocol.
- In order to reuse previous regular expression definitions for
different parts of a URL, created constants for different parts of
WEB_URL expression.
- Separated the test cases for WEB_URL in order to remove the suppress
command and make them running again.
- Fixed failing tests for punycode urls, which were causing existing
tests to fail.
- Introduced new a regular expression for URL matching.
- Changed the protocol rule to be case insensitive.
- Updated IANA TLDs.
- Added tests for the new regular expression.
- Added tests for Linkify.
- Bug 9622849 is partially fixed.
Bug: 25727599
Bug: 9622849
Bug: 24500693
Bug: 23189367
Bug: 24543148
Change-Id: Ifd62455d342ca7adb22996246ff652e1d5944bec