History log of /frameworks/base/core/java/android/view/SurfaceView.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
474659ccc421aaacfa49a742891aefed46c6f5d2 27-Jun-2016 John Reck <jreck@google.com> Add missing null checks

Bug: 29743482
Change-Id: Ic4bc5b9d5718eabd41e09a108a765b01aef4e3c8
/frameworks/base/core/java/android/view/SurfaceView.java
f23a1b8e4c5e63d11fe12fb1d51e4f5e3570bbc2 22-Jun-2016 John Reck <jreck@google.com> 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
/frameworks/base/core/java/android/view/SurfaceView.java
34bf49e4de4c1994b5d9c19166606bc9b7ad1b9c 17-Jun-2016 John Reck <jreck@google.com> DO NOT MERGE Move SurfaceView offscreen if the app stops drawing it

Bug: 29360411
Change-Id: Iefb9d7a9dafb34a2b4f79130a2a8b5a7cf7de906
(cherry picked from commit aa6e84f21ddf89ea649a3f00044bc23adfe86978)
/frameworks/base/core/java/android/view/SurfaceView.java
6ee192f4e981845db5fdff127bf2ee990cd05dbf 17-May-2016 Chris Craik <ccraik@google.com> Document that SurfaceView is synchronous in N

bug:28821062

Change-Id: I1c17949d93de3d1f89c504fc061f7d20dd451a4d
/frameworks/base/core/java/android/view/SurfaceView.java
f057fb56f69f8cb1bdee086c73f9d4efe8e331c4 15-Apr-2016 John Reck <jreck@google.com> Fix sw legacy compat path in SurfaceView

Fixes: 28074239

Need to convert from scaled window to screen before
updating position of the SurfaceView

Change-Id: I75dec23408c32ec01e88193ea38b1fb253b3fd6f
/frameworks/base/core/java/android/view/SurfaceView.java
0b10c335c72cb610e71432a61f315e7670b9af41 29-Mar-2016 Robert Carr <racarr@google.com> Ensure we change SurfaceView size from UI thread.

We need to change the SurfaceView size from the UI thread
so that we can appropriately deliver the SurfaceChanged
callback. We also need to not preserve geometry
in this case, as if we don't update the surface
and layout size together we could get scaling. This still has
some potential for holes, as transactions are not synced with
the parent renderer, but we have other methods to avoid
these in the case of resizing. This fixes the remaining
issues with content sizing and surface view "out of sync".

Bug: 27780983
Bug: 27687126
Bug: 27676101

Change-Id: Idd7864f00e5cf7a4eb32dd66c0b389292a788069
/frameworks/base/core/java/android/view/SurfaceView.java
6136273888c42faad74dce19ec49904a55affc15 22-Mar-2016 Chong Zhang <chz@google.com> Don't change geometry in relayout if preserve geometry is requested

This causes scaling to be applied in the relayout window since the
requested size won't match the window size. Apply the requested size
in repositionChild instead.

bug: 27676101
Change-Id: I03beee2b9fe118a6be329b5fd1338d54e48d9a22
/frameworks/base/core/java/android/view/SurfaceView.java
0ffd49cbe0ab4c13fd5528abacade898a8cff481 13-Feb-2016 Jorim Jaggi <jjaggi@google.com> Always consume bottom insets when navigation bar is force shown

When an app requests SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION but we
force show the navigation bar, we need to treat for the app like
there is no virtual navigation bar on the device. Because if you
combine it with FLAG_HIDE_NAVIGATION, you'd expect the navigation
bar gets hidden but it doesn't, so there could be content that
overlaps with the navigation bar.

Bug: 27157904
Change-Id: I088e02eae2e723c35e9cb4873de6b1325458533b
/frameworks/base/core/java/android/view/SurfaceView.java
afeea9ba50bf2a60ccd9e6fcfb5f2efa880f4079 11-Feb-2016 John Reck <jreck@google.com> Include containing window title in SurfaceView's title

Bug: 27135605
Change-Id: I6fa4e84cb95ed6c445d00c89d93a5befbd0197b6
/frameworks/base/core/java/android/view/SurfaceView.java
f648108f83d4e74811919e9811efb8fcc184b8a3 03-Feb-2016 John Reck <jreck@google.com> Have RT drive window positioning

Bug: 22802885

Change-Id: I6beed5474d3a943b16e9097f7bd61ce3cbd37505
/frameworks/base/core/java/android/view/SurfaceView.java
a4a58efe8203d63a9a6bf78b0fa9f2992b25871b 27-Jan-2016 Jorim Jaggi <jjaggi@google.com> Fix app staying in drag resizing when undocking

When dismissing the docked stack, the fullscreen stack stayed in drag
resize mode because it got a relayout, but because the bounds didn't
change (it switches to the fullscreen layout a bit earlier) it never
called WM.relayoutWindow, so it stayed in drag resize mode indefinitely.

To fix this, introduce forceRelayout in Window.resized(), which makes
sure the client always calls relayoutWindow. Set this to true whenever
drag resizing is changing.

For some very weird reason this also broke that home button was not
responding anymore.

Bug: 26806532
Change-Id: I4b39c1c419a166aa7093c31226f2a4915f642328
/frameworks/base/core/java/android/view/SurfaceView.java
d86c63a25e54e419bcd001f2ea98b0744e8b17d8 20-Jan-2016 Robert Carr <racarr@google.com> Layout SurfaceView in parent frame.

We always want the SurfaceView to be layed out
relative to the parent frame, fixes multiple issues
in freeform mode.

Bug: 26689889
Change-Id: Ib4728a515dc01c6884363b68a29f2e4ce5d5babc
/frameworks/base/core/java/android/view/SurfaceView.java
2e95a488e0a12d4263d101e888fdd89fd123aec3 15-Jan-2016 Jorim Jaggi <jjaggi@google.com> More optimization while dragging docked divider

- Make sure mPendingBackdropFrame gets also set when if the window
triggers a relayout on it's own, so it doesn't call into window manager
all the time.
- Set the insets of the docked divider to empty so we don't trigger a
layout when we are just moving it - it doesn't need it in any case.
- Send a window move message to the divider when it moved
- Update attach info in all move cases, update light center

The whole resize operation now only takes around 4ms per frame, and
leaves a lot more resources for the apps to do configuration changes.

Bug: 25015474
Change-Id: Ica48129570a0fc858a89c21f46abf3442efb0224
/frameworks/base/core/java/android/view/SurfaceView.java
cd9a18c7f864901400c6017c892bfd3bc48c3a4b 17-Dec-2015 Robert Carr <racarr@google.com> Set SCALING_MODE_NO_SCALE_CROP for SurfaceView.

When resizing SurfaceView along with a main application window,
we want to be able to update the crop of the SurfaceView without waiting
for a buffer at a new size. If we fail to do so the SurfaceView may
extend beyond the edge of the host surface.

Bug: 26010823
Change-Id: I3bb52f82c02bb729a2494a3a43b9654d9aae9532
/frameworks/base/core/java/android/view/SurfaceView.java
64aadd08491172e90f6d6512d8affc9a4cfa04cc 06-Nov-2015 Robert Carr <racarr@google.com> Clarify geometry management for SurfaceView

In the hardware accelerated case, RenderThread needs
to be the authority of information on the geometry of
the SurfaceView (this will occur via moving the
repositionWindow call to RenderThread). In order
to support this we have to enable calling relayoutWindow
without geometry (so that it will not fight with
repositionWindow). Add such a mode to relayoutWindow
and use it from SurfaceView. Add size to repositionChild
while we are here.

Bug: 22802885
Change-Id: Ie45132c22f34cc6ecfe2446912b30bd1df414406
/frameworks/base/core/java/android/view/SurfaceView.java
253a20fad8703e21c7298fe66e0f3f53d4e63c14 03-Nov-2015 Jorim Jaggi <jjaggi@google.com> Fix black holes and flickering in docked resizing

When we start a resize with the docked stack divider,
set the surface background to be full-screen, and use
the traditional surface clipping/positioning in window
manager to adjust the size. This ensures that we don't
have any black holes because of asynchronicity (except
at the very beginning, but this can be worked around
later), and the position of the right/bottom activity
is always in sync with the position of the divider.

Also fix a bug in NonClientDecorView where the first
request to draw was dropped (because the thread hasn't
started up yet), and the main thread was waiting for it
indefinitily.

Bug: 24507122
Change-Id: I623bd48d5be64fac2fba45241b84f265944d200d
/frameworks/base/core/java/android/view/SurfaceView.java
7d73643f7a3fbd635ba1818d6f819e551b7ffcf6 06-Nov-2015 Bart Sears <bsears@google.com> Revert "Clarify geometry management for SurfaceView"

This reverts commit 78a45f2bd8794d7a85e7443820862d466edf2324.

Change-Id: I782f688f52a85df84d9facef2fbf88c28f4a7082
/frameworks/base/core/java/android/view/SurfaceView.java
78a45f2bd8794d7a85e7443820862d466edf2324 03-Nov-2015 Robert Carr <racarr@google.com> Clarify geometry management for SurfaceView

In the hardware accelerated case, RenderThread needs
to be the authority of information on the geometry of
the SurfaceView (this will occur via moving the
repositionWindow call to RenderThread). In order
to support this we have to enable calling relayoutWindow
without geometry (so that it will not fight with
repositionWindow). Add such a mode to relayoutWindow
and use it from SurfaceView. Add size to repositionChild
while we are here.

Change-Id: I12f85f586a38bf86367f3d964cb49f19003d441f
/frameworks/base/core/java/android/view/SurfaceView.java
64e516f5fa56d71bf6b5076e5620c30dc5810ba1 29-Oct-2015 Rob Carr <racarr@google.com> Sync SurfaceView position changes to parent render.

In order to provide pixel perfect movement of SurfaceViews
'within' other views (e.g. scrolling) we need to be able to
synchronize the attached (parent window) painting with the
movement of the SurfaceView (recall, SurfaceViews are positioned
behind their attached windows and the parent must render a
transparent region for the SurfaceView to appear). Provide
a new WindowManager method to reposition an attaching window
(that is to say, a window which has an attached window like
SurfaceView) and defer the transaction until the parent frame.
SurfaceView is hooked up to use this for movement. This is still
'racy' in the hardware accelerated case as the render thread
could be on either side of dequeing the frame we are working on.

Bug: 22802885
Change-Id: I025d2bdcbe15c1c11047cc0dbca2cf2b7d67c632
/frameworks/base/core/java/android/view/SurfaceView.java
7e1d861a9a3f76e1f79eb6806d4aa8bbeb560773 16-Oct-2015 Rob Carr <racarr@google.com> Revert "Sync SurfaceView position changes to parent render."

This reverts commit 6104dc95606b3399356dd011ca6d71fcd954154c.

Change-Id: If9d709bc65e7a817bd2c1b5768c7c33a9317638f
/frameworks/base/core/java/android/view/SurfaceView.java
6104dc95606b3399356dd011ca6d71fcd954154c 28-Sep-2015 Robert Carr <racarr@google.com> Sync SurfaceView position changes to parent render.

In order to provide pixel perfect movement of SurfaceViews
'within' other views (e.g. scrolling) we need to be able to
synchronize the attached (parent window) painting with the
movement of the SurfaceView (recall, SurfaceViews are positioned
behind their attached windows and the parent must render a
transparent region for the SurfaceView to appear). Provide
a new WindowManager method to reposition an attaching window
(that is to say, a window which has an attached window like
SurfaceView) and defer the transaction until the parent frame.
SurfaceView is hooked up to use this for movement. This is still
'racy' in the hardware accelerated case as the render thread
could be on either side of dequeing the frame we are working on.

Change-Id: Ic33915043380ab8cd9eb4920e224b35234ed867d
/frameworks/base/core/java/android/view/SurfaceView.java
a8fe43f09c0ed2119e55139a482f7f12fbe7d725 07-Oct-2015 Robert Carr <racarr@google.com> Ensure SurfaceView requests WM relayout when size changes.

In the case of scaled SurfaceViews with a fixed size.
It is possible for the surface layout size to change
without a change to the surface size or position. In this
case we need to inform the window manager so it can update
frames and scaling. This has presented in Camera and required
workarounds such as changing the fixed surface size to trigger
an update (leading to visual artifacts).

Bug:23974105
Change-Id: I195aa0832907c32874b294101b56e198e853dce5
/frameworks/base/core/java/android/view/SurfaceView.java
6fa9512e349ef1efbf4558da9e8418a842ab6201 10-Jun-2015 John Reck <jreck@google.com> Set the right reportNextDraw

Bug: 8012229

mReportNextDraw is set by resized to have updateWindow() do
its thing. However if we are in updateWindow() and the
relayout() call to WindowManager wants us to report the draw
we should set reportNextDraw instead of mReportNextDraw
so that we report that frame instead of at the accidental next
invalidate.

Change-Id: If6c38d95599469831a0bd5e4d2b3f6c4f259e40c
/frameworks/base/core/java/android/view/SurfaceView.java
2217f61e51ba4b19c56b19297c1e9cf74d7d860f 26-May-2015 Filip Gruszczynski <gruszczy@google.com> Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""

This includes the fix for the broken dialog windows. The outsets will
only be calculated and applied if the window is full screen, since
they don't make much sense otherwise.

This reverts commit 4bb6b751fbbb218e8a298db4aa008472a0aa8d31.

Change-Id: I977a85a78c990c1840784dc0be0dddd5a6d84e6b
/frameworks/base/core/java/android/view/SurfaceView.java
4bb6b751fbbb218e8a298db4aa008472a0aa8d31 23-May-2015 Dianne Hackborn <hackbod@google.com> Revert "resolved conflicts for merge of 47249f2a to mnc-dev"

This reverts commit c7becb7ee78881646251ff4846e63eb6b96bf7ec, reversing
changes made to 8562b08f04c1309cf40db1e749d612b6824f1d12.
/frameworks/base/core/java/android/view/SurfaceView.java
3e11bf33a6094da92d97702213aa12c67b21c4d1 20-Apr-2015 Filip Gruszczynski <gruszczy@google.com> Support for devices with a chin.

Information about the chin is now part of the config.xml instead of the
theme. It is retrieved by WindowManagerService and passed to the clients
as insets. Clients can adjust their behavior in a way that makes it
invisible to the user, that part of the surface doesn't actually exist.

Bug: 19908853

Change-Id: Iedf57bf3c848201b854f91ffeb3b59187d375c1f
/frameworks/base/core/java/android/view/SurfaceView.java
37d7a68de7e353c31a3a4736054cd86f0e002eaf 06-Nov-2014 Adrian Roos <roosa@google.com> Fix inset hinting when adding window

Windows with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS were
getting an incorrect content inset hint, because the
hinting didn't see the adjusted systemUiVisibility.

Also adds hinting for the stable insets.

Bug: 17508238
Change-Id: If9647277feb6811b15665b801accd896c51dbd12
/frameworks/base/core/java/android/view/SurfaceView.java
77e4a5250fc6df451999efe508f57968a44b603f 01-Oct-2014 John Reck <jreck@google.com> Re-allow suppressing onDetachedFromWindow

Bug: 17578553

Games seem to be doing this to prevent destruction of their
GL contexts, and they assume it works even if it doesn't. However,
GLSurfaceView is clunky here, so while the app is doing something
questionable we don't really offer a better way. For now revert
back to kitkat behavior.

Change-Id: Icfa9e496279b9cfa47f9bc7f6848d9313caed0d5
/frameworks/base/core/java/android/view/SurfaceView.java
fa10423fa00f3495e451016acba9b6848eb995c9 21-Jun-2014 Adrian Roos <roosa@google.com> Add stable insets for stable system windows

Adds a new kind of inset that only accounts for stable system
windows like the system or navigation bar.

Bug: 15457292
Change-Id: I681b711f6f40a94c25b7acd3a44eb3539486afab
/frameworks/base/core/java/android/view/SurfaceView.java
9a22f0f0a631849d9c622c642d3ab0395f77584b 09-Apr-2014 Youngsang Cho <youngsang@google.com> Add overlay view in Tv Input Framework

A TvInputService app developers sometimes want to draw UI above a surface
playing TV. For this purpose, we add a window in TIS and allow developers to
attach their customized view on the TV surface.

Change-Id: I65c3dffa17580b8d4c42fac58bbfc8dad338c185
/frameworks/base/core/java/android/view/SurfaceView.java
edb67190d65659ff1da563f1d081d9429bd31a31 18-Mar-2014 Wonsik Kim <wonsik@google.com> Merge "Revert "VideoPlaneView initial implementation""
475e3f0e887cd23d3107acc06d29d440c60fbecf 17-Mar-2014 Wonsik Kim <wonsik@google.com> Revert "VideoPlaneView initial implementation"

This reverts commit 5f8aa4142919b3001fd2621f7acd5f609a5129a5.

Change-Id: I161748f365512c5e24acba2c3d9ebd9405fa8e3f
/frameworks/base/core/java/android/view/SurfaceView.java
b14dfe20ef300c47cc5cdfbd844c21f7fd302f0c 06-Mar-2014 John Reck <jreck@google.com> Revert "Revert "Workaround apps not calling super.onDetachedFromWindow()""

This reverts commit bac16fae7e6fceb1e516252ede673844b772e7c3.

Change-Id: I61e997b23fac1aa984129fdc0328426ff8891bdd
/frameworks/base/core/java/android/view/SurfaceView.java
bac16fae7e6fceb1e516252ede673844b772e7c3 06-Mar-2014 Bart Sears <bsears@google.com> Revert "Workaround apps not calling super.onDetachedFromWindow()"

Requested by jreck to fix the build.

This reverts commit 198d20842a537f3df3584ea084e74220e172b086.

Change-Id: I733065cc124b59bf914034f5bac5e2e951a5b604
/frameworks/base/core/java/android/view/SurfaceView.java
198d20842a537f3df3584ea084e74220e172b086 06-Mar-2014 John Reck <jreck@google.com> Workaround apps not calling super.onDetachedFromWindow()

Bug: 13338698
Move the releasing of hardware resources to a new
@hide onDetachedFromWindowInternal

Change-Id: I52b4e6ba4d5b3ce20b89cabffa248d1d780e3e81
/frameworks/base/core/java/android/view/SurfaceView.java
5f8aa4142919b3001fd2621f7acd5f609a5129a5 18-Feb-2014 Wonsik Kim <wonsik@google.com> VideoPlaneView initial implementation

Note that eventually VideoPlaneView should not inherit from SurfaceView.

Remove a few trailing spaces too.

Change-Id: Ia0a461169d560435a827861be2cc15f1e3ee68fa
/frameworks/base/core/java/android/view/SurfaceView.java
38dc2ad85e4572d6e56f0a98edd97945312f708c 04-Oct-2013 Adam Lesinski <adamlesinski@google.com> am b2db2fbc: am 6d90862f: am d65825ab: Merge "Private flags are masked in correct variable" into klp-dev

* commit 'b2db2fbce33dbcfa52ccb20267ad4897c558c34f':
Private flags are masked in correct variable
95c42974f719d1fac90fc0438eac778e9795681f 02-Oct-2013 Adam Lesinski <adamlesinski@google.com> Private flags are masked in correct variable

Newly added private flags were being masked in the public flag variable
as opposed to the correct privateFlags variable.

bug:11033280
bug:11043194
Change-Id: Idda3a70a083457f3f1b7d4b46d231f4a7e704cf0
/frameworks/base/core/java/android/view/SurfaceView.java
49e43291b2120884320441e9519f5f3c74d40cb2 02-Oct-2013 Adam Lesinski <adamlesinski@google.com> am 234c6c8a: am ff7cba54: am 42e9b631: Merge "Make room for new public flags" into klp-dev

* commit '234c6c8aafa4abc440d5bf38aac058b96ba1434c':
Make room for new public flags
6a591f585909415a1da431a2cc76b7732724037d 02-Oct-2013 Adam Lesinski <adamlesinski@google.com> Make room for new public flags

Moved two hidden flags to private

bug:11033280
Change-Id: Icca867b073aff643eefdaf84df68de86bb6b05ac
/frameworks/base/core/java/android/view/SurfaceView.java
33069f40e5ba5a8c036671a67668b6bdfe6eb3a9 12-Sep-2013 Igor Murashkin <iam@google.com> am 47869404: am 2cad64c0: Merge "Surface: Change OutOfResourcesException to be a runtime exception" into klp-dev

* commit '47869404cb8233c536a0a5d2c5ce4d0089e39882':
Surface: Change OutOfResourcesException to be a runtime exception
a86ab640f7bb0bf3cb4eaed80473ca8c5d131903 30-Aug-2013 Igor Murashkin <iam@google.com> Surface: Change OutOfResourcesException to be a runtime exception

- Deprecates SurfaceTexture.OutOfResourcesException, it wasn't used
- Make all JNI code throw only Surface.OutOfResourcesException
- Get rid of redundant SurfaceControl.OutOfResourcesException

Bug: 10566539
Change-Id: I58126260771b9ccff6a69c672ce7719b9f98138d
/frameworks/base/core/java/android/view/SurfaceView.java
617feb99a06e7ffb3894e86a286bf30e085f321a 10-Sep-2013 Alan Viverette <alanv@google.com> Add View constructor that supplies a default style resource

Also updates the constructor of every class that extends View.

BUG: 10676369
Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
/frameworks/base/core/java/android/view/SurfaceView.java
667809ef5d2d1fe3796cdc9bdd09503a70d2ba6c 17-Apr-2013 Mathias Agopian <mathias@google.com> simplify Surface{View} dirty rect handling

Change-Id: Ia4595fc1a8a62ca3f3db0f1e47e7e877d73fbfa0
/frameworks/base/core/java/android/view/SurfaceView.java
9ddf32aa8ac5aa8c29a8063f0528838f1436e5dd 18-Apr-2013 Mathias Agopian <mathias@google.com> add javadoc for SurfaceView {unL|l}ockCanvas{AndPost}()

Bug: 8593591
Change-Id: I152281ddca8716aee97147cb1b3fb483ed46b053
/frameworks/base/core/java/android/view/SurfaceView.java
1c5383ce0b4e162ebc9ac7e29c8c39377724d45b 16-Apr-2013 Dianne Hackborn <hackbod@google.com> Fix issue #8512015: VideoView's window animates when its position changes

Change-Id: I79eee6b9672b7d72eabe5d20be639c05a6f3d72b
/frameworks/base/core/java/android/view/SurfaceView.java
c4aad01cbbb69c916ef323693e1fd0560b0eccba 23-Feb-2013 Dianne Hackborn <hackbod@google.com> Formalize overscan metrics.

The window manager now maintains and reports a new formal
"overscan insets" for each window, much like the existing
content and visible insets. This is used to correctly
position the various UI elements in the various combination
of layout options. In particular, this allows us to have
an activity that is using fitSystemWindows to have the content
of its UI extend out to the visible content part of the screen
while still positioning its fixed UI elements inside the
standard content rect (and the entire window extending all
the way into the overscan area to fill the screen as desired).

Okay, maybe that is not written so clearly. Well, it made
my head hurt too, so suffer!

The key thing is that windows now need to know about three
rectangles: the overall rectangle of the window, the rectangle
inside of the overscan area, and the rectangle inside of the
content area. The FLAG_LAYOUT_IN_OVERSCAN option controls
whether the second rectangle is pushed out to fill the entire
overscan area.

Also did some improvements to debug dumping in the window
manager.

Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
/frameworks/base/core/java/android/view/SurfaceView.java
f0681b34dffc1510cbd9c3da5c3a7e695553fa8d 24-Oct-2012 Jeff Brown <jeffbrown@google.com> Secure windows, secure surface views and secure displays.

Add new API to determine whether a display is secure.
Add new API to make a SurfaceView secure.
Clarify documentation.

Bug: 7368436
Change-Id: I7068c34c910e43b4bc72e43fa0dded59a25f0fe2
/frameworks/base/core/java/android/view/SurfaceView.java
c9f345ff7bc59916d5168d49d9312b2ff7a07daa 26-Sep-2012 Jesse Hall <jessehall@google.com> Document interaction of SurfaceView and post-layout transforms

Bug: 7179570
Change-Id: I9c4d71242bcb832c0cb3b62ec26aba54f146d70a
/frameworks/base/core/java/android/view/SurfaceView.java
8d0243a3d0269d3a57d90eb2e7b12b41f53b27d9 25-Sep-2012 Jeff Brown <jeffbrown@google.com> Fix surface view on secondary display.

Bug: 7183618
Change-Id: I8d743b5db8f362afb97f720846d990f9a722b3bd
/frameworks/base/core/java/android/view/SurfaceView.java
656e3af44432be6a2ba60289b8e787fad2506ceb 07-Sep-2012 Craig Mautner <cmautner@google.com> Convert resized() method to new parameters.

When the BaseIWindow.resized method got switched from taking (int x,
int y, ...) to taking (Rect, ...) the SurfaceView.MyWindow override
never got updated.

Fixes bug 6992324.

Change-Id: Id0b9625559ae0100336f4573f09d313138c8a6e7
/frameworks/base/core/java/android/view/SurfaceView.java
98365d7663cbd82979a5700faf0050220b01084d 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Refactor for multi-display support.

Split WindowManagerImpl into two parts, the WindowManager
interface implementation remains where it is but the global
communications with the window manager are now handled by
the WindowManagerGlobal class. This change greatly simplifies
the challenge of having separate WindowManager instances
for each Context.

Removed WindowManagerImpl.getDefault(). This represents the
bulk of this change. Most of the usages of this method were
either to perform global functions (now handled by WindowManagerGlobal)
or to obtain the default display (now handled by DisplayManager).

Explicitly associate each new window with a display and make
the Display object available to the View hierarchy.

Add stubs for some new display manager API features.

Start to split apart the concepts of display id and layer stack.
since they operate at different layers of abstraction.
While it's true that each logical display uniquely corresponds to a
surface flinger layer stack, it is not necessarily the case that
they must use the same ids. Added Display.getLayerStack()
and started using it in places where it was relatively easy to do.

Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
/frameworks/base/core/java/android/view/SurfaceView.java
4702a856973a553deb82f71b1d3b6c3db5dbf4ba 18-Aug-2012 Dianne Hackborn <hackbod@google.com> More view hierarchy, fragment debugging.

Add a View.toString() method.

Rename all of the View private flags to have a PFLAG prefix to
avoid going insane trying to figure out which constant goes with
which flag.

Activity.dump() now includes a summary of the activity's view
hierarchy, using the View.toString() method.

All exceptions thrown by FragmentManager now perform a dump of
the owning activity state, where appropriate.

Change-Id: I6482e397e10cb5a0612ab02ce6ed5131823437a6
/frameworks/base/core/java/android/view/SurfaceView.java
88a4292186fef902db476d63529d0b15a17d9d4d 08-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 807c7ae0: am 7835d4fb: Merge "Fix SurfaceView notifies on invalid surfaces."

* commit '807c7ae00bc5b8a7fe68ba4acbfa3909a955ae70':
Fix SurfaceView notifies on invalid surfaces.
f750b8ce3c8cb30bcbc5fe53087c7e9035078eba 02-Jul-2012 Andreas Röhl <andreas.rohl@sonyericsson.com> Fix SurfaceView notifies on invalid surfaces.

SurfaceView notifies registered callbacks on invalid
Surfaces.

Change-Id: Iddc9a5cd073fb73a0e7e9b9ca64ff4fac0777ca7
/frameworks/base/core/java/android/view/SurfaceView.java
6881a10557acf3b0270de54799d6f19437acf584 27-Jul-2012 Craig Mautner <cmautner@google.com> Small step towards supporting multiple displays

Change-Id: I353449c2b464394988c7e0203656b5851a0c9127
/frameworks/base/core/java/android/view/SurfaceView.java
aac0d4ed026d1cfbcf3fa81c6e4eb96f4347ca17 20-Jul-2012 Fabrice Di Meglio <fdimeglio@google.com> Replace left/right with start/end for Gravity / LayoutParams / Padding

- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: Id9af5375fb9b0edeae5232c77e52ecd497bd2e67
/frameworks/base/core/java/android/view/SurfaceView.java
7ed1d6613e2f5aa05158a87888f5a6474eca5cc1 14-May-2012 Mathias Agopian <mathias@google.com> Merge "fix SurfaceView visibility state changes" into jb-dev
85afd1b6f871d471fdff1980134676a5f1690525 13-May-2012 Dianne Hackborn <hackbod@google.com> Implement new window cropping.

The window manager now performs the crop internally, evaluating
it every animation from, to be able to update it along with
the surface position.

Change-Id: I960a2161b9defb6fba4840fa35aee4e411c39b32
/frameworks/base/core/java/android/view/SurfaceView.java
cbeb33249d5beec7903f18269c991a5515c5d981 13-May-2012 Mathias Agopian <mathias@google.com> fix SurfaceView visibility state changes

SurfaceView didn't recompute the transparent region
when the INVISIBLE state (as opposed to GONE) was involved.

Bug: 6467123
Change-Id: I05930bd568a345331840c1ad8d9123ef4904c04f
/frameworks/base/core/java/android/view/SurfaceView.java
5c58de3a523a384c47b0b1e0f5dd9728a74cd9f7 29-Apr-2012 Dianne Hackborn <hackbod@google.com> Add system insets to windows.

This will be used to determine which parts of a window a completely
hidden by system UI elements (status bar, nav bar, system bar) so
that they can be clipped out from rendering.

Change-Id: I2c6c6ac67dbdfeed82d2c089ef806fb483165bd9
/frameworks/base/core/java/android/view/SurfaceView.java
a175a5b7ea3682cb58cca7f9726d0b8171cd549d 16-Feb-2012 Jeff Brown <jeffbrown@google.com> Encapsulate the ViewRootImpl's handler.

This change makes it much easier to make sense of the messages that
get posted to the ViewRootImpl's handler by encapsulating their point
of dispatch within the ViewRootImpl itself.

As part of this change, the View.AttachInfo now carries a reference
to the ViewRootImpl itself, which simplifies some code that used
to try to find the ViewRootImpl by getting the root view's parent.

In principle, it might have been nice to hide the ViewRootImpl from
the View hierarchy but in practice the two were coupled in many ways.

Change-Id: I51ebccdf5f8c8c505cd6f17cdf594174d041dc54
/frameworks/base/core/java/android/view/SurfaceView.java
61566cc1932468720a831ad5cbc68ee080d613c9 03-Dec-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5614559: Registering surface error in...

...Background Replacement on Stingray

This is how I should have done it in the first place. We get the
new surface from the window manager, and then just copy it in to
the constant Surface object we have for the holder.

Change-Id: I537a9e413829a18f689dfb46687014676b27156e
/frameworks/base/core/java/android/view/SurfaceView.java
6d05fd3c795088ac60f86382df5a66d631e8a0cb 19-Nov-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5588689: Black camera preview after coming back from gmail

Make surface management between SurfaceView and the window manager
much more controlled, to ensure that SurfaceView always gets to report
the current surface is destroyed before the window manager actually
destroys it.

Also a small tweak to allow windows that have a wallpaper background
to still have a preview window. This makes launching home after it
has been killed feel much more responsive.

Change-Id: I0d22cf178a499601a770cb1dbadef7487e392d85
/frameworks/base/core/java/android/view/SurfaceView.java
9a230e01a1237749a8a19a5de8d46531b0c8ca6a 06-Oct-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately

This cleans up how ui flags are managed between the client and window manager.
It still reports the global UI mode state to the callback, but we now only clear
certain flags when the system goes out of a state (currently this just means the
hide nav bar mode), and don't corrupt other flags in the application when the
global state changes.

Also introduces a sequence number between the app and window manager, to avoid
using bad old data coming from the app during these transitions.

Change-Id: I40bbd12d9b7b69fc0ff1c7dc0cb58a933d4dfb23
/frameworks/base/core/java/android/view/SurfaceView.java
6dd005b48138708762bfade0081d031a2a4a3822 18-Jul-2011 Dianne Hackborn <hackbod@google.com> I. Can. Not. Stand. ViewAncestor.

It was done so we would have the name "ViewRoot" available for a
public API. However, the name "ViewAncestor" just makes no sense.
So instead, change it to ViewRootImpl.

Change-Id: If9599ca67896f339f6fefa7d1dde121201171d97
/frameworks/base/core/java/android/view/SurfaceView.java
fee1c69a49d03b651e481983432ade94fc07650a 26-May-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 77dd616e to master

Change-Id: Idb7180177b01e7d822327ccc7c76617220860da2
5be8de3420ba4c9d816b98e29bdec11715f6b626 25-May-2011 Dianne Hackborn <hackbod@google.com> More compatibility mode improvements.

We now correctly adjust display metrics, fixing for example issues
seen in Barcode Scanner. In addition the decision about when to use
compatibility mode has a bug fixed where certain apps would not go
out of compatibility mode even though they should be able to.

Change-Id: I5971206323df0f11ce653d1c790c700f457f0582
/frameworks/base/core/java/android/view/SurfaceView.java
c6cc0f8c19d9eccf408a443fa2bf668af261dcd0 12-Apr-2011 Joe Onorato <joeo@google.com> Rename ViewRoot to ViewAncestor.

ViewRoot is about to be a new public class for poking at ViewAncestor.

Change-Id: Ie95d707c6d8bbb48f78d093d7b2667851812a7d5
/frameworks/base/core/java/android/view/SurfaceView.java
43a17654cf4bfe7f1ec22bd8b7b32daccdf27c09 07-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These haven't been working since before 1.0.

Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
/frameworks/base/core/java/android/view/SurfaceView.java
01d5edc49ae8995aabffe1a30bfd966faaf70bd6 28-Jan-2011 Romain Guy <romainguy@google.com> Prevent crash when detaching a SurfaceView.
Bug #3400461

Change-Id: I837d9d47b12bc5a8798b6dbb720de43b7539c3bc
/frameworks/base/core/java/android/view/SurfaceView.java
0c75622cf80e53c13d079bfe1f3df0b185c4f02d 27-Jan-2011 Romain Guy <romainguy@google.com> Fix crash in movie studio.

Change-Id: I06acb0b39cc3839cf7abb58b32dec9b9bec424d6
/frameworks/base/core/java/android/view/SurfaceView.java
f2499fa434521a8948387afe8f0acd4f39620500 27-Jan-2011 Romain Guy <romainguy@google.com> Make sure that we update SurfaceView's window with display lists.
Bug #3395487

Change-Id: Idaef3953a596ee3b4049a2d8aef6dda676b1545b
/frameworks/base/core/java/android/view/SurfaceView.java
30bc34f191ca8a009af313fc751e5b4bff6e39a1 25-Jan-2011 Jeff Brown <jeffbrown@google.com> Fix surface frame size reporting.

The SurfaceHolder provided by the wallpaper service was not reporting
the correct size in getSurfaceFrame(). This broke an optimization in
the ImageWallpaper. The old code happened to work because calling
lockCanvas on the SurfaceHolder with a null dirty rectangle happened
to have the side-effect of updating the SurfaceHolder's surface frame
size field because it passed mSurfaceFrame as the dirty rect, causing
mSurfaceFrame to be set to the size of the region to be drawn.

However, relying on this side-effect is wrong. Among other things,
the dirty region could actually be smaller than the surface frame.

This patch fixes WallpaperService, SurfaceView and ViewRoot to ensure
that the surface frame size is always set explicitly and is not modified
by calls to lockCanvas.

Change-Id: I10948f5ec269409ceaf0f7d32b3f6731e9499ebc
/frameworks/base/core/java/android/view/SurfaceView.java
334031cd07c3bd09d23fce0ebaf946fc6ecfee26 10-Nov-2010 Glenn Kasten <gkasten@google.com> Fix documentation errors

Fix typos.
Fix javadoc error.
Fix wrong instructions about new returning null.

Change-Id: I76bca22e386839007fc99667b07649a4ced4180f
/frameworks/base/core/java/android/view/SurfaceView.java
d2112306330ce0c162bee4b864991962ca2b655a 08-Dec-2010 Mathias Agopian <mathias@google.com> remove support for PUSH_BUFFER surfaces and overlays

the same functionality is now supported through
the h/w composer HAL, and YUV support in the GPU.

Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
/frameworks/base/core/java/android/view/SurfaceView.java
189ee18d6c6483ad63cc864267328259e2e00b95 03-Dec-2010 Dianne Hackborn <hackbod@google.com> Implement smarter sizing of WRAP_CONTENT windows.

This extends the view hierarchy's measure pass to allow view to
propagate up to their parent additional information besides just
their measured size. They can now report that their measured width
and/or height should be larger than the size their parent is
limiting them to (even though by definition they need to contrain
their reported measurements to the limits imposed by the parent).

ViewRoot uses this information to determine if it should remeasure
the window with a larger size limit to try to make it fit.

Change-Id: I90af3b7a8ec45d0a5c003fb009857025209d83eb
/frameworks/base/core/java/android/view/SurfaceView.java
ef11530874f86570aa04a10c16a416b274b3fdf5 05-Oct-2010 Mathias Agopian <mathias@google.com> fix build. SurfaceView.setFrame needed to be hidden

Change-Id: I96b0896e24483e9b5db19c938cb6058868f34e48
/frameworks/base/core/java/android/view/SurfaceView.java
995bb9d24d3b278939a01e1d05c2b7f337ab0565 05-Oct-2010 Mathias Agopian <mathias@google.com> fix [3008290] passion GB surface does not send surfaceChanged notification after size change.

The video has the same aspect ratio than the window, so the window size doesn't change.
In turn, onSizeChanged() is not called, which is where surfaceChanged() is eventually called from.

we now override setFrame() and always call updateWindow from there instead of from onSizeChanged()

Change-Id: I87064b577ff1d7b6ba50e563d7278813002d2b29
/frameworks/base/core/java/android/view/SurfaceView.java
251fd430c7e355ad440202c83b0c6d91f5bf93e5 15-Jul-2010 Dianne Hackborn <hackbod@google.com> Argh oops I didn't mean to delete this.

Change-Id: I3d0877d56f1abab3d0929a086621f4ef1212cecc
/frameworks/base/core/java/android/view/SurfaceView.java
d76b67c340d1564abf8d14d976fdaf83bf2b3320 14-Jul-2010 Dianne Hackborn <hackbod@google.com> IME events are now dispatched to native applications.

And also:

- APIs to show and hide the IME, and control its interaction with the app.
- APIs to tell the app when its window resizes and needs to be redrawn.
- API to tell the app the content rectangle of its window (to layout
around the IME or status bar).

There is still a problem with IME interaction -- we need a way for the
app to deliver events to the IME before it handles them, so that for
example the back key will close the IME instead of finishing the app.

Change-Id: I37b75fc2ec533750ef36ca3aedd2f0cc0b5813cd
/frameworks/base/core/java/android/view/SurfaceView.java
00fa7bdd69f0868fd17ea7c881c771d785b2fbbd 03-Jul-2010 Jeff Brown <jeffbrown@google.com> More native input dispatch work.

Removed old input dispatch code.
Refactored the policy callbacks.
Pushed a tiny bit of the power manager state down to native.
Fixed long press on MENU.
Made the virtual key detection and cancelation a bit more precise.

Change-Id: I5d8c1062f7ea0ab3b54c6fadb058c4d5f5a9e02e
/frameworks/base/core/java/android/view/SurfaceView.java
2d468c5d73cc1cefbcfa8d98e30622c54756918c 15-Jun-2010 Mathias Agopian <mathias@google.com> Make sure SurfaceView use a 565 surface when requesting an OPAQUE format.

this is needed for backward compatibility with somewhat buggy applications.
not a big deal, since the app can request another format explicitely.

Change-Id: Ic73f8acedf94ffc0115637efac28fa8ffaa7e5a4
/frameworks/base/core/java/android/view/SurfaceView.java
46b9ac0ae2162309774a7478cd9d4e578747bfc2 23-Apr-2010 Jeff Brown <jeffbrown@google.com> Native input dispatch rewrite work in progress.

The old dispatch mechanism has been left in place and continues to
be used by default for now. To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API. Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument. The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points. The ViewRoot then
provides the InputChannel to the InputQueue. Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue. This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event. Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets). Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
/frameworks/base/core/java/android/view/SurfaceView.java
804d04969da91b45ee31e8d290de3ede7650fe48 08-Jun-2010 Romain Guy <romainguy@google.com> am 71d73a0d: Merge "Add a method to hide/show a SurfaceView\'s surface." into froyo

Merge commit '71d73a0dfc110d0bdfc1b7ba385db3e2cfe007e5' into kraken

* commit '71d73a0dfc110d0bdfc1b7ba385db3e2cfe007e5':
Add a method to hide/show a SurfaceView's surface.
afc3e11f10828e113331eb24b65e4f9759f67747 08-Jun-2010 Romain Guy <romainguy@google.com> Add a method to hide/show a SurfaceView's surface.

This can be used to move a surface offscreen to avoid the cost of compositing it.
This preserves the window and therefore the OpenGL context when used in h/w
accelerated apps.

Change-Id: I280295376601b17989d0fc8a271af66650016f09
/frameworks/base/core/java/android/view/SurfaceView.java
d6ddcb7f00a7af95b452233d965b922632f78f21 25-May-2010 Mathias Agopian <mathias@google.com> fix [2677468] some 3rd party GL ES apps get a 32-bits surface by default and fail

force all SurfaceView to 565

Change-Id: I8ebfa1239d8e4fa097c2e544677fb92fa20b39bd
/frameworks/base/core/java/android/view/SurfaceView.java
726426ee736929e605742bfa52bca4b20095921d 01-Apr-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2529154 Found SurfaceFlinger timeout in logcat when wake up Camcorder

We need to make sure, if the window size changes, to have onSurfaceChanged()
called for the surface to be redrawn.

Change-Id: Iad518199fa400de8059a77ed34d50d6eb93a6aff
/frameworks/base/core/java/android/view/SurfaceView.java
f5e32f33eddc6e22edee1df486b38294ddc76cc3 24-Mar-2010 Mathias Agopian <mathias@google.com> another small step towards fixing [2501808] sapphire: OOM in GPU Surface area

release the Surface in SurfaceView when it's not visible, after it comes back from relayout(),
it should not be holding buffers at this point, but it's cleaner to have it in the released state.

also log a warning in Surface.finalize() when there is work to do, as it means Surface.release() wasn't
called when it should have.

Change-Id: Id637d4ec2916d8fd800b0344d8dec6cecce02051
/frameworks/base/core/java/android/view/SurfaceView.java
7179b8133d4a1d8e5f26cbe3da6aa978094e75c9 22-Mar-2010 Derek Sollenberger <djsollen@google.com> Adding a hidden method to check if a surface is fixed in size.

Change-Id: I5d719d436aa1475dfb25f26c258a6f417a9b5c1c
/frameworks/base/core/java/android/view/SurfaceView.java
e2af5c882b146c3a8c7a37f093d13c8b386e8eba 18-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2438457: Resolving Flash artifacts while scrolling.

When the surface view scrolls off the screen it stops drawing, so
we stop moving it. Add an observer to scrolls so we can continue
to update its position.

Change-Id: I2604cbbecd3e72be1a2a6bc5794e3e1c19317b9e
/frameworks/base/core/java/android/view/SurfaceView.java
694f79b5d1196640d1beb680b7d1fc68e6e77cbd 18-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2519590: Lock screen stuck in landscape mode

Well, mostly. There is still a problem here where the first time
you show the lock screen it just doesn't draw itself. I assume
this is something breaking in the view hierarchy as it floounders
around removing and adding new views as it is first being shown...
but no idea at this point what is the actual case.

Change-Id: Iba99ae3242931c8673b17b106c86fc99e2c52abe
/frameworks/base/core/java/android/view/SurfaceView.java
74bfea76ea601017126714729f7cea68e5d9cbdb 01-Mar-2010 Derek Sollenberger <djsollen@google.com> am a630dcdb: am ecde72fe: Ensure the IME is rendered above the surface when we z-order the surface to be on top.

Merge commit 'a630dcdb956f9acb028dd03bc63b28874f100f8a'

* commit 'a630dcdb956f9acb028dd03bc63b28874f100f8a':
Ensure the IME is rendered above the surface when we z-order the surface to be on top.
ecde72fe411811ca02a2565bf73b86e6e8ddc76b 01-Mar-2010 Derek Sollenberger <djsollen@google.com> Ensure the IME is rendered above the surface when we z-order the surface to be on top.
/frameworks/base/core/java/android/view/SurfaceView.java
e36d6e277e49475076b7872d36ea6a5c5b996e9d 18-Feb-2010 Dianne Hackborn <hackbod@google.com> Work on issue #2263557: PMF3000 showing hybrid of portrait and landscape modes

This is a bunch of reworking of how configuration changes are handled:

- When orientation is changing (for whatever reason), the window manager no
longer tries to pre-emptively compute a new configuration. Instead, it
just determines change is happening and tells the window manager.
- The activity manager is now responsible for giving the window manager the
final configuration it is using. This is both so it knows whem the
activity manager is done with its configuration updates, and so the window
manager can use the "real" configuration.
- When an orientation or other configuration change is happening, freeze the
screen and keep it frozen until the activity manager has given us the
final configuration.
- The window manager can now send new configurations to its clients during
its layout pass, as part of a resize, if it has determined that it has
changed. This allows for a new View.onConfigurationChanged() API for any
view to easily find out when the configuration has changed.
- ViewRoot now also works with the activity thread to make sure the process's
current resources are updated to the new configuration when it receives one
from a window. This ensures that at the time onConfigurationChanged() and
other view callbacks are happening, the correct configuration is in force.
- There is now a sequence number associated with Configuration, which
ActivityThread uses to avoid using stale configurations. This is needed now
that it can receive configurations asynchronously from both the window
manager and activity manager.
- The hack for keeping the locale has been removed, and underlying problem
fixed by having Configuration initialize its locale to "unknown" instead of
a valid default value.
/frameworks/base/core/java/android/view/SurfaceView.java
29e4a3c566f435c32f0b95e4ac8e8b33cac6faba 01-Oct-2009 Dianne Hackborn <hackbod@google.com> Update from API review.

Change-Id: I16b1c566f91167aac9615ac59dd297a154c828ea
/frameworks/base/core/java/android/view/SurfaceView.java
1cd403eaac24e0e84619dea07e2d1d60e58e1fd2 15-Sep-2009 Dianne Hackborn <hackbod@google.com> Add SurfaceView API to put surface on top of window.

Change-Id: I9db84ee63a362e54ebc2f5b24a20ae5bdc3588bf
/frameworks/base/core/java/android/view/SurfaceView.java
6b7f1a62b5094fc72765a2537ee0760572df0950 10-Sep-2009 Mathias Agopian <mathias@google.com> fix [2074427] SurfaceView doesn't disappear on GONE
/frameworks/base/core/java/android/view/SurfaceView.java
8df8b2b405c60cacf7a66c4e2ca078dd3d7ec7bd 18-Aug-2009 Dianne Hackborn <hackbod@google.com> Allow wallpapers to get touch events.
/frameworks/base/core/java/android/view/SurfaceView.java
317a6280cc109e873646e4652be1582d870eedfd 14-Aug-2009 Mathias Agopian <mathias@google.com> Surface::GPU and Surface::HARDWARE are now deprecated; they will be set automatically if needed.

this also ripples into the window manager API by making some constant there deprecated as well.
/frameworks/base/core/java/android/view/SurfaceView.java
168173a698e820ceb1ebf54b4910888891be2056 13-Aug-2009 Joe Onorato <joeo@android.com> Don't crash when the window is closing
/frameworks/base/core/java/android/view/SurfaceView.java
72c82ab9923025a91bbabb32e56bfea27bfd083b 12-Aug-2009 Dianne Hackborn <hackbod@google.com> Report wallpaper offset to the wallpaper, use this in the image wallpaper.

Wallpapers can now be just the size of the screen, and get told when their
scroll position should change to do the updating on their own.
/frameworks/base/core/java/android/view/SurfaceView.java
30b06eb8b98b6e6dc685cf65ad4faa25a85008c5 24-Jul-2009 Mitsuru Oshima <oshima@google.com> am 589cebe2: * Use the scaled size for surface view instead of native. The surface will be always scaled by surface flinger in compatiblity mode. The original approach confused the app because the surface size and the view size were different. * a few clean up. remo

Merge commit '589cebe2d58591403de4a77077941c0454bc91bc'

* commit '589cebe2d58591403de4a77077941c0454bc91bc':
* Use the scaled size for surface view instead of native. The surface will be always scaled
08f89ed9a44ae9262a6c2063878bde44bedb0e37 24-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am e0ef973b: Merge change 8323 into donut

Merge commit 'e0ef973b1358585d039989ee5572e16751078aaf'

* commit 'e0ef973b1358585d039989ee5572e16751078aaf':
* a best effort fix for apps that uses get/set Matrix API on canvas.
589cebe2d58591403de4a77077941c0454bc91bc 23-Jul-2009 Mitsuru Oshima <oshima@google.com> * Use the scaled size for surface view instead of native. The surface will be always scaled
by surface flinger in compatiblity mode. The original approach confused the app because
the surface size and the view size were different.
* a few clean up. removed unsed arguments, obsolete conditions from getTranslator()
(expandable check was a bug)
/frameworks/base/core/java/android/view/SurfaceView.java
240f8a7532a024e36998bdbe87cff2ef080d75de 23-Jul-2009 Mitsuru Oshima <oshima@google.com> * a best effort fix for apps that uses get/set Matrix API on canvas.
- scale the matrix
- but don't scale if the matrix *looks* like obtained from the canvas itself. (typically to set it back to original matrix)

This is best effort change and not perfect (not even close), but works for one game,
and hopes it can handle many other apps that uses set/get Matrix. If you have an alternative idea, please let me know.
/frameworks/base/core/java/android/view/SurfaceView.java
2c33bb19f704f039aed5634150eed42da446133b 23-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 98a44df4: Merge change 8235 into donut

Merge commit '98a44df4b4cc8cd28276ad888a7e17f81353ae44'

* commit '98a44df4b4cc8cd28276ad888a7e17f81353ae44':
* Revert the change that I introduced while refactroing in SurfaceView#dispatchTouchEvent
424f668545c8b1423f46ed1286146393a8e4bc1a 22-Jul-2009 Mitsuru Oshima <oshima@google.com> * Revert the change that I introduced while refactroing in SurfaceView#dispatchTouchEvent
* Don't scale back the event if the canvas is used in SurfaceView.
/frameworks/base/core/java/android/view/SurfaceView.java
d5d967fbd9753396e908899d8ad2a169d6095d02 22-Jul-2009 Mitsuru Oshima <oshima@google.com> am 38ed7d77: * Adjust canvas size under compatibility mode.

Merge commit '38ed7d7701514ee7127d0430e952930854608c4f'

* commit '38ed7d7701514ee7127d0430e952930854608c4f':
* Adjust canvas size under compatibility mode.
38ed7d7701514ee7127d0430e952930854608c4f 21-Jul-2009 Mitsuru Oshima <oshima@google.com> * Adjust canvas size under compatibility mode.
/frameworks/base/core/java/android/view/SurfaceView.java
fead9b8ad0c6e64066fb73f4285b088ab68f452b 22-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am fe6f45c8: Merge change 8098 into donut

Merge commit 'fe6f45c81463d2d28e11ac6083f2653e1286c5ef'

* commit 'fe6f45c81463d2d28e11ac6083f2653e1286c5ef':
cast is floor. Use round instead.
61324e58c549670c015010d0be14c6af76e3e9f7 22-Jul-2009 Mitsuru Oshima <oshima@google.com> cast is floor. Use round instead.
This fixes a few layout issues (that was due to smaller widnow size)
/frameworks/base/core/java/android/view/SurfaceView.java
a065b01904d5017232c9b51ccb174412ff57e138 20-Jul-2009 Mitsuru Oshima <oshima@google.com> am 841f13c8: * Reverted the change in PackageParser that I checked by accident * More surface view fix. - correct event translation on surface view. - use compatible window * removed FLAG_NO_COMPATIBILITY_SCALE. It was my misunderstanding of how SurfaceView works,

Merge commit '841f13c8e9ff3f7695b6c18a8abcec3c947983ff'

* commit '841f13c8e9ff3f7695b6c18a8abcec3c947983ff':
* Reverted the change in PackageParser that I checked by accident
841f13c8e9ff3f7695b6c18a8abcec3c947983ff 18-Jul-2009 Mitsuru Oshima <oshima@google.com> * Reverted the change in PackageParser that I checked by accident
* More surface view fix.
- correct event translation on surface view.
- use compatible window
* removed FLAG_NO_COMPATIBILITY_SCALE. It was my misunderstanding of how SurfaceView works, and this was not necessary.
* Added compatibility related info to package dumpsys
/frameworks/base/core/java/android/view/SurfaceView.java
97900afa9f80f8e72d6f521b713af17f18d7b769 18-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am e96bd129: Merge change 7707 into donut

Merge commit 'e96bd1291482175ac1740780cbd0f42bbe9ff746'

* commit 'e96bd1291482175ac1740780cbd0f42bbe9ff746':
* scale surface view's canvas
34bf2ee9e695c620e0a4b9a790f1f6ccb8a77234 17-Jul-2009 Mitsuru Oshima <oshima@google.com> * scale surface view's canvas
This will not affect GL/Video views as they're directly using surfce but not canvas.
/frameworks/base/core/java/android/view/SurfaceView.java
c3f60ddaeadb69c1e85198e609e575f55ecc28ac 09-Jul-2009 Mitsuru Oshima <oshima@google.com> am 1ecf5d28: Re-implementation of large screen support using window manager. * added background filler surface to fill the outer rim. Using the same layer as dim surface because they never co-exists (in the same window) * clean up the obsolete code in Compatibilt

Merge commit '1ecf5d28817f0a051e77488380dcd5bc622ea169'

* commit '1ecf5d28817f0a051e77488380dcd5bc622ea169':
Re-implementation of large screen support using window manager.
1ecf5d28817f0a051e77488380dcd5bc622ea169 07-Jul-2009 Mitsuru Oshima <oshima@google.com> Re-implementation of large screen support using window manager.
* added background filler surface to fill the outer rim. Using the same layer as dim surface because
they never co-exists (in the same window)
* clean up the obsolete code in CompatibiltyMode/ViewRoot for support large screen support.
/frameworks/base/core/java/android/view/SurfaceView.java
ecf2b68d834d334de218dc427615b4ca05c0293a 25-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 7941e903: Merge change 5091 into donut

Merge commit '7941e903c973af66075bbd4fa4bcadf021a61ccc'

* commit '7941e903c973af66075bbd4fa4bcadf021a61ccc':
* new screen resolution support impl.
64f59342d41849bd365cb43fad7505d5e3daa417 21-Jun-2009 Mitsuru Oshima <oshima@google.com> * new screen resolution support impl.
* use full window for activities, and shift & clip the content
* refactored the compatibility code, and introdcued Translator class to handle cooridnate translations.
* removed a workaround to handle an activity with configChagne=rotation in old implementation.
* I'll fix background issue on rotation in next CL.

* removed unnecessary scaling code in SurfaceView, which I forgot to remove when I changed SurfaceView
not to scale the content.
/frameworks/base/core/java/android/view/SurfaceView.java
342d59d3197caa1cd1de7a600c6e0ba4a59883f4 04-Jun-2009 Mitsuru Oshima <oshima@google.com> am 9189cabb: * Moved supports-density tag under manifest * Refactored Compatibility code * Added CompatibilityInfo class * Removed getApplicationScale from Context * Added Resources#getCompatibilityInfo so that RootView can get the compatibility info w/o going through Context * Expandable support * Added expandable tag under manifest * Old application w/o expandable is given the default screen size ([320, 480] x density). * The non-expandable window is centered.

Merge commit '9189cabb0b6c6c28232fe6f412b7ba7a37352a6a'

* commit '9189cabb0b6c6c28232fe6f412b7ba7a37352a6a':
* Moved supports-density tag under manifest
9189cabb0b6c6c28232fe6f412b7ba7a37352a6a 03-Jun-2009 Mitsuru Oshima <oshima@google.com> * Moved supports-density tag under manifest
* Refactored Compatibility code
* Added CompatibilityInfo class
* Removed getApplicationScale from Context
* Added Resources#getCompatibilityInfo so that RootView can get the compatibility info w/o going through Context
* Expandable support
* Added expandable tag under manifest
* Old application w/o expandable is given the default screen size ([320, 480] x density).
* The non-expandable window is centered.
/frameworks/base/core/java/android/view/SurfaceView.java
47588ef1a272613d87c22ca32fcba08359eef5ae 22-May-2009 Dianne Hackborn <hackbod@google.com> am c4d5d026: Add new window manager type for a hacking second-level media surface.

Merge commit 'c4d5d02667af6989a3121072871f6a4b1e68b594'

* commit 'c4d5d02667af6989a3121072871f6a4b1e68b594':
Add new window manager type for a hacking second-level media surface.
c4d5d02667af6989a3121072871f6a4b1e68b594 22-May-2009 Dianne Hackborn <hackbod@google.com> Add new window manager type for a hacking second-level media surface.

This adds a new window type that is a surface that sits between the
current media type and the application window, in theory allowing you
to have two surface views in your hierarchy and control their
Z-ordering. There is also another hidden API on SurfaceView to set
the type of your window.

All a big hack, but for the good of the commonwealth!
/frameworks/base/core/java/android/view/SurfaceView.java
d6ea77e1a4f6467e3154d56164330b0698010fe5 14-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 4a8fb93f: Merge change 1638 into donut

Merge commit '4a8fb93f5e320f5bd5c1dd272339ae499e4b4ec4'

* commit '4a8fb93f5e320f5bd5c1dd272339ae499e4b4ec4':
fix window layout problem in ViewRoot
3d91492d694cf00474fec792134e496be6ee0313 14-May-2009 Mitsuru Oshima <oshima@google.com> fix window layout problem in ViewRoot
* don't scale LayoutParams (this must be app's scale).
* scale the layout params' coordinates & size only when requesting layout.
In SurfaceView, window's x,y wasn't scaled before sending to window manager.
/frameworks/base/core/java/android/view/SurfaceView.java
98eeba88e333d1c6217a642d1da2d90e1bbfb606 13-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 6347c32: Merge change 1436 into donut

Merge commit '6347c322b36cdf6a30a35e80d205d00d40368e61'

* commit '6347c322b36cdf6a30a35e80d205d00d40368e61':
Density Compatibility mode for SurfaceView
001a6e52445b2744b4f2eb00099b98a17f4245c9 12-May-2009 Mitsuru Oshima <oshima@google.com> Density Compatibility mode for SurfaceView
* use fixed size when requested. Otherwise, give the original size instead of scaled down size.
* scale back the motion event to original size when surface view is using the orignal size.
/frameworks/base/core/java/android/view/SurfaceView.java
c2839e087041b16a1ee7292b85459a396c25c771 29-Apr-2009 Mitsuru Oshima <> am 13735a2: Merge branch \'readonly-p4-donut\' into donut

Merge commit '13735a255dedd2c2e3b0cff66f0be2e17671f553'

* commit '13735a255dedd2c2e3b0cff66f0be2e17671f553':
AI 147976: Compatibility mode support. Part 2.
8169daed2f7a8731d478b884b1f455c747b88478 29-Apr-2009 Mitsuru Oshima <> AI 147976: Compatibility mode support. Part 2.
* Introduced ApplicationScale (may not be good name. CompatibilityScale? CanvasScale? Pls let me know if you have better idea)
* Changes to RootView / SurfaceView
- Makes the app believe it's running in the supported density/resolution.
- Makes the window manager believe it's running at the right density/resolution.
* Added methods to Rect/Event for scaling up/down.
Known issues:
* certain kind of images (such as nine patch for buttons) seesm to be loaded not by app, thus does not take the scale into account,
which, in turn, is causing layout issue.
* ZoomButton in MapView is rendered in wrong place
* Transparent region on Surface is not correct
* Specifying different densities in one process is not working.
BUG=1770627

Automated import of CL 147976
/frameworks/base/core/java/android/view/SurfaceView.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/view/SurfaceView.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/view/SurfaceView.java
e570a0fa86c2eea2680f07e2c0c546f104bea948 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
b798689749c64baba81f02e10cf2157c747d6b46 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/frameworks/base/core/java/android/view/SurfaceView.java
9bdf576615231e4b9693f08bfe3dc886c2edf49e 03-Jan-2009 Jon Larimer <jlarimer@gmail.com> proposed fix for issue #1703: http://code.google.com/p/android/issues/detail?id=1703
/frameworks/base/core/java/android/view/SurfaceView.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/view/SurfaceView.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/view/SurfaceView.java