1718 Commits

Author SHA1 Message Date
Adam Lesinski
757c6eacc8 BatteryStats: Fix up semantics of SamplingTimer
SamplingTimer has been losing some data, as well as not correctly handling
entries that have gone away and come back with less data (reset).

This change correctly ends a SamplingTimer sample by adding the accumulated amount
to the total, then reseting the running counter to accept new values.

This is also triggered automatically when the incoming data is less than what is currently
recorded.

Bug:25695597
Change-Id: I6b540906e6be527578d1003485384a75ba211b52
2016-04-22 14:48:18 -07:00
Adam Lesinski
752434a0ff Merge "Record in progress count when parceling Timer" into nyc-dev 2016-04-20 01:22:37 +00:00
Adam Lesinski
98f0d4692c Record in progress count when parceling Timer
The total time is computed before parceling, but the total count is not.

Bug:27747854
Change-Id: If3afdca9605f74d96a54fb9df17f6df761b99e55
2016-04-19 17:21:40 -07:00
Raph Levien
7ecd7671b7 Merge "Delete emojis before and after ZWJ at the same time." into nyc-dev 2016-04-19 18:31:05 +00:00
Seigo Nonaka
3675d3cd84 Delete emojis before and after ZWJ at the same time.
Vendor may want to introduce their own ZWJ emoji sequence. To delete
them by one back space as the same behavior of Unicode emoji sequence,
use all emoji as the zwj emoji.

Bug: 28248662
Change-Id: I572dad42ee108476962d4b3fe9f3a6019cb50098
2016-04-19 18:54:50 +09:00
Jeff Sharkey
84a4c971c4 Unlock should always wait for pending PRE_BOOT.
While processing an unlock request, we might go async to handle
long-running operations like dispatching PRE_BOOT_COMPLETED.  This
change ensures that all unlock requests for a particular user wait
in line behind any pending async operations.

Without this CL, any subsequent unlock requests would immediately
return successful, even though PRE_BOOT_COMPLETED events were still
being processed.

Bug: 28240584
Change-Id: I307d6aaebfb8f38028f3666a2e19e4399b7cf3a7
2016-04-18 15:38:35 -06:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Joe Onorato
65adfeecd2 Add some tests for procstats, and fix some bugs that the tests uncovered.
Bug: 27045736
Change-Id: Ia910730c5a3a899c89aa63dd7ab48be62cf9cfef
2016-04-12 13:13:41 -07:00
Siyamed Sinir
4b92594857 Merge "Exclude unicode space characters from autoLink URL patterns" into nyc-dev 2016-04-12 00:35:29 +00:00
Yohei Yukawa
d39ae85482 Shift+Meta+Space should reverse-rotate subtypes.
This is a follow up CL to my previous CL [1], which added a new key
binding Meta+Space to rotate enabled IME subtypes.  With this CL,
Shift+Meta+Space starts reverse-rotating enabled IME subtypes as
originally planed.

 [1]: I4005692215edfcf8bed3e86b1e07000148f986f5
      ae61f7118a92e097e854c840d5726c0920f5db0e

Bug: 25753404
Bug: 28103839
Change-Id: I3694edd80be6dfe18b90360e24ae4d451b331928
2016-04-10 20:28:40 -07:00
Bennie Ouyang
fc90ffe392 Merge "Added Notification Stress Tests" into nyc-dev 2016-04-08 16:58:21 +00:00
Bennie Ouyang
a6b8e9c313 Added Notification Stress Tests
Change-Id: I956ec68bf752becfedb3eca2483ae5c212166dd2
2016-04-07 16:15:50 -07:00
Adam Lesinski
41c1bb8f4a Merge "Remove tests that have been moved to CTS" into nyc-dev 2016-04-07 17:04:13 +00:00
Keisuke Kuroyanagi
d119ab94c0 Merge "Rewrite SuggestionsPopupWindowTest using espresso." into nyc-dev 2016-04-07 04:33:11 +00:00
Adam Lesinski
04518f8e9f Remove tests that have been moved to CTS
ag/906284

Change-Id: I9e5da9239a62dbc85a1b22f8fe8876da65675d9a
2016-04-06 17:47:10 -07:00
Keisuke Kuroyanagi
31eb74fb2b Rewrite SuggestionsPopupWindowTest using espresso.
- Rewrite existing test about text appearance.
- Add new tests for suggestions popup.

Bug: 25904136
Bug: 27765262
Change-Id: I12e522436a83fa264cd22176d054877eec411708
2016-04-06 19:37:46 +09:00
Makoto Onuki
ca94f29366 Merge "Make FastXmlSerializer more suitable to persist arbitrary strings" into nyc-dev 2016-04-06 00:36:52 +00:00
Siyamed Sinir
911c2694e2 Exclude unicode space characters from autoLink URL patterns
Excludes the following space characters from autoLink URL patterns:
\u00A0: no-break space
\u2000: en quad
\u2001: em quad
\u2002: en space
\u2003: em space
\u2004: three-per-em space
\u2005: four-per-em space
\u2006: six-per-em space
\u2007: figure space
\u2008: punctuation space
\u2009: thin space
\u200A: hair space
\u2028: line separator
\u2029: paragraph separator
\u202F: narrow no-break space
\u3000: ideographic space

Bug: 28020781
Change-Id: Ie6df818dc4d33dfee6ee54432a2231cca51ec423
2016-04-05 16:33:58 -07:00
Makoto Onuki
3ae3557ea3 Make FastXmlSerializer more suitable to persist arbitrary strings
- Encode '\u000' - '\u001F', so KXmlParser can read them properly.
Otherwise KXmlParser will ignore CRs/LFs in attributes, and CRs
in text.

- Originally FastXmlSerializer would throw if a string contains
dangling surrogate pairs.  Now we REPLACE them with.

Bug 27792649

Change-Id: I10c547dad2475b68f60e9e8208d9a3eae8e20063
2016-04-05 16:12:07 -07:00
Jeremy Joslin
b770ed1328 Merge "Have the NetworkScoreService bind to the scorer." into nyc-dev 2016-04-05 22:27:11 +00:00
Philip P. Moltmann
f4eadc5c53 We only have one mock service.
Fixes: 28024464
Change-Id: I1392704c4fdb9e7c3a4b1540131af8a14359c8f4
2016-04-05 15:16:54 -07:00
Jeremy Joslin
dd251ef495 Have the NetworkScoreService bind to the scorer.
If the current active scorer provides a service that can handle the
android.net.scoring.SCORE_NETWORKS action then the NetworkScoreService
will bind to that service to keep the scorer alive. If no service is
discovered then no attempt to bind will be made.

BUG: 27612145
Change-Id: I3f6ed0cbd83e658f1533c3e37b0cac2692c01761
2016-04-04 18:13:29 -07:00
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