1696 Commits

Author SHA1 Message Date
Keisuke Kuroyanagi
75aee0a681 Merge "Make TextViewActivityTest stable by sleeping between clicks." into nyc-dev 2016-04-04 03:39:20 +00:00
Keisuke Kuroyanagi
fc1d11ed9d Merge "Make hasTransientState be true only if user created selection is active." into nyc-dev 2016-04-04 03:12:32 +00:00
Clara Bayarri
89203de878 Remove unused import for KeyboardShortcutGroup
Left it in accidentally when removing default method.

Change-Id: I6af0712624ffaefff4cb4ad2a9e5a86d7104d2e7
2016-04-01 14:40:34 +01:00
Keisuke Kuroyanagi
5f318b6285 Make TextViewActivityTest stable by sleeping between clicks.
Bug: 27893257
Change-Id: I2eaaa38b4af9333a46a8702098b4ec0806def538
2016-04-01 19:16:31 +09:00
Keisuke Kuroyanagi
183fd5071e Make hasTransientState be true only if user created selection is active.
Previously, hasTransientState returned true even when TextView has a
selection that hasn't been created by the user. This unnecessarily
prevents the TextView from being recycled.
This issue was introduced by Ib454b0fbbc2c2f8d198, which fixes that
setHasTransientState(true) is not always coupled with
setHasTransientState(false).

With this CL:
hasTransientState will get true when selection action mode is started.
hasTransientState will get false when selection is removed.
Note that hasTransientState intentionally continues to be true when
selection action mode is terminated with preserving selection.

Bug: 27913323
Change-Id: I960ddfd7221caeb676c23926af06a8a415dec288
2016-04-01 15:00:53 +09:00
Siyamed Sinir
e14bab859e Merge "Benchmarks for Linkify" into nyc-dev 2016-03-31 17:17:18 +00:00
Jeff Sharkey
4938d6e161 Merge "Fix DownloadManager tests." into nyc-dev 2016-03-31 02:43:21 +00:00
Jeff Sharkey
f584f12b6b Fix DownloadManager tests.
ERROR_CANNOT_RESUME is the correct code for one, and relative paths
are supported by the RFC, so change the test to check for success.

Bug: 27580939
Change-Id: Ife99c22a44dd71232466e35d38a2441c16a558f7
2016-03-30 18:22:22 -06:00
Philip P. Moltmann
9dcb86a48d Add the print service recommendation service
This service connects through the print manager to the print spooler:

PrintSpooler.AddPrintersActivity <-> PrintManager <-> PrintManagerService <-> UserState <-> RemotePrintServiceRecommendationService <-> PrintRecommendationService <-> PrintRecommendationServiceImpl

Hence there is a lot of mindless plumming.

The actual changes are only in the AddPrintersActivity which is extended
to show another list of services: The recommended services.

The PrintServiceRecommendationService is based on the experimenal print
service stubs provider. This provider was contributed the Android by
Mopria. As this services uses Android own network discovery service most
code from the experimental provider goes away. In fact the only logic
left over is the selections of mdns-txt fields to look at and the
printer vendor configuration.

This relies on the Android MDNS to get fixed (Bug: 27696905). This also
does not deal with how to update the recommendation service.

Bug: 24533249
Change-Id: I6edc6e25fc08a50d478b61c71bb8ea158b08624c
2016-03-30 17:21:07 -07:00
Siyamed Sinir
545c3cf95f Benchmarks for Linkify
Add benchmarks for Linkify and URL regular expressions.

Bug: 27921706
Change-Id: I61dcd090bdf877f2df77e898c8a0f441de1dc45a
2016-03-30 17:02:02 -07:00
Sergei Vasilinetc
394d3dfb2d Merge "Hide children in ViewGroup.createSnaphost via internal flag and add test for it." into nyc-dev 2016-03-30 23:42:34 +00:00
Adam Lesinski
7f3f499887 Allow multiple Resources associated with an Activity
Previously it was assumed that one Resources object per Activity would be fine.
This proved to be incorrect, as methods like Context#createConfigurationContext()
expect to create a new Resources object that gets updated whenever the Activity Resources
get updated.

To fix this issue, there exists a master override configuration for each Activity. Subsequent
Resources created for an Activity will be based off that master override configuration, and
will be updated accordingly.

Bug:27644297
Bug:27604953
Change-Id: Idb3d851f55ee7981eec4e3fe28e2ea8d55f1192d
2016-03-30 14:27:11 -07:00
sergeyv
b37d44e267 Hide children in ViewGroup.createSnaphost via internal flag and add test for
it.

bug:27747923
Change-Id: I079b52b176b920bfa4c6749be31fbcd96a4dc42c
2016-03-30 14:20:09 -07:00
Philip P. Moltmann
a393be9319 Merge "Add cancelation signal to OnRequestPrinterIcon." into nyc-dev 2016-03-30 15:18:32 +00:00
Keisuke Kuroyanagi
e5c431ccc0 Disable testTextAppearanceInSuggestionsPopup
Re-enable TextViewActivityMouseTest#testContextMenu that was disabled
by I459f1ab1c6d2d3119fc50166.

Bug: 27765262
Change-Id: I986ec239324d2d65a14be3fb2981777583471c68
2016-03-29 19:34:33 +09:00
Philip P. Moltmann
e54d79c4cd Add cancelation signal to OnRequestPrinterIcon.
Change-Id: I072d2c15e8df104a8b902c10d14d9f02040ace5f
2016-03-28 17:13:34 -07:00
Keisuke Kuroyanagi
1e632ba426 Merge "Improve selection handle behavior for bidi text." into nyc-dev 2016-03-28 06:06:02 +00:00
Jeff Sharkey
bd91e2f3f6 Update PRE_BOOT_COMPLETED for FBE.
Now that CE data isn't available until after a user is unlocked, we
need to delay the PRE_BOOT_COMPLETED broadcasts.  This is done by
adding a new RUNNING_UNLOCKING user state to the UserController
lifecycle.

We now track the last fingerprint a user was logged in under, and we
dispatch PRE_BOOT receivers when that fingerprint changes.  To work
around battery pull issues, we only persist the updated fingerprint
once all PRE_BOOT receivers have finished.  This is less granular
than the original solution, but it's still correct.  We only consider
a user as "logged in" once it transitions into the RUNNING_UNLOCKED
state.

When starting a process, track if the user was "unlocked" when
started, so that we only spin up unaware providers in processes
started before user unlock.

Add generic IProgressListener to communicate PRE_BOOT progress and
strings up to lock screen.  For now, LockSettingsService just blocks
until finished, but it could display these strings in the future.

Bug: 27220885
Change-Id: I349439776b885acd32f6a578d8951ffd95640be2
2016-03-27 10:56:48 -06:00
Clara Bayarri
3e5bf786b7 Merge "Keyboard Shortcuts: plumb deviceId through" into nyc-dev 2016-03-24 13:30:48 +00:00
Clara Bayarri
fcd7e80b21 Keyboard Shortcuts: plumb deviceId through
Bug: 27673736
Change-Id: Ie72807aa8c2bfd142b081a6a915e101c16d31473
2016-03-24 11:47:32 +00:00
Sergei Vasilinetc
ab852f2972 Merge "Add offset() to Path's fast-case mode" into nyc-dev 2016-03-24 05:02:02 +00:00
sergeyv
ecbcdd384c Add offset() to Path's fast-case mode
bug:22510833
Change-Id: I417ed13ff450aa7f6c72370b4c5de8e8a53a0235
2016-03-23 16:45:55 -07:00
Seigo Nonaka
f4afb095a0 Add cursor positioning tests for emoji.
Bug: 25375561
Change-Id: Id8e467bc13fc69560ea3d238765760e006c8ced5
2016-03-23 23:10:19 +09:00
Jed Estep
e9b5fc29dc Merge "Disable TextViewActivityMouseTest#testContextMenu" into nyc-dev 2016-03-22 20:39:10 +00:00
Jed Estep
66c4e57f24 Disable TextViewActivityMouseTest#testContextMenu
This test is causing failures which are blocking other test results.
Disabled until a fix can be submitted.

Bug: 27765262
Change-Id: I459f1ab1c6d2d3119fc50166e8de0d1259801e2a
2016-03-22 12:39:55 -07:00
Adrian Roos
6f54b224af Merge "Don't copy Bitmaps when cloning RemoteViews" into nyc-dev 2016-03-21 19:03:51 +00:00
Adrian Roos
7da889d81d Don't copy Bitmaps when cloning RemoteViews
Bug: 27385859
Fixes: 27385859

Change-Id: I9f0768b20e6e71d5366eb21df76c984bfe6989b1
2016-03-21 10:39:16 -07:00
Seigo Nonaka
b898ce9511 Merge "Revive some test cases in BackspaceTest/ForwardDeleteTest." into nyc-dev 2016-03-18 07:58:48 +00:00
Keisuke Kuroyanagi
f0bb87b7c4 Improve selection handle behavior for bidi text.
A point on a direction boundary can be mapped to two offset and
one offset on a direction boundary can be mapped to two points.
Previously, paragraph's primary direction is always used for deciding
offset and coordinates; thus, handle movement around a direction
boundary is often nonintuitive.

With this CL:
1. For selection end handle, direction of character at offset - 1 is
used for deciding handle shape and position.
2. For getting offset from coordinates, previous offset is used to
minimize the offset delta and primary .
3. For getting coordinates form offset, new logic chooses primary or
secondary horizontal coordinate depending on the current run
direction and paragraph direction.
4. When a handle passes another one because it passes a direction
boundary, new logic keeps the handle at the run boundary instead of
minimizing the selection.

Bug: 19199637
Bug: 21480356
Bug: 21649994


Change-Id: I2a7e87ad08416f4bd01a5f68e006240f77d9036b
2016-03-18 14:39:09 +09:00
Siyamed Sinir
e7a414e16d Merge "Do not use hint text for Editor cursor positioning" into nyc-dev 2016-03-17 22:58:35 +00:00
Siyamed Sinir
987ec6588b Do not use hint text for Editor cursor positioning
When hint text is used for cursor positioning, the cursor may end up
in opposite direction when the locale and the hint text directions are
different. This CL uses the main text layout and discards the hint
layout while deciding on the position of those three views. The change
also includes fix for cursor and floating popup not displaying for
some cases after the change.

Bug: 22358087
Change-Id: I083d17b06273bc1d9b67656c5e12d4ff1231219c
2016-03-16 18:00:23 -07:00
Philip P. Moltmann
01527ee6d0 Add *Test marker to print manager parameter tests. This should help with automation of these tests.
Bug: 27599564
Change-Id: Iaeb24b36ca00bf7856c7e5badf250b61fa838ddf
2016-03-16 16:53:15 -07:00
Keisuke Kuroyanagi
126fdf1082 Merge "Stop automatically creating selection action mode." into nyc-dev 2016-03-15 07:41:07 +00:00
Keisuke Kuroyanagi
c477b5830a Stop automatically creating selection action mode.
With Ic025c109539c3b5963, selection action mode is created always
when selection is made. It causes distraction in some cases.
This CL fixes this issue. This CL stops starting selection action
mode when action mode is currently not active and not intended to
restart.

Bug: 27536744
Bug: 27551819
Change-Id: I94ee66864000934a21ef0d18c1d71429c67114fa
2016-03-15 15:38:40 +09:00
Keisuke Kuroyanagi
e675665afa Merge "Show SuggestionsPopup when there is a misspelled span." into nyc-dev 2016-03-15 05:35:21 +00:00
Seigo Nonaka
328251a1d7 Revive some test cases in BackspaceTest/ForwardDeleteTest.
Implementation can choose the support of ZWJ and Emoji modifier, so move
them back to CoreTests.

Bug: 27553165
Change-Id: Ief9ae64c8c731b927295f54d09512256449b5a88
2016-03-15 00:09:07 +00:00
Jeff Davidson
1c0c14febf Merge "NetworkStats.Bucket API polish." into nyc-dev 2016-03-14 19:30:23 +00:00
Jeff Davidson
1f7e05eda6 NetworkStats.Bucket API polish.
-Add @IntDef constants for STATE_ and ROAMING_.
-Expand docs for ROAMING_ constants.
-Use ROAMING_NO/YES instead of ROAMING_DEFAULT/ROAMING.

Bug: 27531260
Change-Id: I54ecfb4148caa549214df0bee9983036ffa4cb55
2016-03-14 11:24:12 -07:00
George Mount
6387cd2849 Merge "Added internal test for AutoTransition." into nyc-dev 2016-03-14 16:49:24 +00:00
Keisuke Kuroyanagi
f8e0da2624 Show SuggestionsPopup when there is a misspelled span.
Due to I20a86c1bdeb361686, SuggestionsPopup was not shown when there
is a suggestion span that has misspelled flag and doesn't has any
suggestions. This CL makes SuggestionHelper#getSuggestionInfo return
misspelled span info separately.

Bug: 27534987

Change-Id: Ib76588f9388287a04f1f6c9d9067ae439e493a95
2016-03-14 15:48:18 +09:00
Seigo Nonaka
62006a72a6 Merge "Remove duplicated test cases." into nyc-dev 2016-03-14 04:11:01 +00:00
George Mount
ca11a73cb1 Added internal test for AutoTransition.
Change-Id: Ieee0f4ed8a418293043f19f6edfc1c8302fec7f2
2016-03-11 18:23:17 -08:00
Doris Liu
0304ac862e Merge "Testing initial value for 0-duration animations" into nyc-dev 2016-03-11 20:25:40 +00:00
Yohei Yukawa
fc1713dfad Merge "Use LocaleUtils#filterByLanguage for non-keyboard subtypes." into nyc-dev 2016-03-11 19:56:03 +00:00
Yohei Yukawa
238faad984 Use LocaleUtils#filterByLanguage for non-keyboard subtypes.
With this CL, we expand the target of Bug 27129703 and Bug 27348943 to
non-keyboard subtypes.

Suppose there is a handwriting IME (mode == "handwriting") that supports
the following 5 subtypes.
  - en-US
  - en-GB
  - fr
  - sr-Cyrl
  - sr-Latn

Also suppose the system languages are configured as follows.
  1. sr-Latn-RS
  2. ja-JP
  3. fr-FR
  4. en-GB
  5. en-US

In this case we want to enable [sr-Latn, fr, en-GB] by default when
"use system language" is checked in the subtype enabler.

See previous commits [1][2] about how we addressed those issues for
keyboard subtypes.

  [1]: Iaf179d60c12b9a98b4f097e2449471c4184e049b
       e985c240e3feb62ea38d5b4e386be083ca0f215b
  [2]: I8fc774154f5175abff2f16e8f12a4847bf5f5b7c
       072a95a3094af2ced4f009ad62c4553c28e3f830

Bug: 27560993
Change-Id: I416b5671602c550805ed6267dd210968aa1de83c
2016-03-11 10:39:51 -08:00
Keisuke Kuroyanagi
13d66d8456 Merge "Fix: Context menu can contain obsolete suggestions." into nyc-dev 2016-03-11 11:17:37 +00:00
Keisuke Kuroyanagi
182f5fec53 Fix: Context menu can contain obsolete suggestions.
When there are not enough number of suggestions, previously used
suggestions was continue to be used. This fixes it and simplifies code
by always allocating SuggestionInfo array.

Bug: 27602619
Change-Id: I9378315b8c810f126f65fade96ce9f6ff5271957
2016-03-11 10:08:11 +00:00
Yohei Yukawa
80861ff1c0 Make sure to compare subtype language with system language.
This CL addresses a regression introduced by a recent CL [1] that
non-keyboard subtypes are no longer implicitly enabled based on the
system language (a.k.a. "use system language" in the subtype enabler)
due to a type mismatch in comparison.

Here is the original logic:
 if (language.equals(systemLanguage) && systemLocale.startsWith(locale))

And here is the logic replaced by [1]:
 if (locale != null && locale.equals(systemLanguage)) {

The new logic is simply broken, because locale is a Locale object while
systemLanguage is a String object.  It never matches.

With this CL we will compare the system language with the locale
language again, with several test cases that should have been included
in [1], as a temporary solution until we start relying on
LocaleUtils#filterByLanguage() for non-keyboard subtypes.

  [1]: Iaf179d60c12b9a98b4f097e2449471c4184e049b
       e985c240e3feb62ea38d5b4e386be083ca0f215b

Bug: 27560993
Change-Id: If2d1710174853180465832e6ecbbb91235b76210
2016-03-11 01:08:52 -08:00
Adam Lesinski
58f1018c56 Merge "Cache per-Activity Resources objects" into nyc-dev 2016-03-10 20:50:40 +00:00
Adam Lesinski
082614c6a5 Cache per-Activity Resources objects
Each Activity has a Resources object whose underlying state changes
when a configuration change occurs, both global and for that activity only (multi-window).
Views and other clients of the Resources object can safely cache it knowing that
they always have a reference to the most up-to-date resources.

This applies to Resources.Theme objects as well.

Bug:26854894
Change-Id: Ifd3da5a1086e17f747dfc265a447fe92a3a5c692
2016-03-10 11:30:18 -08:00