Commit Graph

5414 Commits

Author SHA1 Message Date
Mady Mellor
56ce4f6a18 am 15398fae: am 4241e307: am 21623faa: Merge "Fix issue where handle is in front of word rather than end of word" into mnc-dev
* commit '15398faeb0482c39075718d70f065ff33d01a2ce':
  Fix issue where handle is in front of word rather than end of word
2015-05-13 18:05:27 +00:00
Mady Mellor
21623faa44 Merge "Fix issue where handle is in front of word rather than end of word" into mnc-dev 2015-05-13 17:34:13 +00:00
Roozbeh Pournader
35a85ab057 am e652d17b: am 703b5078: am 0ca0f580: Merge "Add hyphenationFrequency attribute to TextView and StaticLayout." into mnc-dev
* commit 'e652d17b3e8af3c4e8e3355cca864e61aad0dc35':
  Add hyphenationFrequency attribute to TextView and StaticLayout.
2015-05-12 23:37:51 +00:00
Roozbeh Pournader
0ca0f58000 Merge "Add hyphenationFrequency attribute to TextView and StaticLayout." into mnc-dev 2015-05-12 22:59:47 +00:00
Roozbeh Pournader
95c7a13f2a Add hyphenationFrequency attribute to TextView and StaticLayout.
This patch adds plumbing to TextView and StaticLayout to control the
frequency of automatic hyphenation used in laying out paragraphs.

Bug: 21038249
Change-Id: Ib45de190eb0a1ed738e69fd61f2b39561b11aec7
2015-05-12 14:56:57 -07:00
Chris Craik
c6f9023ab1 am e9724679: am ca0790cd: am 6af2857a: Merge "Revert "Fix build - Revert "Revert "Use default constructor to get anti-aliasing"""" into mnc-dev
* commit 'e9724679302ddb0d83fa24d782601db7de30c050':
  Revert "Fix build - Revert "Revert "Use default constructor to get anti-aliasing"""
2015-05-12 20:11:48 +00:00
Mady Mellor
58c9087137 Fix issue where handle is in front of word rather than end of word
Previous getWordEnd and getWordStart functions would return a boundary
rather than a word end / start boundary in some cases. This behavior is
most evident when moving between short lines -- the handle would go to
the next boundary rather than the word end on the next line (and the
start handle would go to the word end rather than the word start on
the prev line).

This CL ensures that word or punctuation boundaries are returned and moves
most of the punctuation boundary logic into WordIterator since it makes
a bit more sense there.

Bug: 21030788
Change-Id: I96c6aff7f2c213aa3c4f66ac87ca913ca16fd347
2015-05-12 11:09:37 -07:00
Chris Craik
8420acd268 am 1d0b13b7: am db05ea90: am d2c05188: Merge "Fix build - Revert "Revert "Use default constructor to get anti-aliasing""" into mnc-dev
* commit '1d0b13b74797b27bd431d68f25fdd5e7c5ec751a':
  Fix build - Revert "Revert "Use default constructor to get anti-aliasing""
2015-05-12 18:00:43 +00:00
Chris Craik
4538cdbbb0 am 99aac0fc: am f3aad322: am fd41cf0c: Merge "Revert "Use default constructor to get anti-aliasing"" into mnc-dev
* commit '99aac0fc62a0b6f28bc732cd2153f8883ec7f09f':
  Revert "Use default constructor to get anti-aliasing"
2015-05-12 17:49:24 +00:00
Chris Craik
6a49ddef62 Revert "Fix build - Revert "Revert "Use default constructor to get anti-aliasing"""
Fix import

This reverts commit 7ed1431c83.

Change-Id: Id93eba3ed1d47a90384ba20dea6f74d78755792b
2015-05-12 10:44:30 -07:00
Chris Craik
7ed1431c83 Fix build - Revert "Revert "Use default constructor to get anti-aliasing""
This reverts commit dfe0a66cec.

Change-Id: I58a1bae649a284f3d3b6213064d903ea7fcf185a
2015-05-12 17:22:22 +00:00
Chris Craik
dfe0a66cec Revert "Use default constructor to get anti-aliasing"
bug:20948129

This reverts commit 58fc522a69.

Change-Id: Iddeccb4ad15b843bb3e610bd3673a0c7abc1bf46
2015-05-12 16:36:49 +00:00
Clara Bayarri
ff2b6f042c am eea5fe16: am 8086e031: am c12e4e46: Merge "Fix Floating toolbar is not refreshed when dragging insertion handle" into mnc-dev
* commit 'eea5fe16de77b645c2443758105930bbeee3001c':
  Fix Floating toolbar is not refreshed when dragging insertion handle
2015-05-12 09:58:59 +00:00
Clara Bayarri
c12e4e468f Merge "Fix Floating toolbar is not refreshed when dragging insertion handle" into mnc-dev 2015-05-12 09:06:06 +00:00
Svet Ganov
49b6b72a03 am f152ef2f: am 0bf290b9: am 981de3c5: Merge "Add permission meta-state flags to support grant/revoke permission policy." into mnc-dev
* commit 'f152ef2fd5b0d3e1251e1b1866e5c57a73dc7b0b':
  Add permission meta-state flags to support grant/revoke permission policy.
2015-05-12 00:43:38 +00:00
Svet Ganov
8c7f700a59 Add permission meta-state flags to support grant/revoke permission policy.
We now maintain a mata-state with each permission in the form of flags
specyfying the policy for this permission. This enables support of the
following use cases:

1. The user denies a permission with prejudice in which case an app cannot
   request the permission at runtime. If an app requests such a permssion
   it gets a denial unless the user grants the permission from settings.

2. A legacy app with disabled app-ops being upgraded to support runtime
   permissions. The disabled app ops are converted to permission revocations.
   The app ops manager is a part of the activity manger which sits on top
   of the package manager, hence the latter cannot have a dependency on the
   former. To avoid this the package installer which is the global
   permission managment authority marks the permission as revoked on
   upgrade and the package manager revokes it on upgrade.

3. A device policy fixing a permission in a granted or revoked state. This
   additional information is folded in the meta-state flags and neither
   apps can request such permissions if revoked not the user can change
   the permission state in the UI.

Change-Id: I443e8a7bb94bfcb4ff6003d158e1408c26149811
2015-05-11 17:13:57 -07:00
Clara Bayarri
1baed51603 Fix Floating toolbar is not refreshed when dragging insertion handle
Bug: 20922753
Change-Id: Iaee310ee0b8593df4d7846c2676e2c70011d0657
2015-05-11 15:29:16 +01:00
Alan Viverette
1c9c4b2967 am 155a9aef: am 98c664a9: am f659a56c: Merge "Replace usages of deprecated version of TextView.setTextAppearance()" into mnc-dev
* commit '155a9aef7f1a9edf25398e9630023d68f5354353':
  Replace usages of deprecated version of TextView.setTextAppearance()
2015-05-09 00:52:08 +00:00
Alan Viverette
f659a56c30 Merge "Replace usages of deprecated version of TextView.setTextAppearance()" into mnc-dev 2015-05-09 00:20:04 +00:00
Alan Viverette
bb98ebd6b1 Replace usages of deprecated version of TextView.setTextAppearance()
Change-Id: Ie501affe2e3a275d3172ce8ed584ba1cd5494da8
2015-05-08 17:17:44 -07:00
Mady Mellor
f01b6562ec am 435bbcaf: am e2698b7d: am db9629ee: Merge "Fix: Hard to modify multi-line selection." into mnc-dev
* commit '435bbcaf2c08add8ebc26e4d70f44ad28037cfea':
  Fix: Hard to modify multi-line selection.
2015-05-08 22:29:57 +00:00
Mady Mellor
db9629eec4 Merge "Fix: Hard to modify multi-line selection." into mnc-dev 2015-05-08 21:45:36 +00:00
Dianne Hackborn
cc1b7d06dc am a0f5356f: am 396345ca: am ed9af066: Merge "Fix issue #20655182: API Review: ViewAssistStructure" into mnc-dev
* commit 'a0f5356fdc84f5bf05677ae773bf168dc5349b7c':
  Fix issue #20655182: API Review: ViewAssistStructure
2015-05-08 21:14:38 +00:00
Dianne Hackborn
ed9af066b2 Merge "Fix issue #20655182: API Review: ViewAssistStructure" into mnc-dev 2015-05-08 20:42:12 +00:00
Siva Velusamy
eb1a7e9b4e am aa439dc3: am eb5d77e9: am 1f861997: Merge "Use new hierarchy viewer protocol in all View subclasses" into mnc-dev
* commit 'aa439dc38c6e276f763ba3127ad020938ba620f8':
  Use new hierarchy viewer protocol in all View subclasses
2015-05-08 16:58:10 +00:00
Chet Haase
d6d1e2db7e am 1ca73491: am 3d97900a: am c1125ded: Merge "Disable ActionBar animations pending more involved fix" into mnc-dev
* commit '1ca734918496a9938889a632e8cb2930f9003b30':
  Disable ActionBar animations pending more involved fix
2015-05-08 16:57:34 +00:00
Mady Mellor
1c16ff7510 am 7f29a802: am 8b54293f: am a18df8d6: Merge "Consider punctuation treatment when selecting text." into mnc-dev
* commit '7f29a802abe8b042956a6230966ada6fc0b3dd8b':
  Consider punctuation treatment when selecting text.
2015-05-08 16:57:29 +00:00
Keisuke Kuroyanagi
50a927cdd1 Fix: Hard to modify multi-line selection.
mTouchWordOffset was not appropriately updated when a
selection is modified across multiple lines.

Bug: 20650838
Change-Id: I46f5393970dc8d806719467bac489feac0fbe1a5
2015-05-07 19:30:30 -07:00
Siva Velusamy
94a6d15ede Use new hierarchy viewer protocol in all View subclasses
A previous CL introduced a new way of encoding view properties for
use by heirarchy viewer. This CL updates all views using the old
@ExportedProperty annotation to use this new method. The older
mechanism will be removed in a subsequent CL.

Change-Id: I6cc23b90cd9da1c6ce89b4caffe54874db203452
2015-05-07 18:44:21 -07:00
Maxim Bogatov
bbac0f7c73 Merge "Add support of performing clicks on ClickableSpans from AccessibilityService" 2015-05-08 01:33:51 +00:00
Maxim Bogatov
32e59d59f4 Add API for set progress on ProgressBar/SeekBar
b/12912083

Change-Id: I3a7807f0ac40220139da21248d539fa796d0a544
2015-05-07 17:55:57 -07:00
Maxim Bogatov
219b41dd50 Add support of performing clicks on ClickableSpans from AccessibilityService
Two optional parameters were added for ACTION_CLICK.
ACTION_ARGUMENT_CLICK_SPAN_INDEX_INT represents index of ClickableSpan to click on
ACTION_ARGUMENT_CLICK_CHARACTER_INDEX_INT represents index of character.
The first span that added for that character will be triggered.
If none of above parameters are passed with action the view will be clicked

b/17726921

Change-Id: Ia4d3994c1bca950319557ec7cdb2df84314d7519
2015-05-07 17:37:53 -07:00
Dianne Hackborn
49b043f37d Fix issue #20655182: API Review: ViewAssistStructure
Fix the various view assist related APIs.

Also remove the blockAssist view attribute, and instead use
the window's FLAG_SECURE to drive blocking of the entire
hierarchy (which is semantically correct, and will protect
existing apps that have already indicated they need it).

Change-Id: I6beebc86b202809cba0a356cae9607d8d0fb5e78
2015-05-07 16:30:52 -07:00
Chet Haase
c1125dedfc Merge "Disable ActionBar animations pending more involved fix" into mnc-dev 2015-05-07 22:00:18 +00:00
Mady Mellor
a18df8d6c7 Merge "Consider punctuation treatment when selecting text." into mnc-dev 2015-05-07 21:59:39 +00:00
Chet Haase
d96c87eb64 Disable ActionBar animations pending more involved fix
Recycling of ActionBar items can cause problems with the current
ActionBar animations, as the system animates views that represent both
pre- and post-layout changes, sometimes causing opposit animations to
run on the same view, resulting in unpredictable effect slike views
remaining invisible.

This 'fix' is a workaround to disable item animations pending a more
complete and robust fix that involves a more involved system of view
recycling that would avoid recycling views that are currently being used
in animations.

Issue #20538912 Menu missing in Downloads app

Change-Id: I7b1d3baf94378e4788f868801a452c6583353842
2015-05-07 21:59:26 +00:00
Keisuke Kuroyanagi
636a0da805 Merge "Fix: A part of grapheme cluster can be selected." into mnc-dev 2015-05-07 21:37:50 +00:00
Mady Mellor
6fc03e6523 Merge "Revert "Text selection - Don't select vertical white space"" into mnc-dev 2015-05-07 21:13:43 +00:00
Mady Mellor
6c7b4ad690 Consider punctuation treatment when selecting text.
This treats punctuation as "words", so groups of punctuation will be
selected together, i.e. "Hmm... yay!!!" would be treated as four words:
Hmm-...-yay-!!!

Bug: 19950062
Change-Id: Ic9514c524092734fad1abdf19a736bfa1406157b
2015-05-07 21:05:36 +00:00
Mady Mellor
6a6126834e Revert "Text selection - Don't select vertical white space"
This reverts commit b9bbbb1d97.

Bug: 20653654
Change-Id: Id96409ac17783bd1e7055913f14de8741d0f9caf
2015-05-07 21:03:57 +00:00
Alan Viverette
c8bfc68cdd Only resize list popup if it's still attached to a window
We can't rely on ListPopupWindow.dismiss() to get called before the popup
is removed, for example when the activity hosting the popup is finished,
but we can easily ensure that the popup is still attached to a window.

Bug: 20831507
Change-Id: I9dcaa46e68df3f2b301cf299fa64d460c7e177fd
2015-05-07 13:00:25 -07:00
Adam Powell
6711f3b34c Move PhoneWindow and friends back into internal package
PhoneWindow, PhoneLayoutInflater and PhoneFallbackEventHandler decided
to @hide out over in the android.view package after the policy jar was
disbanded. Give them a more appropriate home over in framework that
doesn't imply that they should be accessed from other internal layers
of abstraction.

Bug 19606548

Change-Id: Id07b791d178fa447010b49b24726b52208838e88
2015-05-06 15:57:09 -07:00
Alan Viverette
4d5c20c613 Merge "ListPopupWindow should use window layout type SUB_PANEL" into mnc-dev 2015-05-06 17:24:31 +00:00
Prerepa Viswanadham
d1808401ca Merge changes from topic 'mwd-merge-050415' into mnc-dev
* changes:
  Merge commit 'b6f59f4' into master_merge
  Merge commit 'f6db0ce' into master_merge
  Merge commit '17455a3' into master_merge
  Merge commit 'b4d5b32' into master_merge
  Merge commit 'a1a2fa7' into master_merge
  Merge commit '8dfdb98' into master_merge
  Merge commit 'eba66c3' into master_merge
2015-05-05 01:06:38 +00:00
Raph Levien
5c26876304 Merge "Expose StaticLayout.Builder publicly" into mnc-dev 2015-05-02 00:42:18 +00:00
Raph Levien
4bf4e4c801 Merge "Make Paint a required field of StaticLayout Builder" into mnc-dev 2015-05-02 00:41:51 +00:00
Yohei Yukawa
b6bec1a403 Remove unused methods/variables/fields from Editor.java.
This CL does nothing but remove unused code.

Change-Id: Ibe7c7aa1b9bdfd4117e27cb198082e307f4d68a4
2015-05-01 23:30:35 +00:00
Raph Levien
531c30c62b Expose StaticLayout.Builder publicly
Expose the new Builder pattern for creating StaticLayout. This allows
access to a number of features that have been available to TextView
through a hidden constructor. Some of these features have existed
for a while (mostly maxLines), while others are new (breakStrategy,
indents).

The builder is cleaner and has a better upgrade path than the old
pattern of lots of constructors with varying numbers of arguments.

Bug: 20190561
Change-Id: Ia3cd124825ab0cb469d22d1fc576ad26454545b8
2015-05-01 15:15:48 -07:00
Alan Viverette
da0d6a6b8a Merge "Correctly handle intercepted touch events in FastScroller" into mnc-dev 2015-05-01 18:30:26 +00:00
Alan Viverette
fb99ba895e Correctly handle intercepted touch events in FastScroller
Previously we'd return true from onIntercept and assume the DOWN event
was handled, then onTouch would return false and the host view would
receive the DOWN event. Now we consume the event in onTouch.

Bug: 19080751
Change-Id: I1bd35b4c25a0760f4248ade443d09b8ca4b71e7c
2015-05-01 10:10:15 -07:00