Commit Graph

49998 Commits

Author SHA1 Message Date
Yin-Chia Yeh
bfbbee7566 Camera: update createStream API to add new rotation field
Change-Id: I0f4343a0bfa7bf09ba887c78a1da1c08daa35333
2015-03-16 13:48:15 -07:00
Raph Levien
676fa348d0 Merge "Start moving text measurement into native code" 2015-03-13 17:26:32 +00:00
Raph Levien
70616ecd22 Start moving text measurement into native code
We want to move text measurement into native code, mostly so that
alternate measurement for hyphens can be performant. This patch begins
that migration, in the main StaticLayout case, but still surfaces the
widths array to Java (for ellipsis calculation), and also includes a
hack (used mostly for testing) for computing widths in Java and sending
them down to native code when TextPaint is subclassed.

Change-Id: I476c9e8b3aa8e4e3552eb18f66c4bcd5683f3a72
2015-03-13 10:11:57 -07:00
Dianne Hackborn
484bc6e5a7 Merge "More work on collecting assist data." 2015-03-13 16:41:29 +00:00
Benjamin Franz
815eca184e Merge "Allow DO to set Settings.Global.STAY_ON_WHILE_PLUGGED_IN" 2015-03-13 16:03:05 +00:00
Santos Cordon
50ac385417 Merge "Do not hide any call log entries when they are added." 2015-03-13 16:00:37 +00:00
Yohei Yukawa
2fbea7ff90 Merge "Expose isSystemImeThatHasSubtypeOf to Settings" 2015-03-13 13:46:40 +00:00
Yohei Yukawa
9c83ff471d Expose isSystemImeThatHasSubtypeOf to Settings
This is a follow up CL for a recent attempt to minimize
the number of default enabled IMEs.
- part1: I831502db502f4073c9c2f50ce7705a4e45e2e1e3
- part2: Ife93d909fb8a24471c425c903e2b7048826e17a3
- part3: I6571d464a46453934f0a8f5e79018a67a9a3c845
- part4: I871ccda787eb0f1099ba3574356c1da4b33681f3

In the avobe CLs, an internal (hidden) method
InputMethodUtils.isValidSystemDefaultIme was marked as
deprecated and we decided to migrate to
InputMethodUtils.isSystemImeThatHasSubtypeOf.

To finish this refactoring, this CL make the new
method visible to the settings app.

InputMethodUtils.isValidSystemDefaultIme remains
to be an internal method. No behavior change is
intended.

Change-Id: I8cb9ca40d15af099c3d1ded46797fb57f14fb9e8
2015-03-13 22:43:06 +09:00
Clara Bayarri
80c3856122 Support a Primary and a Floating ActionMode in DecorView.
This CL modifies the support for a single ActionMode in PhoneWindow.
DecorView to support both a Primary and a Floating ActionModes
simultaneously.

Things pending after this CL:
- Handling an actual Floating ActionMode
- Cleaning up the now unused ActionModeWrapper and its related code

Change-Id: Ie2e5ec27393ce9eededadf5bc379bab39981a365
2015-03-13 10:51:51 +00:00
Clara Bayarri
4423d91de5 Add a type parameter to startActionMode() calls.
This requires adding a new method to View and Window.Callback to pass
down the type as a parameter.

For compatibility purposes, the new method implementations keep the
type and call the old method, in case clients have subclassed it.

Change-Id: If5d857f131e33be8cc6a8814f2e9c4e85ad2da25
2015-03-13 10:51:51 +00:00
Benjamin Franz
68cc42009e Allow DO to set Settings.Global.STAY_ON_WHILE_PLUGGED_IN
Bug: 19704419
Change-Id: I3fc970eae8ef947775b6b565916bb245dea1b43b
2015-03-13 09:44:44 +00:00
Andreas Gampe
db64454b33 resolved conflicts for merge of b6b9fe21 to master
Change-Id: If4f62aa1fd8bb774288a677e7008e86a7e3ea6d9
2015-03-13 00:04:10 -07:00
Wenchao Tong
c3b022ded1 Merge "NetworkStatsService to adjust VPN stats before recording." 2015-03-13 00:54:09 +00:00
Wenchao Tong
f5ea340aab NetworkStatsService to adjust VPN stats before recording.
* Creates a new Parcelable class VpnInfo to hold required
  parameters for VPN stats adjustments.
* ConnectivityService to collect infomation and provide
  a list of VpnInfo, one for each user.
* NetworkStatsService passes the VpnInfo array to
  NetworkStatsRecorder.
* NetworkStatsRecorder calls NetworkStats.migrateTun()
  to do the math.
* Poll NetworkStats when the vpn application calls
  setUnderlyingNetworks().

Bug: 19536273
Change-Id: I7a4c7726b8243fead10416f7ec6eb5cf95f20183
2015-03-12 17:43:41 -07:00
Hui Shu
d7c7e566aa Merge "Add API for WebView OffscreenPreRaster setting." 2015-03-13 00:38:47 +00:00
Dianne Hackborn
a83ce1dd2a More work on collecting assist data.
Optimize parceling of AssistData (which is now renamed to
AssistStructure) by pooling duplicated class name strings.

Change text associated with a view node to a CharSequence,
so styling information comes along.

Include global text attributes -- size, colors, etc.

Introduce a new AssistContent structure, which allows us
to propagate information about the intent and data the
activity is looking at.  This further allows us to propagate
permission grants, so the assistant can dig in to that data.
The default implementation propagates the base intent of an
activity, so if for example you bring up the assistant while
doing a share the assistant itself has the same information
and access that was given to the share activity (so it could
for example share it in another way if it wanted to).

Did some optimization of loading PersistableBundle from xml,
to avoid duplicating hash maps and such.

Changed how we dispatch ACTION_ASSIST to no longer include
the more detailed AssistStructure (and new AssistContent)
data when launching; now the example code that intercepts
that needs to be sure to ask for assist data when it starts
its session.  This is more like it will finally be, and allows
us to get to the UI more quickly.

Change-Id: I88420a55761bf48d34ce3013e81bd96a0e087637
2015-03-12 17:07:51 -07:00
Marco Nelissen
a80ac05f85 resolved conflicts for merge of 42f55d1e to master
Change-Id: I9c26861c5b0e26bb55e50b2133b7561348a01aec
2015-03-12 16:17:45 -07:00
Hui Shu
b1ee70b149 Add API for WebView OffscreenPreRaster setting.
BUG: 19592029
Change-Id: Ic903b823e5f7830e2cf2d4f3dd9a5458334648a3
2015-03-12 16:04:07 -07:00
Wenchao Tong
8726e9a73e Merge "NetworkStats to support VPN accounting." 2015-03-12 22:10:56 +00:00
Roozbeh Pournader
4f831caa49 Merge "Fix negative touch word offset that caused crashing when selecting text" 2015-03-12 21:45:22 +00:00
Jeff Brown
c3eea84a0b Merge "Revert "Update ParcelFileDescriptor to use non-blocking I/O."" 2015-03-12 21:25:40 +00:00
Jeff Brown
0f0b7f2fb3 Revert "Update ParcelFileDescriptor to use non-blocking I/O."
Bug: 19715279
This reverts commit a34a3bdcbf.

Change-Id: Ief03dee1c0a2b4d906797a5c279663c17439c347
2015-03-12 21:25:00 +00:00
Yin-Chia Yeh
d6ee06a0c8 Merge "Camera: add @hide API for setting camera rotation" 2015-03-12 20:36:49 +00:00
Mady Mellor
27d6b97f63 Fix negative touch word offset that caused crashing when selecting text
Previously the offset between the touch event and the start / end of
the word could result in a negative value - we don't care or want
this value to be negative. The negative value also causes the returned
offset to be outside the bounds of the text which resulted in a crash.

Bug: 19705184
Change-Id: I4287df7778c246dd10654f1a1f1e57538e940730
2015-03-12 19:24:26 +00:00
Santos Cordon
56027514f3 Do not hide any call log entries when they are added.
When a call log entry is added, and it's phone account does not match a
currently registered one, we set it to hidden.  This code was built for
the calllog restore case where call log entries would be hidden when
added if the original phone account wasn't also
present on the new device (where the restore is being performed).

We no longer do that so we're removing the code that sets any call log
entry to hidden.

Change-Id: I26ee27369e94c73446f7553f84cd4d8d4f2ff658
2015-03-12 11:55:32 -07:00
Filip Gruszczynski
c6ee744a90 Merge "Allow polling for WindowInsets." 2015-03-12 15:12:45 +00:00
Clara Bayarri
f84a9724f1 Move the "Replace" popup option to the Text Selection ActionMode.
As a first step in unifying the cut/copy/paste ActionMode in Editor
with the paste/replace popup, I'm moving the replace option to
the CAB ActionMode. Paste is already there, so for now all options
are together.

Missing things to address in upcoming CLs:
- Invoke the ActionMode in all cases where the popup shows up now,
ensuring only the options that are currently available show up.
- Get rid of the current popup
- Make the ActionMode a floating toolbar (pending feature completion)
- Define a keyboard shortcut for replace?

Note that since the ActionMode still shows up in the ActionBar and
replace has no icon it now appears as text and takes up lots of
space. This will improve when we can switch to using a floating
toolbar.

Change-Id: Ib6b60bae9b58e4db96b9c4cee556e19d3f1bb466
2015-03-12 10:31:11 +00:00
Lorenzo Colitti
b6b9fe216d am 2f196e6c: Merge "Remove dead code, mostly DataStateTracker."
* commit '2f196e6c81e50b70d56c1cc06fd2aec147b58ed8':
  Remove dead code, mostly DataStateTracker.
2015-03-12 07:38:50 +00:00
Lorenzo Colitti
2f196e6c81 Merge "Remove dead code, mostly DataStateTracker." 2015-03-12 07:27:27 +00:00
Jim Miller
216ce5d7b2 Merge "Add rename support to FingerprintManager" 2015-03-12 01:20:05 +00:00
Jim Miller
99d6019bea Add rename support to FingerprintManager
Bug 19592835

Change-Id: I656b3932caf2cfdb9a330522d171a59af2c7a2d1
2015-03-11 18:17:55 -07:00
Andreas Gampe
26c95085b3 am cdd3fb5c: Merge "Extracted a separate class to run dexopt on packages"
* commit 'cdd3fb5cdb9be8ae087c6d0fef2a545fca1c4205':
  Extracted a separate class to run dexopt on packages
2015-03-11 23:23:06 +00:00
Fyodor Kupolov
7487657ee9 Extracted a separate class to run dexopt on packages
performDexOptLibsLI and related methods were extracted to PackageDexOptimizer
class. Minor refactoring of PackageManagerService.

This is a non-functional change. It should simplify further work to allow
storing OAT files inside package dir.

(cherry picked from commit eeea67b8c3)

Change-Id: I3494a2da70605362bb6fb4625ffbee1cbe1cd457
2015-03-11 16:03:41 -07:00
Jeff Brown
a34a3bdcbf Update ParcelFileDescriptor to use non-blocking I/O.
Avoids spinning up a thread just to watch a file descriptor.

Bug: 10349083
Change-Id: I814cb252f075d7a162e1286bbfd1dbec28d17796
2015-03-11 15:37:21 -07:00
Jeff Brown
dc3eb4bf91 Add support for non-blocking I/O with Looper.
Bug: 10349083
Change-Id: I4a94b1eac53df57c05103913bd593d92b1e062d7
2015-03-11 15:00:35 -07:00
Jeff Brown
803c2affcb Expose some useful methods on Looper and clean up docs.
Change-Id: I40796c3ba07d3c50043da56e835f11fbf9852d30
2015-03-11 15:00:35 -07:00
Jeff Brown
3d4e7efe37 Move sync barrier methods into MessageQueue.
The methods were previously defined on Looper but on reflection
they actually make more sense on the MessageQueue instead since
the Looper class is primarily concerned with thread lifecycle
rather than the actual messages themselves.

Change-Id: Iff356b94754fc9960774fa17e3eec9604229cba6
2015-03-11 15:00:34 -07:00
Jeff Brown
6c7b41adf9 Rename Looper::isIdling() to isPolling() to resolve confusion.
The loop isn't technically idle at this time, it's just checking
whether any file descriptors have pending events.  However it's
still a good signal as to whether the loop is alive.

Added a real isIdle() function.

Bug: 19532373
Change-Id: Idd273e8774f469ccafb00d560818cf279dfd6ba6
2015-03-11 15:00:34 -07:00
Filip Gruszczynski
954289d9a9 Allow polling for WindowInsets.
Change-Id: I36feb2403b1bcf6de5d8808734c46999a38e7403
2015-03-11 14:11:58 -07:00
Alan Viverette
1130363f18 Merge "Various fixes for popup monkey testing" 2015-03-11 21:04:28 +00:00
Roozbeh Pournader
6c2f4484e3 Merge "Add a check for invalid spans being set by SpellChecker." 2015-03-11 20:09:38 +00:00
John Reck
5fcf44b10e Merge "Cleanups & simplifications" 2015-03-11 19:42:29 +00:00
Alan Viverette
8fd949e680 Various fixes for popup monkey testing
Ensures PopupMenu works correctly when multiple calls are made to show
and dismiss. Ensure PopupWindow works correctly when multiple calls are
made to showAsDropDown and dismiss (fixes multiple clicks on Spinner).

Bug: 19672907
Bug: 19671831
Change-Id: Ib92accd8fd70a1ff1f8cda27155347b007a4d25b
2015-03-11 12:21:30 -07:00
Raph Levien
60cd30d99e Merge "Fix android.text.cts.StaticLayoutTest#testGetEllipsisCount" 2015-03-11 18:33:59 +00:00
John Reck
b36016c65f Cleanups & simplifications
Change-Id: I5ad5e3b8fe55b1528f2e20c63e5abe51d9e40ff1
2015-03-11 11:29:13 -07:00
Marco Nelissen
42f55d1e68 am a3d25d74: Merge "Fix context leak"
* commit 'a3d25d7489d7e071fb6db01b62ec9d925e1d493d':
  Fix context leak
2015-03-11 18:21:24 +00:00
Roozbeh Pournader
4cdeeadd42 Add a check for invalid spans being set by SpellChecker.
One of the exit conditions of the loop immediately above the code is
when a BreakIterator finishes its input and emits BreakIterator.DONE,
which we were then mistakenly then using as a parameter for setting
spans.

Bug: 12936072
Bug: 5555929
Change-Id: Ib4aba113f2e7838cd040076160c1dd0fb90adb1a
2015-03-11 11:09:34 -07:00
Raph Levien
ce4155a204 Fix android.text.cts.StaticLayoutTest#testGetEllipsisCount
The "moreChars" predicate (which is used in ellipsis computation) was
slightly incorrect, sometimes being computed as false when the line
break is at the end of a paragraph but not the end of the buffer.
This patch makes the behavior consistent with shipping versions.

Bug: 19676414
Change-Id: I72e16794e895c2eb765b21feaf59fcdccc4857f1
2015-03-11 11:02:33 -07:00
Selim Gurun
78568bfa1f Merge "Implement PostMessage API for Webview" 2015-03-11 17:32:35 +00:00
Selim Gurun
4c8093afe3 Implement PostMessage API for Webview
Bug: 10237116

This CL implements the postmessage API for webview. It provides
a way for java applications to post messages to JS frames and
establish message channels, and then do full-duplex communication
after that.

Change-Id: Idbc2918552a4c9fd28ae1ddf19bd360e71f8a4a2
2015-03-11 10:21:59 -07:00