summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewRoot.java
Commit message (Collapse)AuthorAgeFilesLines
* AttachedSurfaceControl: Respond to API feedback.Robert Carr2021-05-051-53/+0
| | | | | | | | | | | "Root" is eliminated from the interface name as it is a property of the object and not the interface, but remains highlighted in the getters to express the relationship between the called and returned object. Bug: 185365821 Test: Existing tests pass Change-Id: I163fc23f2c37c984ef3ffeb7514c4d8c1c1a3f90
* Expose API for using SurfaceControl with ViewRootImplRobert Carr2021-03-301-0/+53
| | | | | | | | | | | | This API is appropriately called "ViewRoot". So far we just expose an API surface to reparent SurfaceControl to the ViewRoot (but without exposing the ViewRoot's SurfaceControl, to encourage developers not to shoot themselves in the foot) and to synchronize with the drawing of the ViewRoot SurfaceControl. Bug: 173463039 Test: ViewRootSyncTests Change-Id: I8ce0ed4b3efe50cdb3b71ae0f05ce25438d42368
* Rename ViewRoot to ViewAncestor.Joe Onorato2011-05-041-4046/+0
| | | | | | ViewRoot is about to be a new public class for poking at ViewAncestor. Change-Id: Ie95d707c6d8bbb48f78d093d7b2667851812a7d5
* view: fix a bad mergeDima Zavin2011-04-271-1/+0
| | | | | Change-Id: Ia309b6aca3d303d5ebc6f3def55b2d807ec8ec4b Signed-off-by: Dima Zavin <dima@android.com>
* am c4791bd6: Merge commit \'5e3562a5\' into mConley Owens2011-04-271-0/+1
|\ | | | | | | | | * commit 'c4791bd65cdf2e487c87da0d863140337e5141cb': onDetachedFromWindow is called before onAttachedToWindow
| * Merge commit '5e3562a5' into mConley Owens2011-04-271-0/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: core/java/android/view/ViewRoot.java Change-Id: Idd1eb8309e169eae2de3838f7969606df8097b87
| | * onDetachedFromWindow is called before onAttachedToWindowMartin Wallgren2011-04-131-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple threads are adding messages about the current state of the views to the main looper. This can cause onDetachedFromWindow to be posted on the looper before onAttachedToWindow. This change will make sure to only dispatch onDetachedFromWindow if we have previously dispatched onAttachToWindow. Change-Id: Ibc7cbcafb098bc000d2ef5480d2110d3fff4d55a
* | | Touch exploration feature, event bubling, refactorSvetoslav Ganov2011-04-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Added an Input Filter that interprets the touch screen motion events to perfrom accessibility exploration. One finger explores. Tapping within a given time and distance slop on the last exlopred location does click and long press, respectively. Two fingers close and in the same diretion drag. Multiple finglers or two fingers in different directions or two fingers too far away are delegated to the view hierarchy. Non moving fingers "accidentally grabbed the device for the scrren" are ignored. 2. Added accessibility events for hover enter, hover exit, touch exoloration gesture start, and end. Accessibility hover events are fired by the hover pipeline. An accessibility event is dispatched up the view tree and the topmost view fires it. Thus predecessors can augment the fired event. An accessibility event has several records and a predecessor can optionally modify, delete, and add such to the event. 3. Added onPopulateAccessibilityEvent and refactored the existing accessibility code to use it. 4. Added API for querying the currently enabled accessibility services by feedback type. Change-Id: Iea2258c07ffae9491071825d966dc453b07e5134
* | | Revert "Touch exploration feature, event bubling, refactor"Adam Powell2011-04-221-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ac84d3ba81f08036308b17e1ab919e43987a3df5. There seems to be a problem with this API change. Reverting for now to fix the build. Change-Id: Ifa7426b080651b59afbcec2d3ede09a3ec49644c
* | | Merge "Touch exploration feature, event bubling, refactor"Svetoslav Ganov2011-04-221-0/+8
|\ \ \
| * | | Touch exploration feature, event bubling, refactorSvetoslav Ganov2011-04-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Added an Input Filter that interprets the touch screen motion events to perfrom accessibility exploration. One finger explores. Tapping within a given time and distance slop on the last exlopred location does click and long press, respectively. Two fingers close and in the same diretion drag. Multiple finglers or two fingers in different directions or two fingers too far away are delegated to the view hierarchy. Non moving fingers "accidentally grabbed the device for the scrren" are ignored. 2. Added accessibility events for hover enter, hover exit, touch exoloration gesture start, and end. Accessibility hover events are fired by the hover pipeline. An accessibility event is dispatched up the view tree and the topmost view fires it. Thus predecessors can augment the fired event. An accessibility event has several records and a predecessor can optionally modify, delete, and add such to the event. 3. Added onPopulateAccessibilityEvent and refactored the existing accessibility code to use it. 4. Added API for querying the currently enabled accessibility services by feedback type. Change-Id: Iec03c6c3fe298de3f14cb6efdbb9b198cd531a0c
* | | | Rework display size access.Dianne Hackborn2011-04-211-3/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | Applications now get the display size from the window manager. No behavior should be changed yet, this is just prep for some real changes. Change-Id: I2958a6660895c1cba2b670509600014e55ee9273
* | | Remove the deprecated things from Config.java. These haven't been working ↵Joe Onorato2011-04-071-5/+4
| | | | | | | | | | | | | | | | | | since before 1.0. Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
* | | Coalesce input events that arrive faster than 333Hz.Jeff Brown2011-04-071-10/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers report individual finger updates one at a time instead of all at once. When 10 fingers are down, this can cause the framework to have to handle 10 times as many events each with 10 times as much data. Applications like PointerLocation would get significantly bogged down by all of the redundant samples. This change coalesces samples that are closely spaced in time, before they are dispatched, as part of the motion event batching protocol. Increased the size of the InputChannel shared memory buffer so that applications can catch up faster if they accumulate a backlog of samples. Added logging code to help measure input dispatch and drawing latency issues in the view hierarchy. See ViewDebug.DEBUG_LATENCY. Change-Id: Ia5898f781f19901d2225c529a910c32bdf4f504f
* | | Add a little input event consistency verifier.Jeff Brown2011-03-311-0/+27
| | | | | | | | | | | | | | | | | | | | | The idea is to assist with debugging by identifying cases in which the input event stream is corrupted. Change-Id: I0a00e52bbe2716be1b3dfc7c02a754492d8e7f1f
* | | When deleting a path, remove it from the path cache.Romain Guy2011-03-241-2/+5
| | | | | | | | | | | | | | | | | | Bug #4170585 Change-Id: I6be4d251ceb908c89afe49c2ff85c05f36c73b70
* | | Remove unnecessary test.Romain Guy2011-03-211-1/+1
|/ / | | | | | | Change-Id: I7cb797f4be70ecd40a65c51e92a8e8722e49dec2
* | am 403da3a7: am 8d25eab1: Merge "Releasing lock even if exception is thrown."Brad Fitzpatrick2011-03-151-4/+5
|\| | | | | | | | | * commit '403da3a79af78920b33448bbc8d91c4b8aebf4a4': Releasing lock even if exception is thrown.
| * Releasing lock even if exception is thrown.Jozef BABJAK2011-02-221-4/+5
| | | | | | | | | | | | | | | | However, the whole method needs to be reviewed. It still has several locking/unlocking places not tied together by try-finally construct, but they cannot be fixed without deeper understanding. Change-Id: Iaaf87568d585327654be409377b6d57a1da135eb
* | Fix 3201849: Enable hardware acceleration in LockScreen WaveView [DO NOT MERGE]Jim Miller2011-03-101-5/+11
| | | | | | | | Change-Id: I07bbed7843857158cd2c1ffd9b184bde7fd5860d
* | Fix issue #3515088: Don't be so aggressive trying to reclaim memoryDianne Hackborn2011-03-071-7/+3
| | | | | | | | Change-Id: I8184306fa8c27a41b8bcfcad8d96985be8f0c9aa
* | Fix issue #3485923: Gmail crashDianne Hackborn2011-03-021-8/+58
| | | | | | | | | | | | | | Allow application to try to recover if a surface OOM error happens on the client side. Change-Id: I0308bd99647a35e4bcac448340b7fc6330a828f6
* | Fix issue #3495749: Crash on choosing to open the downloaded imagesDianne Hackborn2011-03-011-44/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is due to the window doing a relayout after its activity is stopped, at which point it may need to interact with the adapter to load data. The fix here is to tell ViewRoot about an activity being stopped and, if in this state, hold off on doing any new measurements and layouts of the hierarchy until it is no longer stopped. In this case the relayout was happening due to the cursor being deactivated, with causes the adapter to invalidate its data. Because this is now in a dialog window, this allows the window to actually be resized smaller (unlike when in a full screen activity), and boom. Change-Id: I26442b4679819b4a4e6bc56289afd3445526750b
* | Add support for mouse hover and scroll wheel.Jeff Brown2011-02-251-31/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dispatch ACTION_HOVER_MOVE and ACTION_SCROLL through the View hierarchy as onGenericTouchEvent. Pointer events dispatched this way are delivered to the view under the pointer. Non-pointer events continue to be delivered to the focused view. Added scroll wheel support to AbsListView, ScrollView, HorizontalScrollView and WebView. Shift+VSCROLL is translated to HSCROLL as appropriate. Added logging of new pointer events in PointerLocationView. Fixed a problem in EventHub when a USB device is removed that resulted in a long stream of ENODEV errors being logged until INotify noticed the device was gone. Note that the new events are not supported by wallpapers at this time because the wallpaper engine only delivers touch events. Make all mouse buttons behave identically. (Effectively we only support one button.) Change-Id: I9ab445ffb63c813fcb07db6693987b02475f3756
* | Add new axes for joysticks and mouse wheels.Jeff Brown2011-02-191-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added API on InputDevice to query the set of axes available. Added API on KeyEvent and MotionEvent to convert keycodes and axes to symbolic name strings for diagnostic purposes. Added API on KeyEvent to query if a given key code is a gamepad button. Added a new "axis" element to key layout files to specify the mapping between raw absolute axis values and motion axis ids. Expanded the axis bitfield to 64bits to allow for future growth. Modified the Makefile for keyboard prebuilts to run the keymap validation tool during the build. Added layouts for two game controllers. Added default actions for game pad button keys. Added more tests. Fixed a bunch of bugs. Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
* | am f1a9ab26: am d23316bc: Merge "Maybe fix issue #3358322: Status and nav ↵Dianne Hackborn2011-01-271-0/+2
|\ \ | | | | | | | | | | | | | | | | | | bar died while watching youtube" into honeycomb * commit 'f1a9ab2673a2b5e6f684f7ceced177e3fc749ee7': Maybe fix issue #3358322: Status and nav bar died while watching youtube
| * \ Merge "Maybe fix issue #3358322: Status and nav bar died while watching ↵Dianne Hackborn2011-01-271-0/+2
| |\ \ | | | | | | | | | | | | youtube" into honeycomb
| | * | Maybe fix issue #3358322: Status and nav bar died while watching youtubeDianne Hackborn2011-01-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or at least make it better. Now if we get a failure locking the surface, we mark to do a full relayout pass later to try to get a new good surface. Also fix some bugs in how activity manager was classifying processes for their OOM adjustment to make better choices in what to kill. Change-Id: I8e4aa86744211ba7693f9828291d8bbf2698274f
* | | | am 01a58129: am 0250bc2f: Merge "Catch exception when ViewRoot\'s surface is ↵Romain Guy2011-01-271-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | not valid. Bug #3399426" into honeycomb * commit '01a5812902668d0dbba51cd0efe22bfba3711230': Catch exception when ViewRoot's surface is not valid. Bug #3399426
| * | | Catch exception when ViewRoot's surface is not valid.Romain Guy2011-01-271-0/+1
| |/ / | | | | | | | | | | | | | | | Bug #3399426 Change-Id: Id4e0b8714c9520c4e84e81c2978752d46c912b6b
* | | am f35d43f9: am 2dc9c784: Merge "Fix issue #3382992: IME close animation ↵Dianne Hackborn2011-01-261-0/+1
|\| | | | | | | | | | | | | | | | | | | | stutters from URL bar" into honeycomb * commit 'f35d43f90b9e4553343a59b217430aaba91b0d1f': Fix issue #3382992: IME close animation stutters from URL bar
| * | Merge "Fix issue #3382992: IME close animation stutters from URL bar" into ↵Dianne Hackborn2011-01-261-0/+1
| |\ \ | | | | | | | | | | | | honeycomb
| | * | Fix issue #3382992: IME close animation stutters from URL barDianne Hackborn2011-01-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Gross hack is grosser. Change-Id: I0a34bf1d7c16c547402318f24776a5f7e8b7552b
* | | | am a4a5ec5e: am 1aadb210: Merge changes I48392c75,Id09437a4,I4a0aa878 into ↵Joe Onorato2011-01-261-4/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | honeycomb * commit 'a4a5ec5e748f99c40301c9c422b3d36cb44c6081': Expose the window flags for lights out mode. Make TabletStatusBar call into StatusBarManagerService when it goes out of lights out mode on its own. Make FLAG_FULLSCREEN not go into lights out mode anymore.
| * | | Expose the window flags for lights out mode.Joe Onorato2011-01-261-4/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I hadn't wanted to do this, but it makes porting the FLAG_FULLSCREEN stuff over to this simpler because you don't have to go find a view to proxy through. This change also clears the flag everywhere when the window manager notifies the views that the change has come back. Change-Id: I48392c7550925bcca50c5bb9e1f263e99de6c7bc
* | | am 5742a277: am b6110a1e: Merge "Make sure the opaque bitmap is opaque. GL ↵Romain Guy2011-01-251-1/+7
|\| | | | | | | | | | | | | | | | | | | | doesn\'t like being lied to. Bug #3382992" into honeycomb * commit '5742a2771025fc40f00777b5b4aa02765317f5f9': Make sure the opaque bitmap is opaque. GL doesn't like being lied to. Bug #3382992
| * | Make sure the opaque bitmap is opaque. GL doesn't like being lied to.Romain Guy2011-01-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Bug #3382992 The result still looks wrong but it works as designed, unfortunately. Change-Id: I6108e199fa336cb01faaabf6c75faa3b71c2339b
* | | am 391ef42c: am 3168a137: Merge "Fix surface frame size reporting." into ↵Jeff Brown2011-01-251-0/+1
|\| | | | | | | | | | | | | | | | | | | | honeycomb * commit '391ef42c92ab97e5c22a720973790696d30576ca': Fix surface frame size reporting.
| * | Merge "Fix surface frame size reporting." into honeycombJeff Brown2011-01-251-0/+1
| |\ \
| | * | Fix surface frame size reporting.Jeff Brown2011-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am 535602fe: am 3ac1b0f0: Merge "Prevent crash in View when gathering ↵Romain Guy2011-01-251-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | attributes without an AttachInfo. Bug #3385339" into honeycomb * commit '535602fe5572e2a648251faf01b4dcd3649d5ede': Prevent crash in View when gathering attributes without an AttachInfo. Bug #3385339
| * | | Prevent crash in View when gathering attributes without an AttachInfo.Romain Guy2011-01-251-1/+1
| |/ / | | | | | | | | | | | | | | | Bug #3385339 Change-Id: I06b6f03721b52ab0b9d13c2fb3e133ae25d99970
* | | am 4e1db6da: am 2ff6d705: Merge "Enable partial invalidates when rendering ↵Romain Guy2011-01-241-3/+12
|\| | | | | | | | | | | | | | | | | | | | with OpenGL." into honeycomb * commit '4e1db6dadd404c023b71ae1ab54e990fce56abc3': Enable partial invalidates when rendering with OpenGL.
| * | Enable partial invalidates when rendering with OpenGL.Romain Guy2011-01-241-3/+12
| | | | | | | | | | | | Change-Id: Ie8be06c4776b815e8737753eb8003b4fd8936130
* | | am 2acb67ec: am 67005b05: Merge "Use optimized display lists for all ↵Chet Haase2011-01-241-1/+1
|\| | | | | | | | | | | | | | | | | | | | hwaccelerated rendering" into honeycomb * commit '2acb67ec9fe34316231519373f59dfb76c03d57b': Use optimized display lists for all hwaccelerated rendering
| * | Use optimized display lists for all hwaccelerated renderingChet Haase2011-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, display lists were used only if hardware acceleration was enabled for an application (hardwareAccelerated=true) *and* if setDrawingCacheEnabled(true) was called. This change makes the framework use display lists for all views in an application if hardware acceleration is enabled. In addition, display list renderering has been optimized so that any view's recreation of its own display list (which is necessary whenever the visuals of that view change) will not cause any other display list in its parent hierarchy to change. Instead, when there are any visual changes in the hierarchy, only those views which need to have new display list content will recreate their display lists. This optimization works by caching display list references in each parent display list (so the container of some child will refer to its child's display list by a reference to the child's display list). Then when a view needs to recreate its display list, it will do so inside the same display list object. This will cause the content to get refreshed, but not the reference to that content. Then when the view hierarchy is redrawn, it will automatically pick up the new content from the old reference. This optimization will not necessarily improve performance when applications need to update the entire view hierarchy or redraw the entire screen, but it does show significant improvements when redrawing only a portion of the screen, especially when the regions that are not refreshed are complex and time- consuming to redraw. Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
* | | resolved conflicts for merge of faf083ef to masterJoe Onorato2011-01-241-5/+32
|\| | | | | | | | | | | Change-Id: I316a1b4356f6dba6c3880ccb02dbb2fa00d21a85
| * | visibility ("lights out") API.Joe Onorato2011-01-231-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Views may setSystemUiVisibility() to recommend that the system chrome (status bar or other UI) show or hide itself. (This functionality was previously available only via the FLAG_FULLSCREEN window flag for some SystemUI implementations.) 2. Views may register a OnSystemUiVisibilityChangedListener on a view, and find out when the system UI actually appears or disappears, allowing apps to coordinate the appearance of their own UI if desired. Bug: 3241144 Change-Id: Ia1758d94099182d49a1e3688ea2738ae4995b829
* | | am 11a5d424: am b149f5c8: Merge "Fix issue #3302006: Cannot see the dialog ↵Dianne Hackborn2011-01-231-1/+1
|\| | | | | | | | | | | | | | | | | | | | lunched from a transparent activity." into honeycomb * commit '11a5d42454fad1f61eb4874855113c5416396888': Fix issue #3302006: Cannot see the dialog lunched from a transparent activity.
| * | Fix issue #3302006: Cannot see the dialog lunched from a transparent activity.Dianne Hackborn2011-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The activity manager was not performing the layout pass on the new window, because its app token was still hidden, because the activity manager / window manager were still waiting for it to be ready to show. Just ignore whether the app token is hidden for this case. Also fixes some problems with animations, and tweaks the ViewConfiguration values for xlarge screens. Change-Id: Icbe9c77ba8127d1e02df2d6f27b8e86ec842e50a