Commit Graph

5372 Commits

Author SHA1 Message Date
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
Yohei Yukawa
85d08f1bf8 Suggestions popup must be dismissed before device rotation.
This is a follow up CL for Ia515fc576ddf2127b2f9863cc2652aeb619fff6e
for Bug 5420741, which had basically the same goal to Bug 20158984.

The goal here is to dismiss any popup window opened by the TextView
when the device is about to be rotated.  This is important because
Window Manager and Input Method Manager Service are really sensitive
about which window is focused before and after the device is rotated.

In Ia515fc576ddf2127b2f9863cc2652aeb619fff6e, we tried to distinguish
two kinds of focus-lost. One is the true focus lost where suggestions
pop-up (if any) should be dismissed, and the other is an side effect
of showing the suggestions pop-up itself. We have used isShowingUp()
to distinguish distinguish one from the other. In short, it
indicates whether onWindowFocusChanged() is not called yet or is
called at least once.

In extract edit mode, however, it turned out that
onWindowFocusChanged() is never called (at least in recent builds).
As a result, the popup window is not dismissed when it should be.
One of the smallest solution would checking isShowingUp() only when
the target TextView is not ExtractEditText.

Adding unit test would be handled as Issue #20703391.

BUG: 5420741
BUG: 20158984
BUG: 20703391
Change-Id: I1706cf2ea0b0bdfe8894ab57fc3caa8ff12d8aab
2015-04-30 17:22:28 -07:00
Alan Viverette
80ebe0d4ec ListPopupWindow should use window layout type SUB_PANEL
Look down, back up, where are you? You're in a dialog with an
AutoCompleteTextView. What's on your screen? I have it, it's the
auto-completion results you could be seeing. Look again. The window
layout type is now TYPE_APPLICATION_SUB_PANEL and the auto-completion
results are visible.

Also adds API on ListPopupWindow to specify the window layout type
and changes the text editing handle to be type ABOVE_SUB_PANEL.

Bug: 18530738
Change-Id: Id5577c4892729920de5b73411e580e6b2b2401d0
2015-04-30 15:53:11 -07:00
Raph Levien
ebd66ca600 Make Paint a required field of StaticLayout Builder
This patch moves the Paint parameter from being an option set from
setPaint to being a required field passed into the obtain() method
of StaticLayout.Builder. Thus, it is now possible to get a valid
StaticLayout object just doing .build() on the Builder; all other
fields are optional.

This is in preparation for exposing the builder publicly, but that
is to be a separate CL.

Bug: 20190561

Change-Id: Iefd7800203004e565d068b0c76502cf7cf52d91f
2015-04-30 15:38:17 -07:00
Alan Viverette
b0f13dc4be am 68999a74: am 19b9f8ef: am 8310f87d: Merge "ActionBar SearchView\'s default hint shouldn\'t override SearchableInfo" into mnc-dev
* commit '68999a740c511abe0550c721e13580b8d041de51':
  ActionBar SearchView's default hint shouldn't override SearchableInfo
2015-04-30 16:25:24 +00:00
Alan Viverette
68999a740c am 19b9f8ef: am 8310f87d: Merge "ActionBar SearchView\'s default hint shouldn\'t override SearchableInfo" into mnc-dev
* commit '19b9f8ef3eaf392db0a993ae0d5a7a84e9d6c60f':
  ActionBar SearchView's default hint shouldn't override SearchableInfo
2015-04-30 16:21:57 +00:00
Alan Viverette
8310f87d96 Merge "ActionBar SearchView's default hint shouldn't override SearchableInfo" into mnc-dev 2015-04-30 15:59:21 +00:00
Maxim Bogatov
aba56b648f Merge "Add accessibility actions for scrolling in different directions" 2015-04-30 01:16:02 +00:00
Alan Viverette
b4004dfc84 ActionBar SearchView's default hint shouldn't override SearchableInfo
Moves the queryHint to defaultQueryHint, specifies the override order
as queryHint > SearchableInfo > defaultQueryHint.

Cleans up annotations and comments for several related methods.

Bug: 20614122
Change-Id: Ib58ec309e6814cd512df147d789ec0cd546018af
2015-04-29 16:55:42 -07:00
Abodunrinwa Toki
8020631fa4 am 45b04c1a: am 47ea8b3d: Merge "DO NOT MERGE: Update floatingtoolbar position when cursor moves." into mnc-dev
* commit '45b04c1a5ef4f21b14b40dd0c1035933188da322':
  DO NOT MERGE: Update floatingtoolbar position when cursor moves.
2015-04-29 17:43:40 +00:00
Abodunrinwa Toki
47ea8b3d6b Merge "DO NOT MERGE: Update floatingtoolbar position when cursor moves." into mnc-dev 2015-04-29 17:26:29 +00:00
Andrei Stingaceanu
da8d35cd31 am 78a4348a: am eea5a9e0: Merge "DO NOT MERGE - Minor clean up: redundant functionality in Editor and TextView." into mnc-dev
* commit '78a4348a535e530ae77c0e7777247d495596be7c':
  DO NOT MERGE - Minor clean up: redundant functionality in Editor and TextView.
2015-04-29 16:47:25 +00:00
Andrei Stingaceanu
eea5a9e0de Merge "DO NOT MERGE - Minor clean up: redundant functionality in Editor and TextView." into mnc-dev 2015-04-29 16:21:16 +00:00
Alan Viverette
2ceea2160e am 9c36ee9b: am 2ddfcc4a: Merge "Context leaks in EditText causes out of memory"
* commit '9c36ee9b4f42909c1a425322e4e2d3e86dd6edc5':
  Context leaks in EditText causes out of memory
2015-04-29 05:34:45 +00:00
Alan Viverette
9c36ee9b4f am 2ddfcc4a: Merge "Context leaks in EditText causes out of memory"
* commit '2ddfcc4ade5d6db69808a340ae54280872559ec1':
  Context leaks in EditText causes out of memory
2015-04-29 04:54:28 +00:00
Alan Viverette
2ddfcc4ade Merge "Context leaks in EditText causes out of memory" 2015-04-29 04:19:40 +00:00
Alan Viverette
20eea98ecd am 8f021114: am 837bf24e: am e861c8eb: Merge "Fix DatePicker max date, disabled day color, and arrow visibility" into mnc-dev
* commit '8f021114b1b04639130e1f084e5a512ba58996d6':
  Fix DatePicker max date, disabled day color, and arrow visibility
2015-04-29 02:25:11 +00:00
Chris Craik
3f3839bad0 am e01d4b35: am 4f66e48d: am 2f1d09c3: Merge "Use default constructor to get anti-aliasing" into mnc-dev
* commit 'e01d4b35664070953adc28e8cc77c579579d41a6':
  Use default constructor to get anti-aliasing
2015-04-29 02:23:57 +00:00
Chris Craik
c7850626e4 am 4527289b: am 0e7d1432: am ff623a5a: Merge "Remove unused flags and dirty rects" into mnc-dev
* commit '4527289b767865053ef6fa6aaa0a836ecba29dbb':
  Remove unused flags and dirty rects
2015-04-29 02:23:51 +00:00
Alan Viverette
8f021114b1 am 837bf24e: am e861c8eb: Merge "Fix DatePicker max date, disabled day color, and arrow visibility" into mnc-dev
* commit '837bf24ee4c44d344f6fc5959c758bf3c287e8b3':
  Fix DatePicker max date, disabled day color, and arrow visibility
2015-04-29 02:00:31 +00:00
Chris Craik
e01d4b3566 am 4f66e48d: am 2f1d09c3: Merge "Use default constructor to get anti-aliasing" into mnc-dev
* commit '4f66e48de3a66ca41916b897f0898f8eb23aa2ac':
  Use default constructor to get anti-aliasing
2015-04-29 01:59:11 +00:00
Chris Craik
4527289b76 am 0e7d1432: am ff623a5a: Merge "Remove unused flags and dirty rects" into mnc-dev
* commit '0e7d1432d4ef5662c4aa7e89adf3f43a8761f4bd':
  Remove unused flags and dirty rects
2015-04-29 01:59:03 +00:00
Alan Viverette
e861c8eb63 Merge "Fix DatePicker max date, disabled day color, and arrow visibility" into mnc-dev 2015-04-28 23:39:23 +00:00
Chris Craik
2f1d09c3c5 Merge "Use default constructor to get anti-aliasing" into mnc-dev 2015-04-28 22:06:17 +00:00
Alan Viverette
5c33949d02 Fix DatePicker max date, disabled day color, and arrow visibility
Day validation moved from the PagerAdapter to the DayPickerView,
which is widget that actually handles the touch interaction and
disabled state for individual days.

Fixed disabled states for primary and secondary activated text
colors. Replaced old light/dark color state lists with themed
versions.

Removed conflicting view visibility changes for managing next and
previous arrows in DayPickerView.

Bug: 20630417
Bug: 20641013
Bug: 20641879
Change-Id: Icdaf02a3b57ec162169c31b8a27ebea908552321
2015-04-28 14:07:36 -07:00
Chris Craik
58fc522a69 Use default constructor to get anti-aliasing
Change-Id: I3e078a3bc91a2fd703984ba18b5e7e98069b32f1
2015-04-28 11:49:27 -07:00
Alan Viverette
4a4902a88f am 5b276f1c: am 6af08c6b: Merge "Fix for infinite loop in RemoteViewsAdapter"
* commit '5b276f1c03ea85bb7c5e81223b6fdd5d6beb5231':
  Fix for infinite loop in RemoteViewsAdapter
2015-04-28 17:47:08 +00:00
Alan Viverette
5b276f1c03 am 6af08c6b: Merge "Fix for infinite loop in RemoteViewsAdapter"
* commit '6af08c6b7693b4329184c9cccbc474a0b6a9ea5c':
  Fix for infinite loop in RemoteViewsAdapter
2015-04-28 17:40:05 +00:00
Alan Viverette
6af08c6b76 Merge "Fix for infinite loop in RemoteViewsAdapter" 2015-04-28 17:10:41 +00:00
Abodunrinwa Toki
bcdf0ab13d DO NOT MERGE: Update floatingtoolbar position when cursor moves.
NOTE: This is only done on ACTION_UP event since the toolbar is
going to be hidden while one is dragging the handles.

Change-Id: Id09fc076edb0117ebceb26395ac91ee4d2283c2d
2015-04-28 17:46:17 +01:00
Andrei Stingaceanu
47f82ae811 DO NOT MERGE - Minor clean up: redundant functionality in Editor and TextView.
This is a no-op.

Change-Id: I28ec363a256d3d1a94e378d428897cc67c77d578
2015-04-28 17:43:54 +01:00
Chris Craik
956f340aac Remove unused flags and dirty rects
bug:17209071

Also update DisplayList->RenderNode naming in Editor

Change-Id: I1d505640ba7388a0b0042d9c787f859e45a24da5
2015-04-28 09:40:01 -07:00
Keisuke Kuroyanagi
dda59d7ebf am 716a5690: am a3a411ec: am d2b9bd80: Merge "Fix: End handle disappears when the selection is short." into mnc-dev
* commit '716a569053e9a58caad7a0ca68797dad786713ad':
  Fix: End handle disappears when the selection is short.
2015-04-28 15:16:36 +00:00
Robert Shih
e08e13363f am 8bf6e936: am ce1ff57f: am 43429656: Merge "MediaController: workaround to disable seek" into mnc-dev
* commit '8bf6e93698b056a3ffb4665dbfd79f5a393b8601':
  MediaController: workaround to disable seek
2015-04-28 15:16:09 +00:00
Keisuke Kuroyanagi
d2b9bd80a2 Merge "Fix: End handle disappears when the selection is short." into mnc-dev 2015-04-28 04:58:45 +00:00
Tor Norbye
7b4b844fdf Merge "Annotate some APIs with threading annotations" 2015-04-27 22:51:35 +00:00
Robert Shih
39dbbd93e4 MediaController: workaround to disable seek
An example use case is live HLS streams.

Bug:19489473
Change-Id: I9c278f2875a5faaf1af092cc84888d4280a00747
2015-04-27 14:42:22 -07:00
Maxim Bogatov
ac6ffce171 Add accessibility actions for scrolling in different directions
b/20157498

ACTION_SCROLL_UP, ACTION_SCROLL_DOWN, ACTION_SCROLL_LEFT and ACTION_SCROLL_RIGHT
actionos were added in addition to ACTION_SCROLL_FORWARD/BACKWARD

Change-Id: I8d5182a8add32085a354b280496b3d38ec79be32
2015-04-27 13:45:58 -07:00
Keisuke Kuroyanagi
f6a78de10f am 838a99e9: am bde00321: am 28b5b144: Fix: Selection handles are wrongly shown.
* commit '838a99e9adcdd065582956cac5150483535da4ae':
  Fix: Selection handles are wrongly shown.
2015-04-27 15:51:33 +00:00
Abodunrinwa Toki
0fe6ab7960 Merge "Update floatingtoolbar position when cursor moves." 2015-04-27 12:01:02 +00:00
Keisuke Kuroyanagi
28b5b14449 Fix: Selection handles are wrongly shown.
Selection handles were always shown when selection action
mode is started at first time. When the action mode is
started without a selection, only insertion handle must be
shown.

Bug: 20264980
Bug: 20407551

Change-Id: I630804e007f795d28f87e3fa6cba0de5bf588c78
2015-04-27 09:48:26 +00:00
Keisuke Kuroyanagi
6cda1e28e3 Fix: End handle disappears when the selection is short.
HandleView#isVisible didn't use getHorizontalOffset; thus,
the position is always computed as if Gravity.LEFT is set.
As a result, isVisible can be wrongly false for the end
handle and the handle is dismissed.

Bug: 20480054
Change-Id: Ib3242000bb98ae28e0cb37bf5b05069754abbfc6
2015-04-27 09:45:06 +00:00