Commit Graph

5793 Commits

Author SHA1 Message Date
Yoshiki Iguchi
fb8343549a Fix crash on calling removeSelection with showing selection handlers am: 9582e15196 am: 6649ee972b
am: 6a5bb1534c

* commit '6a5bb1534c736c21260c5c488ff58e4d81972f92':
  Fix crash on calling removeSelection with showing selection handlers
2015-10-22 07:49:00 +00:00
Yoshiki Iguchi
6649ee972b Fix crash on calling removeSelection with showing selection handlers
am: 9582e15196

* commit '9582e151964be60457d4abd712857fb1e8a4586d':
  Fix crash on calling removeSelection with showing selection handlers
2015-10-22 07:39:17 +00:00
Yoshiki Iguchi
9582e15196 Fix crash on calling removeSelection with showing selection handlers
A crash occured on updating after calling removeSelection with showing
selection handlers. This was because some selection-handler code didn't
consider the case the selection index was -1 (-1 means there is no selection).
This patch fixes this crash.

Bug: 23299977
Change-Id: I736d315e073f773aec597522203015205a8da42b
2015-10-22 07:28:47 +00:00
Andrei Stingaceanu
fe622345b0 Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev am: ee4ab0a55b am: 24fc647e70
am: 509a74972a

* commit '509a74972af13c845a67ad9edddd8e413cc7884a':
  Fix toolbar flickering in ExtractedMode when longpressing.
2015-10-21 16:55:37 +00:00
Andrei Stingaceanu
24fc647e70 Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev
am: ee4ab0a55b

* commit 'ee4ab0a55b355b21168de0eb5615f2e321c2982f':
  Fix toolbar flickering in ExtractedMode when longpressing.
2015-10-21 16:03:52 +00:00
Andrei Stingaceanu
ee4ab0a55b Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev 2015-10-21 15:56:26 +00:00
Andrei Stingaceanu
2aaeefec92 Fix toolbar flickering in ExtractedMode when longpressing.
onPreDraw starts an action mode in extract mode only which
does not consider the type of motion event and since extracted
mode never gets the focus event it never hides so it does not
need to show again.

Stop starting an action mode onPreDraw in extracted mode and
let the onTouchEvent handle starting the mode.

Also re-enabled dragging and dropping for ExtractedMode (most
of the issues were caused by starting the action mode
onPreDraw).

Bug: 25102276
Change-Id: I90d8e9f42f395b6b529e4d023ba6939e0dfb147f
2015-10-21 15:42:00 +01:00
Alan Viverette
e21329ad86 Merge "DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure" into mnc-dr-dev am: 4823493647 am: ac02be311d
am: 41707942a8

* commit '41707942a8aea8c9122482f28f2fd599e55d0791':
  DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure
2015-10-20 22:27:25 +00:00
Alan Viverette
ac02be311d Merge "DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure" into mnc-dr-dev
am: 4823493647

* commit '482349364715dfcd87dc83e0913fc60dc6df0497':
  DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure
2015-10-20 21:56:40 +00:00
Alan Viverette
4823493647 Merge "DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure" into mnc-dr-dev 2015-10-20 21:44:35 +00:00
Alan Viverette
b5817779a9 DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure
Bug: 22824701
Bug: 25107144
Change-Id: Ia0afd3edc20b8127605aef2653fa9b5472f41be2
(cherry picked from commit 130ce740d1)
2015-10-20 17:29:39 -04:00
Abodunrinwa Toki
4d14e65cdf Merge "Re-set PROCESS_TEXT selection if nothing was returned." into mnc-dr-dev am: 3bd3655fd0 am: 9e97c20ed9
am: 0eef4ab567

* commit '0eef4ab5678f9f3eaecd74b5e00990cef5b8d967':
  Re-set PROCESS_TEXT selection if nothing was returned.
2015-10-20 18:51:03 +00:00
Alan Viverette
27c5cbe5a8 Merge "Update drawable matrix when bounds change in invalidateDrawable()" into mnc-dr-dev am: 840f38905c am: e3d745291e
am: c3e46adc77

* commit 'c3e46adc7797b4e894ef1e8ffd972acddb8fbbfa':
  Update drawable matrix when bounds change in invalidateDrawable()
2015-10-20 18:27:41 +00:00
Abodunrinwa Toki
9e97c20ed9 Merge "Re-set PROCESS_TEXT selection if nothing was returned." into mnc-dr-dev
am: 3bd3655fd0

* commit '3bd3655fd05a548f6e60cfccd4185a4b9ae2a7d6':
  Re-set PROCESS_TEXT selection if nothing was returned.
2015-10-20 18:06:44 +00:00
Abodunrinwa Toki
3bd3655fd0 Merge "Re-set PROCESS_TEXT selection if nothing was returned." into mnc-dr-dev 2015-10-20 17:47:28 +00:00
Alan Viverette
e3d745291e Merge "Update drawable matrix when bounds change in invalidateDrawable()" into mnc-dr-dev
am: 840f38905c

* commit '840f38905c073044077cb2bef68d20971f5d3d39':
  Update drawable matrix when bounds change in invalidateDrawable()
2015-10-20 17:24:45 +00:00
Abodunrinwa Toki
3b8a5ea036 Re-set PROCESS_TEXT selection if nothing was returned.
Bug: 25043887
Change-Id: If069a5e23f1adf6a2c3aac8fe7e3f19cff2e28ad
2015-10-20 17:11:26 +01:00
Alan Viverette
01320de844 Update drawable matrix when bounds change in invalidateDrawable()
Bug: 24797872
Change-Id: Ib2bcce6f7d6fab33633a915882821b00d94e4e44
2015-10-20 13:51:21 +00:00
Alan Viverette
8a0c8e78a7 am 6a06f12c: Merge "Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams"
* commit '6a06f12c3fa6a84306dc17f60eb16cdc25bc34b5':
  Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams
2015-10-07 16:34:35 +00:00
Alan Viverette
4524278bcb am 7de6ae15: Merge "To call TypedArray.recycle() when we are done with the array."
* commit '7de6ae159e0652cabe57ea8814ce8633049644a2':
  To call TypedArray.recycle() when we are done with the array.
2015-10-07 16:34:26 +00:00
Alan Viverette
6a06f12c3f Merge "Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams" 2015-10-07 16:23:36 +00:00
Alan Viverette
7de6ae159e Merge "To call TypedArray.recycle() when we are done with the array." 2015-10-07 16:22:36 +00:00
Gus Prevas
3197cd36fe am 41110261: am b17d1e5e: Merge "Adds an option to override RemoteViews transition." into cw-e-dev
* commit '41110261bb4f9f733b579b3dc26d3d6de5642ef5':
  Adds an option to override RemoteViews transition.
2015-09-25 18:09:41 +00:00
Gus Prevas
1ed322b123 Adds an option to override RemoteViews transition.
This change adds a configuration option,
"config_overrideRemoteViewsActivityTransition", which is false by
default and true on watches.  If it's true, when a RemoteViews
is clicked, it will use a new attribute on the active window animation
style, "activityOpenRemoteViewsEnterAnimation", to determine
the entry transition to use, instead of the current hard-coded
default.

Bug: 23534750
Change-Id: I91e92804a663ab71a3e46c3430fa579b87cc7931
2015-09-25 13:10:52 -04:00
Alan Viverette
f9a75e1a84 am 7914680e: am 58c483fc: am 62b94c35: Merge "Avoid OOBE when AbsListView layout is out of sync with adapter" into mnc-dr-dev
* commit '7914680e1ec319f50cb99b6c761aace56fc6e3ed':
  Avoid OOBE when AbsListView layout is out of sync with adapter
2015-09-11 23:30:34 +00:00
Alan Viverette
a84dda54e4 Avoid OOBE when AbsListView layout is out of sync with adapter
Views are not synchronized with adapter state until a layout pass
occurs, which may cause an OOBE if a list item is removed and an
accessibility node is obtained before the next layout pass.

This CL caches the item's enabled state on the bound view's layout
params, which allows us to avoid relying on the adapter to populate
accessibility nodes. It also aborts actions if the target position
is no longer valid.

Updates the documentation on AdapterView to reflect that the result
of getPositionForView() may not be synchronized with the adapter.

Bug: 23943664
Change-Id: I90ca946bead1d87a179eab1c2f482a54bcce9c38
2015-09-10 15:17:11 +00:00
Alan Viverette
8d8c53df26 am 76c73ae4: am 12874d2d: am b9b57225: am 95137857: Merge "Avoid NPE when getPositionForView() is called on detached view" into mnc-dev
* commit '76c73ae495fe9bad5ed51b96cd8e509dbb8de46f':
  Avoid NPE when getPositionForView() is called on detached view
2015-08-26 21:13:04 +00:00
Alan Viverette
3b83e5bf7b am 95137857: Merge "Avoid NPE when getPositionForView() is called on detached view" into mnc-dev
* commit '9513785715e2325ee3a3269fbfe7b1f4409eff5c':
  Avoid NPE when getPositionForView() is called on detached view
2015-08-26 20:45:42 +00:00
Alan Viverette
898c7045e0 Avoid NPE when getPositionForView() is called on detached view
Bug: 23557674
Change-Id: I76cb5f06081b2ac4c8f535df8d1a0aee17d2bb20
2015-08-26 15:22:09 -04:00
Raph Levien
d202d15d9e am cf2d44be: am 855a862f: am c98a786c: am beabcb92: Merge "Fix Insertion ActionMode not showing on RTL languages" into mnc-dev
* commit 'cf2d44bee50dc2950181bbf5974c32eacea6f0a7':
  Fix Insertion ActionMode not showing on RTL languages
2015-08-12 21:31:07 +00:00
Raph Levien
9dc2d5cd5b am beabcb92: Merge "Fix Insertion ActionMode not showing on RTL languages" into mnc-dev
* commit 'beabcb92cbdec6f68bd712c9972e6f8377b78f46':
  Fix Insertion ActionMode not showing on RTL languages
2015-08-12 21:08:13 +00:00
Clara Bayarri
f95ed10d9d Fix Insertion ActionMode not showing on RTL languages
When long pressing on an empty Text field with the system language set
to RTL, the "paste" popup was not showing up.

The Floating Toolbar requires a content rect to determine where the
text is and place itself close to it. In the case of an empty field,
we create a "fake" content rect by taking the placement of the cursor
+1 pixel to the right. In RTL languages, this +1 causes the content
rect to be considered off the bounds of the view, as the cursor is
aligned to the right, and hence the Floating Toolbar is hidden.

After making the rect a 0 width rect, we ran into the issue that
it was considered out of bounds due to the calculation ignoring rects
that simply touch the edge of the view's bounds.

BUG: 22540083
Change-Id: I29c79b701f586970b2611178233eff082b802ec1
2015-08-12 21:03:28 +01:00
Alan Viverette
1da56c0bc9 am 3fd42737: am 8a782c9d: am db576e1d: am c7f8133f: Merge "Update anchor background on the correct view in PopupWindow" into mnc-dev
* commit '3fd42737b77e499a0f8ed5ef8aa14ebdcf5f7767':
  Update anchor background on the correct view in PopupWindow
2015-08-06 18:19:40 +00:00
Alan Viverette
ad8537778f am c7f8133f: Merge "Update anchor background on the correct view in PopupWindow" into mnc-dev
* commit 'c7f8133fa1ff78fea5a54974b5987791cb012f84':
  Update anchor background on the correct view in PopupWindow
2015-08-06 17:55:02 +00:00
Alan Viverette
c7f8133fa1 Merge "Update anchor background on the correct view in PopupWindow" into mnc-dev 2015-08-06 17:48:22 +00:00
Chet Haase
ddc1598871 am f7d8577e: am 42c70645: am aed2e8ba: am da493aa6: Merge "Avoid changing internal state of shared drawable" into mnc-dev
* commit 'f7d8577ed048361ffac711a721acc69f83ab6e01':
  Avoid changing internal state of shared drawable
2015-08-06 16:50:40 +00:00
Alan Viverette
697804e8de Update anchor background on the correct view in PopupWindow
We were always setting the background of the decor view when the
"above anchor" state changed, rather than the background view.

Bug: 22970244
Change-Id: I3cd7202767ee47cb415736bb3c07369801abccd8
2015-08-06 12:36:47 -04:00
Chet Haase
26762506bc am da493aa6: Merge "Avoid changing internal state of shared drawable" into mnc-dev
* commit 'da493aa6eab24de98b63cc63c457f5b899da3ad2':
  Avoid changing internal state of shared drawable
2015-08-06 16:29:00 +00:00
Chet Haase
da493aa6ea Merge "Avoid changing internal state of shared drawable" into mnc-dev 2015-08-06 16:23:20 +00:00
Chet Haase
bfa11e4ab8 Avoid changing internal state of shared drawable
An optimization in ImageView nulled out the internal bitmap of a cached
internal BitmapDrawable object created to wrap a bitmap set on the ImageView.
However, apps can get ahold of that cached object via Drawable.getBitmap(),
resulting in having the state of that object they may be using changing out
from under them.

The change is to null out the cached object when getDrawable() is called, to avoid
leaking internal state that we may change.
That way, the app can continue to use that object if they want to, but we are no longer
relying on it internally, and will create a new one when needed.

Issue #22930646  [1P Regression from L] ImageView is blanked out in Activity in Google Express

Change-Id: Ic86cb93be4897b6ba247c1fabcda507e4ba01300
2015-08-06 07:55:24 -07:00
Vladislav Kaznacheev
e07e684f43 am 469840aa: am c3213285: am 072097bd: am 8cc00243: Merge "Keep OverScroller.SplineOverScroller state consistent." into mnc-dev
* commit '469840aa48e30d96a1f5329d38e177ab18b924d9':
  Keep OverScroller.SplineOverScroller state consistent.
2015-08-05 20:07:54 +00:00
Vladislav Kaznacheev
af0a618456 am 8cc00243: Merge "Keep OverScroller.SplineOverScroller state consistent." into mnc-dev
* commit '8cc00243423e22a36c518cd5ece97b45271ae5e8':
  Keep OverScroller.SplineOverScroller state consistent.
2015-08-05 19:42:25 +00:00
Vladislav Kaznacheev
84ad7e9ee2 Keep OverScroller.SplineOverScroller state consistent.
Currently update() bails out early if it is called
too soon after mStartTime has been set. In this case
mCurrentPosition remains holding an obsolete value
from a previous animation. This causes some strange
behavior (see the referenced bug).

This patch makes sure that mCurrentPosition is
updated every time that mStart is updated.

Bug: 22950559
Change-Id: I07b92f30ebe29856f4e04dc19a4820123713fd7e
2015-08-04 21:24:59 +00:00
Alan Viverette
f2fea1363b am dbb79ae9: am 4cf97c91: am 7bfe7b5b: am 5cca30a4: Merge "Revert two changes to LinearLayout measurement" into mnc-dev
* commit 'dbb79ae9dc457bcb97794f718c6d3aa7fc4a19ca':
  Revert two changes to LinearLayout measurement
2015-08-01 17:05:28 +00:00
Dianne Hackborn
628b412584 am bc2a8843: am b97c5ddd: am 9b36f526: am c1836bb0: Merge "Change MNC codename to just M." into mnc-dev
* commit 'bc2a88431e3dc51e2245cc28e327f11d0c78bd56':
  Change MNC codename to just M.
2015-08-01 17:04:28 +00:00
Alan Viverette
51a8fe950e am 5cca30a4: Merge "Revert two changes to LinearLayout measurement" into mnc-dev
* commit '5cca30a4ee28a5e70531508d9ad607107adfaa86':
  Revert two changes to LinearLayout measurement
2015-07-31 21:38:52 +00:00
Alan Viverette
5cca30a4ee Merge "Revert two changes to LinearLayout measurement" into mnc-dev 2015-07-31 21:30:48 +00:00
Dianne Hackborn
f2269f0454 Change MNC codename to just M.
Change-Id: I4281d200ff6560791c47cf9073ceea1cb509361e
2015-07-31 17:19:03 +00:00
Dianne Hackborn
c1836bb0f1 Merge "Change MNC codename to just M." into mnc-dev 2015-07-31 17:11:58 +00:00
Alan Viverette
5a969dfd8e Revert two changes to LinearLayout measurement
"Include non-zero dimension views in excess space calculation" and
"Always distribute excess space in LinearLayout measurement" changed
LinearLayout behavior significantly in a way that wasn't covered by
CTS tests.

This reverts commits da2f304409 and
4fabc02158.

Bug: 22862047
Change-Id: I8d37a525ccf295445d3239b80e5cacb10bf3c947
2015-07-31 12:42:10 -04:00