To avoid long stacktraces being truncated, add code to split up
large chunks along line breaks.
Introduce LineBreakBufferedWriter to chunk up log output. Add a
core test for it.
Change-Id: I34160fbce853c21329f7fa109a9c42506b2066af
- Extend MouseUiController and MouseClickAction to support choosing click
button.
- Introduce ContextMenuUtils to provide useful methods for context menu
testing.
Bug: 25730231
Change-Id: I4f04716428b8cfdcf9f953fe8f8d27f5374b0425
When set, signals that the application is required for the system user and
should not be uninstalled.
Bug: 25616324
Change-Id: Idbbd1618e09c40bdb83fa26c0a3d9662dd73bea4
The primary goal of this CL is to make it clear that BCP-47 is the
expected format to annotate locale information for each
{InputMethod, SpellCkecker}Subtype. In order to avoid possible
compatibility issues, this CL introduce a new "languageTag" attribute
instead of reusing existing "imeSubtypeMode" and "subtypeLocale"
attributes.
For IME developers, this CL changes nothing unless "languageTag"
attribute is specified. To summarize:
A: If only legacy locale-string is specified
(existing IMEs/Spell-Checkers fall into this category):
-> The system uses locale-string.
B: If only LanguageTag is specified:
-> The system uses LanguageTag.
C: If both locale-string and languageTag are specified:
-> The system uses LanguageTag. Legacy locale-string is ignored.
For application developers, there should be some follow-ups CLs because
even with this CL most likely they would still have to take care of
previous versions of Android where:
- Locale#forLanguageTag() (N/A in API Level 20 and prior)
- Locale#toLanguageTag() (N/A in API Level 20 and prior)
- InputMethodSubtype#getLocale() (Deprecated in N)
- SpellCheckerSubtype#getLocale() (Deprecated in N)
- InputMethodSubtype#getLanguageTag() (N/A in M and prior)
- SpellCheckerSubtype#getLanguageTag() (N/A in M and prior)
One idea would be is in the official support library to provide a utility
method that takes care of above tasks and just returns a Locale object.
If we had a utility method in the support library, probably not
returning a Locale object from #getLanguageTag() would make sense.
From performance point of view both existing legacy locale-string
attribute and new LanguageTag attribute are just String objects that
travel from XML manifest to system services to applications via IPCs.
Hence there are no performance implications except for having one more
String objects.
Bug: 22858221
Change-Id: I6db107ad2afc7709167f7c4e5d24bd589ac8bd70
After previous change removed LOCAL_NO_STANDARD_LIBRARIES:=true
it is no longer necessary to explicitly add framework to
LOCAL_JAVA_LIBRARIES as it is added automatically by the build.
Change-Id: I68bf700375e34a10302f76d7463110755b815f85
Added an Android.mk file to core/tests/benchmarks to build the
benchmarks against caliper-api-target to ensure that they build
correctly. Changed the implementations to work with the new
version of Caliper.
Bug: 24848946
Change-Id: Ib28026816dbc5c1d54f65974f4a1abfee299c43f
- Double tap/long press at line end
- Selection handle pops up after making selection by mouse dragging.
Bug: 19544351
Change-Id: Ie6a2567c151159b6dea682257efeb17e0feb9f08
What this CL actually does is just copying the existing concept
"subtypeId" from InputMethodSubtype to SpellCheckerSubtype.
To recap, the underlying problem is that the system has stored only the
return value of SpellCheckerSubtype#hashCode() to track the set of
enabled subtypes, and SpellCheckerSubtype#hashCode() has been
implemented as Arrays.hashCode(new Object[] {locale, extraValue}), which
is problematic because:
- Spell checker developers cannot change "locale" and/or 'extraValue'
if they want to keep enabled subtypes enabled.
- Android Framework developers cannot change the hash function even
when new fields are added if they want to keep enabled subtypes
enabled.
InputMethodSubtype has had the same issue, and what we did was
introducing a concept "subtypeId", which allows IME developers to
specify the return value of #hashCode().
For instance, suppose that a subtype X has already been used in
production with the following attributes:
- locale: "tl_PH"
- extraValues: "key1=value1,key2=value2"
With "subtypeId", you can change the attributes of subtype X without
losing the enabled state of subtype X on devices as follows.
- locale: "fil_PH"
- extraValues: "key1=value1,key2=value2,key3=value3"
- subtypeId: Arrays.hashCode(new Object[] {
"tl_PH", "key1=value1,key2=value2"})
This CL also deprecates existing public constructor of
SpellCheckerSubtype, which was probably published as a public API by
mistake. Note that the constructor of SpellCheckerInfo class is @hide.
Also there is no public API that receives SpellCheckerSubtype object
instantiated by developers with custom data. Making developers to be
able to instantiate SpellCheckerSubtype does not make sense right now.
Bug: 11736916
Bug: 22858221
Change-Id: I98f05c1e9421c47a93769bc4a6fe11b678bc2509
With following CLs, we already have a special rewrite rule of "tl" to
"fil" for IMEs that are targeting older versions of Android earlier than
Lollipop that did not support three letter language codes and used
"tl" (Tagalog) as the language string for "fil" (Filipino).
- 92280cd309b0f5967dd253280962d8581844db89 [1]
- ed65bc0c62ca99a118057db7ad54c4ccc14d52d0 [2]
[1]: I94f203bddceb9c87710cb187cc3cc0ee6d9092a5
[2]: Ica9cd2baac002c406f92331aadd7725d7424046a
With this CL, we have the same rewrite rule for spell checker services.
Bug: 20696126
Change-Id: I0af0f520a15337e33973391c9965364e3ae1ee4c
This is the 2nd try of I39dc0c310158ad23ba6c987efce07deaf30ce693.
This is a mechanical refactoring with no behavior change.
With this CL, InputMethodSubtype and SpellCheckerSubtype have the same
getLocaleObject() hidden API, which makes it easy to share the logic in
subsequent CLs.
No behavior change is intended.
Bug: 11736916
Bug: 20696126
Bug: 22858221
Change-Id: I51be014c752b736a808e2b0d56e664941a218a2f
This is a mechanical refactoring with no behavior change.
With this CL, InputMethodSubtype and SpellCheckerSubtype have the same
getLocaleObject() hidden API, which makes it easy to share the logic in
subsequent CLs.
Bug: 11736916
Bug: 20696126
Bug: 22858221
Change-Id: I39dc0c310158ad23ba6c987efce07deaf30ce693
Before introducing behavior changes, this CL adds
SpellCheckerSubtypeTest to make the current behavior clear.
Bug: 11736916
Bug: 20696126
Bug: 22858221
Change-Id: Ied18580f31497156510e1b785adfc248683ba94d
The system can now boot in a "locked" state where only encryption
aware (EA) components can be safely started. When in this state,
PackageManager already filters away non-EA components, but system
services like AccountManager and SyncManager need to carefully handle
these temporarily "missing" components.
As a guiding principle, all known Accounts are still present when
the device is locked, but communication with underlying non-EA
authenticators is blocked.
To keep things simple for now, all SyncManager requests are kept
dormant until the user enters the unlocked state.
The core of this logic is that RegisteredServicesCache now works
with all components regardless of EA status, which prevents us from
accidentally thinking a service was removed when the user is locked.
Bug: 25945136
Change-Id: I8714121f6236b00821769023c4df7de1c8a99944
This is a follow up CL for ed65bc0c62ca99a118057db7ad54c4ccc14d52d0 [1],
which fixed special handling of a fake language code "tl".
[1] Ica9cd2baac002c406f92331aadd7725d7424046a
Bug: 20696126
Change-Id: Ifc8bf2ff6bd617a215e4b68f6b2bf9b94e80db07
This switches keyset unit tests from two unrealistically short 512 bit
RSA keys to a more realistic 2048 bit RSA key and a NIST P-256 EC key.
Change-Id: If615b97dff22a2a4f7f0e6015e410e98b8d395cd
Use MAINDEXCLASSES defined by the build system instead of manually using
$(HOST_OUT_EXECUTABLES)/mainDexClasses.
Change-Id: Iede13c243ef0c4e374c8e80bab4a995cea76b9b1
The logic to detect vertical expansion is inverted on RTL
text. As a result, the selection handle cannot be moved
when it's dragged toward vertically expanding and
horizontally shrinking direction.
Bug: 25893288
Change-Id: I096595d287261b1287862c6ad27ae7f6f0a73262
The center position of a drag handle can be outside of the
screen. In such cases, selection handle tests can be failed.
Changed to drag the visible position to deal with it.
Bug: 25730231
Change-Id: Id9270fc03d0f39041f243c9e9d17deca19925e09
commit 42aed1b8ecf591009f9e2df8eaca4f41074c37c8 changed the hidden
KeySet API to allow packages to retrieve keysets of other packages.
Change the PackageManagerTests to not expect a SecurityExeption
anymore and also make sure that this is supported.
Bug: 25935839
Change-Id: I18c00997a627c9df1eb3826650c1aa71f563a2bd
The majority of the test failures were around the method assertInstall()
failing a check for a symlink between the data directory in /data/data/
to the application directory in /mnt/asec/. There are a handful of other
failures that will be dealt with separately; those have all been suppressed
from running.
Also took the opportunity of adjusting some of the tests to ensure the
device is properly cleaned up. Packages remained installed after a failure.
Bug: 18048725
Change-Id: Id8f6ac53cfe17de43b5d527993d57812b1a63bef