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