Commit Graph

8318 Commits

Author SHA1 Message Date
Mark Lu
4ff96480b3 docs: fix grammar mistake in TextureView
am: e8691d19cb

Change-Id: I06b70cf94595bbb1b3903b1d17d201ac86f169a0
2016-09-07 23:29:26 +00:00
Mark Lu
e8691d19cb docs: fix grammar mistake in TextureView
Bug: 6441115
2016-08-30 17:38:42 -07:00
Chris Craik
dbf69818a2 Cherry pick TextureView fixes
am: 2e8a8a2432

Change-Id: I0f650bf2647f9141f9639a4e8875170640d78237
2016-08-29 23:41:22 +00:00
John Reck
8eaa65b867 Merge "Cherry pick TextureView fixes" into nyc-dev 2016-08-29 23:33:57 +00:00
Yohei Yukawa
87b9a88c32 Make sure IME focus is synced to View focus
am: 8eb07090a4

Change-Id: Ia0db5adc86c72f122a5b9bab91962ffa2923469a
2016-08-29 22:40:07 +00:00
Chris Craik
2e8a8a2432 Cherry pick TextureView fixes
The following changes are in this commit:

Avoid destroying TextureView surfaces for onStop

bug:30238922

TextureViews will hold onto their backing surfaces, which will allow
them to resume gracefully when the app's surfaces are saved.

Now only resources that are destroyed for onStop are DisplayLists.

(cherry picked from commit 391d560402)

TextureView: destroy layer on destroyHardwareResources event

bug:30468770

(cherry picked from commit 1c16c37d86)

Fix NPE in TextureView

Bug: 30651595

(cherry picked from commit 3c2587f26e)

Fix NPE in TextureView

Bug: 30779663

(cherry picked from commit 7e237189c2)

Fix maps resume being blank

Bug: 30889568

Fixes an issue where mLayer didn't have
the mSurface set on it in certain resume
scenarios.

(cherry picked from commit 03df0834e6)
2016-08-29 14:22:13 -07:00
Yohei Yukawa
8eb07090a4 Make sure IME focus is synced to View focus
This CL fixes an edge case that my previous CL [1] forgot to handle.

The goal of my previous CL was to avoid InputMethodManager from getting
confused by a false focus-in event from temporarily detached Views.
However, my CL forgot to take care of the case where the temporarily
detached View is still focused even after the temporary detach mode is
done.

The bad news is that such a situation is relatively easy to trigger by
having a ListView that has EditText as follows, which seems to be
known to be a common technique in Android developer community to put an
EditText in a ListView.
  ListView#listView.addHeaderView(new EditText(context), null, true);

If the ListView is initialized as above, and the EditText has input
focus, View focus and IME focus start to disagree immediatelly after the
ListView's layout is re-evaluated.  This is really easy to trigger, for
example just by dismissing the IME window.

In summary, the root cause is that InputMethodManager#focusIn(View) is
now always ignored as long as the View is temporarily detached, under an
assumption that IMM#focusIn(View) will be called back again with a View
that is not temporarily detached when everything is stable.  Hence the
fix is to do so by hooking up View#dispatchFinishTemporaryDetach() to
call IMM#focusIn(View) again when the View is actually focused in the
final state.

 [1]: Ia79bbd8468f768d546354382b47b39dd31ef7bb5
      a4ed0cfcb6

Bug: 30022872
Bug: 30578745
Bug: 30706985
Change-Id: Iecbdb00dcef8c72e4f7b31035c9bf0f4a40a578f
(cherry picked from commit dd228fbb4d)
2016-08-29 18:24:31 +00:00
Vladislav Kaznacheev
8496bb82d2 Fix docs for View.DRAG_FLAG_GLOBAL
am: 9a44eaec53

Change-Id: I4b0548a4fb7bff0312d2cd73217f64f361216c50
2016-07-13 00:08:52 +00:00
Vladislav Kaznacheev
9a44eaec53 Fix docs for View.DRAG_FLAG_GLOBAL
Document that cross-app drags only involve apps compiled for API 24 or later.

Bug: 30076806
Change-Id: Ia630f4623c23d787b52692ff1f6475408cefa177
2016-07-12 15:24:48 -07:00
Vladislav Kaznacheev
879b3fb9ce Merge \"Fix docs for DragEvent\" into nyc-dev
am: b6fa207c67

Change-Id: I33c231d19065a5acc26472d4c3f175351d2a6d10
2016-07-11 23:26:05 +00:00
Vladislav Kaznacheev
3067bc69d9 Fix docs for DragEvent
Document that getClipDescription() and getLocaState() do not return valid data
when getAction() == DragEvent.ACTION_DRAG_ENDED.

Bug: 30016099
Change-Id: Id98fe8c5d6f052fc51c8c9e8d55329e162bd96b1
2016-07-11 13:52:22 -07:00
John Reck
8a953d02d9 Merge \"Add missing null checks\" into nyc-dev
am: 02e391585d

Change-Id: Ib081c05d197b01ec3a9039941dd1265bf0b9b92c
2016-06-27 17:06:22 +00:00
John Reck
474659ccc4 Add missing null checks
Bug: 29743482
Change-Id: Ic4bc5b9d5718eabd41e09a108a765b01aef4e3c8
2016-06-27 07:56:37 -07:00
Adam Lesinski
c038c55f62 Merge \"Update DisplayMetrics when resizing\" into nyc-dev
am: 34ccbe035a

Change-Id: I1b0b6711a3ad8c9fd29bbb967d59d59326fa7d25
2016-06-24 23:42:34 +00:00
TreeHugger Robot
34ccbe035a Merge "Update DisplayMetrics when resizing" into nyc-dev 2016-06-24 23:35:13 +00:00
Adam Powell
242a44395e Merge \"Fix layout issue after insets changed\" into nyc-dev
am: 119f1715b3

Change-Id: I3dc13e068c258a74acee79e6ab6a75b569c891e8
2016-06-24 23:28:37 +00:00
TreeHugger Robot
119f1715b3 Merge "Fix layout issue after insets changed" into nyc-dev 2016-06-24 23:21:29 +00:00
Yorke Lee
c9bbca5682 Merge \"Update documentation for View.startDragAndDrop\" into nyc-dev
am: c63710ea48

Change-Id: I47ee9fa89edc5495616393a1c352677c8b990030
2016-06-24 22:18:22 +00:00
Adam Lesinski
ac3e0e590a Update DisplayMetrics when resizing
Previously the DisplayMetrics passed to a new ResourcesImpl
object would be generated from the default DisplayAdjustments.
We now use the correct DisplayAdjustments for the ResourcesImpl
and make sure to update them for things like rotation changes.

Bug:29619314
Change-Id: If2ba0d7670a4554dcd3fde9766e2337f20a191fd
(cherry picked from commit 8e8d23214a)
2016-06-24 22:11:27 +00:00
Yorke Lee
c63710ea48 Merge "Update documentation for View.startDragAndDrop" into nyc-dev 2016-06-24 22:10:47 +00:00
Adam Powell
76fdbb72c9 Fix layout issue after insets changed
Fix a regression where a change in insets would forceLayout on the
view hierarchy but not run the measure/layout as a result. This would
cause layout requests to become stalled until a window-level relayout
event.

Bug 29634368

Change-Id: Ia3f32f5891c8b32c06c13f95ebd0572233572b04
2016-06-24 14:47:06 -07:00
Yorke Lee
d092e3a414 Update documentation for View.startDragAndDrop
Bug: 29606395
Change-Id: Ibbe1a20c998986c7afffac6f5f4b25769f56a8f2
2016-06-23 12:23:22 -07:00
John Reck
c86a2e325e Merge \"Remove FD from the right Looper\" into nyc-dev
am: db13dd41a9

Change-Id: I451ef3649426d9b8ea1bf15e388d0efa82dae442
2016-06-23 18:39:44 +00:00
John Reck
ac04f4e69a Remove FD from the right Looper
Bug: 29586513

Also gives BackdropFrameRenderer a direct-destroy
of Choreographer since it's hammering on new Threads
and we don't want to wait for the GC to release
FDs.

Change-Id: Id2ec0af2ee4d5304961c4ab87a104ccb92f35fc2
2016-06-23 11:00:00 -07:00
John Reck
fdff97caf0 Merge \"Change approach for windowPositionLostRT\" into nyc-dev
am: 16038a0c5f

Change-Id: I80f6bf6d169c43a10106857627f5c127d94d00a4
2016-06-22 23:45:50 +00:00
John Reck
16038a0c5f Merge "Change approach for windowPositionLostRT" into nyc-dev 2016-06-22 23:38:24 +00:00
John Reck
f23a1b8e4c Change approach for windowPositionLostRT
Bug: 29547000

Instead of shifting the window off screen fall
back to the UI-thread calculated values. This fixes
a race issue around tear-down where we stop
drawing long before our window is actually no longer
visible, as well as fixes a funky issue with
PRESERVE_GEOMETRY during first draw.

Change-Id: I792d1966f5aaee1e703295ae79166c723b97a1dc
2016-06-22 16:10:07 -07:00
Adam Lesinski
a72a6aae37 Merge \"ContextImpl: Keep DisplayAdjustments and Display in sync\" into nyc-dev
am: 0bf31c3fa6

Change-Id: If0da3136f1fcb17c43a5b8c22ca890b8abcfc25c
2016-06-22 19:17:43 +00:00
Adam Lesinski
0bf31c3fa6 Merge "ContextImpl: Keep DisplayAdjustments and Display in sync" into nyc-dev 2016-06-22 19:11:36 +00:00
Adam Lesinski
4ece3d6bb1 ContextImpl: Keep DisplayAdjustments and Display in sync
Make sure that when our Resources get updated, that DisplayAdjustment
and Display properly reflect the potentially new screen dimensions.

Bug:28388969
Change-Id: I340550ea094ece87abc8790dd46aaa60ab3cedd3
2016-06-21 17:55:58 -07:00
Yorke Lee
072ce0c29c Merge \"Tweaks to DragAndDropPermissions behavior\" into nyc-dev
am: 22faa5ddb1

Change-Id: Icbe2a2b78d19dbdf067aa69a2e0c539a809893aa
2016-06-21 21:20:11 +00:00
Yorke Lee
c8ad0cd316 Tweaks to DragAndDropPermissions behavior
No longer release permissions in finalize(), so that
apps do not have to maintain a reference to the
DragAndDropPermissions object.

Also make it parcelable, so that permission instances can be
retained across activity instances so that they can be
manually released.

Bug: 29162822

Change-Id: Ie604dd3e83ee45a8665d743449b91857dd54e896
2016-06-21 12:57:52 -07:00
John Reck
f5159155d0 Merge \"DO NOT MERGE Move SurfaceView offscreen if the app stops drawing it\" into nyc-dev
am: d11b5e6661

Change-Id: I1caf2fbac785c68c6afeb61b60493e728a83a670
2016-06-18 02:14:29 +00:00
John Reck
34bf49e4de DO NOT MERGE Move SurfaceView offscreen if the app stops drawing it
Bug: 29360411
Change-Id: Iefb9d7a9dafb34a2b4f79130a2a8b5a7cf7de906
(cherry picked from commit aa6e84f21d)
2016-06-17 20:26:10 +00:00
Chong Zhang
dba235d91a Merge \"Do a forceLayout if pending insets is changed after relayout window\" into nyc-dev
am: 2756d0707f

Change-Id: Ia95dd424c118b962a9a10ac074d508758b49ea90
2016-06-17 18:26:45 +00:00
Chong Zhang
71f2c31469 Do a forceLayout if pending insets is changed after relayout window
We might have a pending MSG_RESIZED_REPORT, but if it's executed after
relayoutWindow, mPendingInsets will already be the new value and it'll
not forceLayout. So we need to forceLayout here to make sure the measure
cache is cleared.

bug: 29391054

Change-Id: I73793b1427b89e75700369ec3b37053a6a732f0d
2016-06-17 01:11:49 +00:00
Yorke Lee
3d80871032 Merge \"Limit global drags to apps targeting SDK 24 and above\" into nyc-dev
am: f33af2285b

Change-Id: I539f39cfea50f34dade2141829b21d422809b09f
2016-06-16 21:22:22 +00:00
Yorke Lee
0e85247195 Limit global drags to apps targeting SDK 24 and above
Bug: 29127791

Change-Id: Ib5f85a207bdb79eeac0418fda78e452d225761bc
2016-06-16 09:35:40 -07:00
Selim Cinek
0630d92064 Merge \"Added dismiss, expand, and collapse accessibility actions\" into nyc-dev
am: c1720dce1b

Change-Id: I25bd41f1307233bba14067952086ca7be3118505
2016-06-16 04:25:26 +00:00
Selim Cinek
e9bad242f3 Added dismiss, expand, and collapse accessibility actions
Fixes: 20343017
Fixes: 29368014
Change-Id: Ib571242aac04c67aea2f3c3ce76139eaedc1f3f1
2016-06-15 16:30:09 -07:00
Yorke Lee
71ab239765 Merge \"Check for detached view in drag-related APIs\" into nyc-dev
am: cdc9d7bed9

Change-Id: I95d551726913c95d2806fe22ee93fcc24d1862c2
2016-06-13 22:14:24 +00:00
TreeHugger Robot
cdc9d7bed9 Merge "Check for detached view in drag-related APIs" into nyc-dev 2016-06-13 20:09:43 +00:00
Yorke Lee
07452c37ab Check for detached view in drag-related APIs
Bug: 29253539
Change-Id: I26285404ee15bb17e87ac23c67f7c3c6aaa2d968
2016-06-13 11:32:23 -07:00
John Reck
93ff5124c6 Merge \"Don\'t call surfaceCreated for just changed surfaces\" into nyc-dev
am: e4b1fb94e3

Change-Id: I896ffb151a1b6625fe6b6c937dac9b54f1d5d252
2016-06-10 18:02:20 +00:00
John Reck
e4b1fb94e3 Merge "Don't call surfaceCreated for just changed surfaces" into nyc-dev 2016-06-10 17:46:54 +00:00
Phil Weaver
e2b3248823 Merge \"Improve accessibility window title behavior\" into nyc-dev
am: f8af34365c

Change-Id: Id9d2de6b82f8e8062c0d66d759440b574b113a02
2016-06-09 23:42:47 +00:00
Phil Weaver
f8af34365c Merge "Improve accessibility window title behavior" into nyc-dev 2016-06-09 23:32:10 +00:00
John Reck
208c47cfb0 Don't call surfaceCreated for just changed surfaces
Fixes: 29223302

If the surface only changed we want to just call onSurfaceChanged,
not onSurfaceCreated.

Change-Id: I65c8b210a7e34eaa2862020335ee7f6ef56eeac2
2016-06-09 16:26:21 -07:00
Phil Weaver
155edc693e Improve accessibility window title behavior
Un-reverts ag/1057448, but uses a version of Resources#getText
that returns null rather than throw an exception when no title
is available. This is the same call made before, so this change
should be safer.

Bug: 28744278
Change-Id: I8c123f4f6d74f796ab9e8ffcf955aaf881770da1
2016-06-09 13:45:46 -07:00
Robert Carr
5978cf5ff8 Merge \"PiP animation: Move window with resize when ending animation.\" into nyc-dev
am: 4624d687f7

Change-Id: I94fc4de5fd24f75b2b69f6380048d8e57ae7980e
2016-06-09 19:36:27 +00:00