History log of /frameworks/base/core/java/android/view/SurfaceView.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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
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