summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/wm/AppWindowToken.java
Commit message (Collapse)AuthorAgeFilesLines
* Move some system services to separate directoriesAmith Yamasani2013-12-191-305/+0
| | | | | | | | 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
* Notify apps when insets change.Craig Mautner2013-11-181-1/+1
| | | | | | | | | | | Activities that handle their own configuration get layout when hidden and the configuration changes but not when the content insets change if they are hidden. They need to get a fresh layout for both situations. Fixes bug 11544694. Change-Id: Iff3a9adb72ea7dfc3e5cd38e1b9cd7cf2006f8f5
* Relayout windows that handle their own config change.Craig Mautner2013-11-121-0/+1
| | | | | | | | | | | | | | | | | | If a window claims to handle its own configuration change then we won't destroy and recreate its window on a configuration change. Normally that recreation triggers the first layout following orientation change because mHaveFrame is false. Windows that handle their own configuration changes never got a relayout pass following a change in orientation. This change passes the configuration changes that an application handles into the AppWindowToken. If the app says it handles orientation or screen size changes then a relayout will occur when the configuration has changed. Fixes bug 11647107. Change-Id: Ie8d49fd050442ebbdcf0b805087894e3a2fc4be9
* clean-up following Surface splitMathias Agopian2013-02-151-1/+1
| | | | Change-Id: I853a76d92d957ee38a36fcdd280d6407ec316987
* Migrate AppWindowToken lists into DisplayContent.Craig Mautner2013-02-051-0/+4
| | | | | | | In preparation for converting ActivityManager control to a task-based interface the AppWindowTokens are being stored per-display. Change-Id: Ie5e355219554523f5e56eaef138d382975cf1682
* Remove some TODOs.Craig Mautner2013-01-071-1/+0
| | | | Change-Id: I52f5a8a76593dde177c2e931f656b13134a3bd2b
* Fixes to clean up icon launching during animations.Craig Mautner2012-12-201-0/+16
| | | | | | | | | | | | | | | Several problems were causing animations to jump to the end when launching an app while a previous app was animating away. - Keep the two app token lists in tighter synch. These were separated when we hoped to completely separate layout form animation. This is not as critical a goal any more. - Use new test criteria for starting and stopping animations. Bug 7885350 fixed. Change-Id: Ib679117f627d0957cda17cc6ffca2bc2cdd6ecdd
* Recouple layout and animation a bit.Craig Mautner2012-12-041-2/+1
| | | | | | | Share state between layout and animation and stop copying redundant data between the two. Change-Id: If07d3fc3ddfd33e3d46bf45d24d7aca58067ee66
* Do not clear AppWindowToken.allDrawn while animating.Craig Mautner2012-11-161-0/+3
| | | | | | | | | | | Creating new surfaces for applications clears the allDrawn flag in the AppWindowToken. If the app windows were animating when this happened the animation would complete immediately resulting in jank. This fix defers clearing allDrawn until the animation completes. Bug 7326635 fixed. Change-Id: I5abe3b9ecfbefb476de6a6c8acc394373cc11751
* Adds showWhenLocked attribute to Activities.Craig Mautner2012-10-061-0/+1
| | | | | | | | The new attribute allows an Activity such as the alarm to appear on all users screens. Bug: 7213805 fixed. Change-Id: If7866b13d88c04af07debc69e0e875d0adc6050a
* Further isolate layout side from animation side.Craig Mautner2012-07-131-1/+1
| | | | | | | | | | | | | | | | | | - Use local AppWindowAnimators in WindowAnimator rather than using shared WindowManagerService objects. - Use local WindowStateAnimators in AppWindowAnimator rather than use AppToken's WindowState objects. - Remove redundant WindowManagerService parameter passed to AppWindowAnimator ctor. - Keep from copying parameters from performLayout if the parameters haven't changed since the last copy. - Link WindowStateAnimator to AppWindowAnimator to keep from going through WindowStateAnimator.mWin, WindowState.mAppToken and AppWindowToken.mAppAnimator. - Converted attached WindowState in WindowStateAnimator to WindowStateAnimator to eliminate multiple conversions. Change-Id: I5e35af88d8fdc1a7454984eaea91a1bc4f926978
* Merge CL 202423/3 App launching has random pauses.Craig Mautner2012-07-031-2/+8
| | | | Change-Id: Iba5616182c02e51f4d9063d0a01b30b9f558549a
* Animate from local list of WindowStateAnimators.Craig Mautner2012-04-061-13/+0
| | | | | | | | | | | | | Stop animate() from using the mWindows maintained by WindowManagerService. Animating WindowStateAnimators are now drawn from a HashSet maintained by WindowAnimator and containing just those WindowStateAnimators that have Surfaces. When starting a move animation do not place parameters directly into the WindowStateAnimator, instead pass them through the Handler. Also removed synchronization points from mWindows/mAppTokens add/remove.
* Merge "Refactor input system into its own service."Jeff Brown2012-04-051-1/+2
|\
| * Refactor input system into its own service.Jeff Brown2012-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Extracted the input system from the window manager service into a new input manager service. This will make it easier to offer new input-related features to applications. Cleaned up the input manager service JNI layer somewhat to get rid of all of the unnecessary checks for whether the input manager had been initialized. Simplified the callback layer as well. Change-Id: I3175d01307aed1420780d3c093d2694b41edf66e
* | First separation of animation from AppWindowToken.Craig Mautner2012-04-041-260/+4
| | | | | | | | | | | | New class AppWindowAnimator pulls animation out of AppWindowToken. Change-Id: Ic1ccb6ec2bf091f1f901fe3c20cbeb242376ae6b
* | Move more items between layout and animate sides.Craig Mautner2012-04-041-5/+9
|/ | | | | | | | | | | | | | | - Isolate DimAnimator animation from the layout side. - Isolate mWallpaperForceHidingChanged and mOrientationChangeComplete from the animation side. - Eliminate a redundant setting of mOrientationChangeComplete to true. It was already true at that point. - Synchronize changes to mWindows and mAppTokens on mAnimator. This is a nop until we go to multiple threads. - Synchronize AppWindowToken.freezingScreen on mAnimator. - Modification to repeat layout debugging including temporary enabling of spew on layout repeats. Change-Id: Ic8d82b1c197144aaf6957caa5f71e175288220f2
* Refactor to convert four state booleans to int.Craig Mautner2012-04-021-2/+1
| | | | | | | | | Replace four booleans (mDrawPending, mCommitDrawPending, mReadyToShow and mHasDrawn) with a single int that can take on the four states. Move mLastHidden from WindowState to WindowStateAnimator. Change-Id: Ieff319dfa19123bf5a6cdc98e9ab28fd432b8153
* Further isolate the Surface from WindowState.Craig Mautner2012-04-021-1/+2
| | | | | | | | | | | Replace references to mWinAnimator.mSurface with new member mHasSurface. Clean up odd looping structures. Simplify logging. Change-Id: I9cc52a657044220d7b92528928b11bb18a724aef
* Move variables into animation class.Craig Mautner2012-03-301-2/+2
| | | | | | | | | | | Moved drawPending and commitDrawPending and associated methods from WindowState to WindowStateAnimator. Created mechanism for passing results from WindowAnimator to WindowManagerService. Initial results passed are mUpdateRotation and mWallpaperMayChange. Change-Id: Ib03d28f921580ac9426ea9233bea6eafc9ea964c
* Move Surface operations out of WindowState.Craig Mautner2012-03-291-10/+11
| | | | | | | | | Migrated the bulk of Surface operations from WindowState to WindowStateAnimator. There remain a multitude of cross-referencing between the two classes and most of the other classes in the wm package. Change-Id: I4bfdfb84be31341371f3ef311aca8fc6a4966692
* Refactor animation out of WindowState.Craig Mautner2012-03-261-9/+9
| | | | | | | | Remove the animation stepping from WindowState and move it into a new class, WindowStateAnimator. Update all references to moved variables in related files. Change-Id: I7540d8f897b370c73975f3ffe450140861cb0cd1
* Skip layout if performShow fails.Craig Mautner2012-03-251-0/+4
| | | | | | | | | | In cases where a Surface does not go from hidden to shown, do not set the perform layout flag. This keeps us out of repeated passes through the layout code. Fixes bug 6222487. Change-Id: I22601bef5733d2f996a8cbdd50d6b89517bc3122
* Add new thumbnail animation.Dianne Hackborn2012-03-231-3/+82
| | | | | | | | | | Use it for recent tasks switching. Not perfect yet by far, but something. Also fix issue #6186758: Twitter crashes after tapping on a tweet on JRM75D Change-Id: I49bf6c94aafde875ac652dedaf96d6c08cc9e7d2
* Separate animation into separate class.Craig Mautner2012-03-221-2/+2
| | | | | | | Introduction of the class WindowAnimator which takes care of all animations stepping and Surface operations. Change-Id: I78f1c269fa57df0616c08adbe156e3059709ae48
* Continue animations started from AppWindowToken.Craig Mautner2012-03-211-1/+4
| | | | | | | | | | | Animations that were started from AppWindowToken.showAllWindowsLocked were not setting mInnerFields.mAnimating and hence the animations were not progressing. This resulted in popups such as menus and time/date settings not showing up. Fixes bug 6205076. Change-Id: I4daae5895e64182328671e282331f14dd5561d5e
* Minor refactoring prior to major refactoring.Craig Mautner2012-03-201-1/+1
| | | | | | | | | Removal of blur layer. Deferral of Surface actions in BlackFrame from ctor to first use. Combine common test into single method okToDisplay(). Remove redundant logic in DimAnimator. Change-Id: I43af0415794a8f142803ce94d7e17539aafac67d
* Fix flickering when starting and ending apps.Craig Mautner2012-03-201-0/+4
| | | | | | | | | | | | | Surfaces were displaying animations in their entirety for a single frame before the animation kicked in. This caused a flash on the screen. By setting the animation to invisible (alpha=0) at their start it makes no difference if they are displayed. Fixed bug 6176540. Removed redundant mDimAnimator.show call. Change-Id: I47c1b0d38273b011d9115822a8476671d6a050fc
* Perform finish animation actions.Craig Mautner2012-03-161-2/+4
| | | | | | | | | | When stepAnimation returns false, do not return false immediately. Instead carry out finish actions. Also, remove state machine that is no longer necessary. Fixes bug 6184070. Change-Id: I530eb2b62b864bbce929f573d10b31b102152f1f
* Separate out animations from layout.Craig Mautner2012-03-141-5/+7
| | | | | | | | | (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
* Separate animation steps into start, step and finish phases.Craig Mautner2012-03-011-17/+25
| | | | | | Fixes bug 6089126. Change-Id: Iafbde36ff719640335a7ecf762e1d991cf7915e4
* Various performance and other work.Dianne Hackborn2011-10-311-0/+24
| | | | | | | | | | | | | | | | | | - IME service now switches between visible and perceptible depending on whether it is being showm, allowing us to more aggressively free its memory when not shown. - The activity display time is no longer delayed by the activity transition animation. - New -R (repeat) option for launching activities with the am command. - Improved some documentation on Loader to be clear about some methods that apps should not normally call. - FrameworkPerf test now allows you to select individual tests to run. Change-Id: Id1f73de66dc93d63212183958a72119ad174318b
* Fix issue #5312624: Lock screen very flickeryDianne Hackborn2011-09-201-1/+1
| | | | | | | | | | | | | The key thing was to fix isVisibleOrBehindKeyguardLw() so that it wouldn't count a window as not visible if it was just currently in the process of drawing due to an orientation change. Also improve logic in deciding when to turn screen on to better ensure the screen is in a stable state, in particular treating screen off as a frozen screen and not allowing it to turn on until the update of the screen due to any config change is done. Change-Id: If82199f3773270b2d07f9c7de9da2dad8c7b28d7
* Refactor input dispatcher use of window/app handles.Jeff Brown2011-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This change moves the cached window and application input state into the handle objects themselves. It simplifies the dispatcher somewhat because it no longer needs to fix up references to transient InputWindow objects each time the window list is updated. This change will also make it easier to optimize setInputWindows to avoid doing a lot of redundant data copying. In principle, only the modified fields need to be updated. However, for now we continue to update all fields in unison as before. It turns out that the input dispatcher was inappropriately retaining pointers to InputWindow objects within the mWindows InputWindow vector. This vector is copy-on-write so it is possible and the item pointers to change if an editing operation is performed on the vector when it does not exclusively own the underlying SharedBuffer. This bug was uncovered by a previous change that replaced calls to clear() and appendVector() with a simple use of operator= which caused the buffer to be shared. Consequently after editItemAt was called (which it shouldn't have, actually) the buffer was copied and the cached InputWindow pointers became invalid. Oops. This change fixes the problem. Change-Id: I0a259339a6015fcf9113dc4081a6875e047fd425
* Explode WindowManagerService.Dianne Hackborn2011-02-171-0/+413
Change-Id: I3d73ed4c9a1b5d730aeffeb2df24ce5e6117d698