summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/wm/ScreenRotationAnimation.java
AgeCommit message (Collapse)Author
2013-12-19Move some system services to separate directoriesAmith Yamasani
Refactored the directory structure so that services can be optionally excluded. This is step 1. Will be followed by another change that makes it possible to remove services from the build. Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
2013-09-09Surface: Change OutOfResourcesException to be a runtime exceptionIgor Murashkin
- 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
2013-08-02Add force default orientation.Craig Mautner
Devices can be configured to remain in their default landscape or portrait orientation by setting config_forceDefaultOrientation true in overlay/.../values/config.xml. Activities that desire to run in the non-default orientation are supported by creating a logical display within the physical display. Transitions to and from the activity perform a crossfade rather than the normal rotation animation. Also, improve SurfaceTrace debug output. Fixes bug 9695710. Change-Id: I053e136cd2b9ae200028595f245b6ada5927cfe9
2013-03-18Properly close Surface when done.Craig Mautner
Surface.destroy was not being called. Leading to warning from StrictMode. Fixes bug 8388527. Change-Id: I472fb57ed2c3f6389e53d8f020f3b22b2d0740c8
2013-03-05remove suppor for SurfaceControl.FX_SURFACE_SCREENSHOTMathias Agopian
the window manager can now use the SurfaceControl.screenshot API with a "regular" surface. Change-Id: I76bed81d5e7b078ea1b3e8f96814aba32e9d5405
2013-02-22Create rotation animation modes.Craig Mautner
Allow fullscreen windows to specify crossfade or jumpcut animations that override the default rotation animation. Only if the incoming and outgoing topmost windows are fullscreen and both specify the same animation to use. Fixes bug 8182773. Change-Id: I6b3c0020d7bd2cdfba5c66189e114ec62cd54fcf
2013-02-15clean-up following Surface splitMathias Agopian
Change-Id: I853a76d92d957ee38a36fcdd280d6407ec316987
2013-02-14split Surface in two classes: SurfaceControl and SurfaceMathias Agopian
SurfaceControl is the window manager side; it can control the attributes of a surface but cannot push buffers to it. Surface on the other hand is the application (producer) side and is used to push buffers to the surface. Change-Id: Ib6754c968924e87e8dd02a2073c7a447f729f4dd
2012-12-18Clean up warnings.Craig Mautner
Change-Id: I1dfe21e5f64364c90565b594e28074cabe7daa64
2012-11-29Don't apply transformation fudge when not rotating.Dianne Hackborn
There is this stupid fudge factor applied to window transformations when doing a screen rotation animation. We need this when rotating, but when not rotating it causes very visible artifacts. Historically the non-rotation case only happened due to configuration changes, so wasn't that big a deal. Now however that we use this when switching users, it is more annoying. So get rid of it for such cases. Change-Id: I6b343866c1bad9b16984b4a629917c2f1bb37b9e
2012-09-10Animations for user switching.Dianne Hackborn
The window manager now has a facility to provide a full-screen animation, which the activity manager uses every time a user switch happens. The current animation is just a simple dumb slide until we get a design from UX. Also some cleanup: moved the portrait task animations to the default config so we always have an animation for them, and finally got the java symbol stuff out of public.xml. Change-Id: I726f77422b2ef5f2d98f961f8da003e045f0ebe8
2012-08-31More improvements to the display manager.Jeff Brown
Added more complete support for logical displays with support for mirroring, rotation and scaling. Improved the overlay display adapter's touch interactions. A big change here is that the display manager no longer relies on a single-threaded model to maintain its synchronization invariants. Unfortunately we had to change this so as to play nice with the fact that the window manager wants to own the surface flinger transaction around display and surface manipulations. As a result, the display manager has to be able to update displays from the context of any thread. It would be nice to make this process more cooperative. There are already several components competing to perform surface flinger transactions including the window manager, display manager, electron beam, overlay display window, and mouse pointer. They are not manipulating the same surfaces but they can collide with one another when they make global changes to the displays. Change-Id: I04f448594241f2004f6f3d1a81ccd12c566bf296
2012-08-27Add plumbing for new surface flinger display API.Jeff Brown
Cleaned up the implementation of Surface and SurfaceSession to use more consistent naming and structure. Added JNI for all of the new surface flinger display API calls. Enforced the requirement that all Surfaces created by the window manager be named. Updated the display manager service to use the new methods. Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
2012-08-23Clean up displayId and layerStack usage.Craig Mautner
Make better use of Display object by saving it in DisplayContent. Only use layerStack when referring to Surfaces. Get displayId from default Display or default DisplayContent. Remove warnings. Fixes bug 7038151. Change-Id: Ie493f0f5e755dc9b91ee969ff561c2a098283ead
2012-08-19Refactor for multi-display support.Jeff Brown
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
2012-07-27Small step towards supporting multiple displaysCraig Mautner
Change-Id: I353449c2b464394988c7e0203656b5851a0c9127
2012-05-06Force BlackSurface to be a black surface.Craig Mautner
BlackSurface transparency was tracking animation transparency causing background images to peek around the corners. Fixes bug 4998851. Change-Id: I48ac7bf5d0cc560b655c9f12faccda411985cbad
2012-04-16Clear orientation variable until rotation is done.Craig Mautner
In the old code orientationChangeComplete was set to true on each pass through perfomLayout. If any window was rotating the variable was set to false on the way through the performLayout. Since we can now make passes through performLayout before any animation step occurs we were seeing mOrientationChangeComplete true prior to rotation completing. This change sets mOrientationChangeComplete false at the start of a rotation and sets it to true if we ever get through an animation step without encountering any rotating windows. Change-Id: I37690cf20868dfbaac94a81640bc4d9cb9fb8f00
2012-04-14Animate from Choreographer only.Craig Mautner
Animation steps are now executed on a Thread launched from the Choreographer rather than being called at the end of the WindowManager layout process. Animations and layout are still tightly coupled in that they share considerable state information and neither can be executed without holding a lock on WindowServiceManager.mWindowMap. Change-Id: Ie17d693706971507b50aa473da1b7258e9e67764
2012-04-12Revert to ICS screen rotation animation.Dianne Hackborn
Change-Id: Ida76f17a00e4c8ab828deae51095107e4eeaa321
2012-03-16More work on rotation animation.Dianne Hackborn
Change-Id: Ib8206db98b68cb1e0b16e4c55d949e80ff31bd9f
2012-03-15Separate layout ops from surface ops.Craig Mautner
Further work to isolate layout from animation and surface operations. Remove cruft and minor refactoring. Change-Id: I6f910ed72c7c614996641c353870c2b2ab5e8bb4
2012-03-14Separate out animations from layout.Craig Mautner
(Dianne) pulled the animation steps out of the layout. Changes to exposed layers cause repeated calls to layout code. Combined animation steps into start and finish animation code. Change-Id: I3602d1d6249d20987d102a54e3a67a7a39361b55
2012-03-09Improved rotation animation.Dianne Hackborn
Change-Id: Id21686be8b2b229dc61c5d01f888c9b5deabb857
2012-03-05Merge "More work on rotation animation."Dianne Hackborn
2012-03-05More work on rotation animation.Dianne Hackborn
The black frame is now a separate animation element. This allows us to have it move through the aspect ratio change, without the old and new screen elements doing weird aspect ratio scalings. This makes the animation generally look different (more like a reveal), not sure if it is better or worse, but definitely has less artifacts in things like the gallery. Also tweaked the animation definitions a bit. Change-Id: I94c274ba04bbc7a675946dc6c1778e19386e4a66
2012-03-02Fix rotation so orientation changes aren't dropped.Craig Mautner
Modify test so that rotation animation is entered one final time after rotation completes. This last time causes mUpdateRotation to be set true forcing a test for orientation change. Fixes bug 6109189. Change-Id: I25475f336a3439a56b1c540205d09ee48c1d2b7c
2012-03-01Separate animation steps into start, step and finish phases.Craig Mautner
Fixes bug 6089126. Change-Id: Iafbde36ff719640335a7ecf762e1d991cf7915e4
2012-02-13Fix issue where screen rotations would stop animating.Dianne Hackborn
If we went through the update loop multiple times, and had finished animating the first time, we would blow away that information the second time and never kill the animation. Also moved killing the animation back up to the animation step -- this involves destroying surfaces and such, and so really should be done as part of the surface transaction. We can also consider the screen rotation animation object to be owned by the animation, so it can destroy it when done. Change-Id: If24356c509c66d046f2ddfd9ad5bfe12504d7716
2012-01-23New screen rotation animation design.Dianne Hackborn
We now have an animation that can start as soon as we detect to rotate the screen, and have a different phase once the new UI is ready to complete the transition into it. Change-Id: I05b9c12a699232acbddc36b4a994a4452db71476
2011-11-04Fix rotation displays frame N-1 briefly while rotatingMathias Agopian
The ScreenShot layer is now created hidden. The screenshot itself is aquired during the transaction when the layer is made visible. This guarantees the screenshot and the layer happen atomically with respect to screen updates. Bug: 5534521 Change-Id: Ida23e1f13d5716ec83b78a15712e0646d6cf8729
2011-10-18Add a LayerScreenshotMathias Agopian
A LayerScreenshot is a special type of layer that contains a screenshot of the screen acquired when its created. It works just like LayerDim. Make sure to call compositionComplete() after rendering into a FBO. Bug: 5446982, 5467587, 5466259 Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
2011-10-16Revert "Add a LayerScreenshot"Mathias Agopian
This reverts commit d6809f40cf61203573ec5dbc437f695cd132cc18.
2011-10-14Add a LayerScreenshotMathias Agopian
A LayerScreenshot is a special type of layer that contains a screenshot of the screen acquired when its created. It works just like LayerDim. Bug: 5446982 Change-Id: I7814aff2380e7e146937f2b641907be2a30c76cc
2011-10-12Fix issue #5445966: WindowManager reporting -long on prime when it shouldn't be.Dianne Hackborn
The window manager now uses the app screen dimensions to compute the various configuration properties, as it should. This means that prime is official a "not long" device. Poor prime. It probably feels inadequate now. Because it is. Oh and all that other stuff? Debugging logs. Turned off. And why the heck not, debugging logs are great. Change-Id: Iaaf8ef270d986d34fd046d699ef4c0ecea1981fc
2011-09-11Fix inflating of animations.Dianne Hackborn
Need to define attributes for animation set, to have correct indices. Also small fixes elsewhere. Change-Id: If596147e8aee4ebffe4e184872070341eff6df73
2011-08-31Use floating point window positions.Dianne Hackborn
Gets rid of gapps between windows during animations. Change-Id: I17d2ef0af214008f0eabd7eb19268f145fe83b39
2011-07-25Report the external display size to the input reader.Jeff Brown
The input reader needs this information so that it knows how to interpolate touches on an external touch screen. Changed Display so that it asks the WindowManager what the real display size is (as opposed to the raw display size). This means it now takes into the forced display size set by adb shell am display-size. Replaced all calls to getRealWidth() / getRealHeight() / getRealMetrics() in the WindowManager and replaced them with direct usages of the mCurDisplayWidth / mCurDisplayHeight so that the WM doesn't end up making a reentrant Binder call into itself. Fixed the table status bar HeightReceiver so that it updates the height on all configuration changes since it is possible that the display size changed independently of an external HDMI display being plugged / unplugged. Improved the Display class documentation to make the distinctions betweeen the various sizes clearer. Change-Id: I3f75de559d3ebffed532ab46c4ae52c5e7f1da2b
2011-06-08Work on issue #4518815: Compatibility mode introduces compatibility ↵Dianne Hackborn
regression... ...for Market App iRunner There were a lot of serious issues with how we updated (or often didn't update) the display and resource state when switching compatibility mode in conjunction with restarting and updating application components. This addresses everything I could find. Unfortunately it does *not* fix this particular app. I am starting to think this is just an issue in the app. This change does fix a number of other problems I could repro, such as switching the compatibility mode of an IME. Also a few changes here and there to get rid of $#*&^!! debug logs. Change-Id: Ib15572eac9ec93b4b9966ddcbbc830ce9dec1317
2011-05-27Fix various places that were using the wrong display metrics.Dianne Hackborn
Change-Id: I1ac2a0c4a1b7c851dbc99d26f295c7dd49b0bd5c
2011-05-16Add new command line option to change global screen size.Dianne Hackborn
For example: adb shell am display-size 1024x600 Change-Id: I5df462acd3323bdaaaefa3126faea7dd8595b726
2011-03-02Fix issue #3400119: API to specify a black background behind a window transitionDianne Hackborn
There is now an API, which is used for task switching. Also improved how we handle rotation animation when we can't take a screen shot, to cleanly revert to the old freeze behavior. This removes the need to special case the emulator. Change-Id: I7227432a2309370437ec6ac78db02c6f1e7eedd5
2011-02-17Explode WindowManagerService.Dianne Hackborn
Change-Id: I3d73ed4c9a1b5d730aeffeb2df24ce5e6117d698
2011-02-17Start window manager refactoring.Dianne Hackborn
Move all of the pieces into a new com.android.server.wm package. Change-Id: I942b7bcfb84ee0f843f47d58e55ffc5a93c0da94