summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewTreeObserver.java
Commit message (Collapse)AuthorAgeFilesLines
* Add some client side logging for interrupted draws to the dumpWinson Chung2022-08-091-1/+18
| | | | | | | | | | | | | | | | | | | | | In particular, these are to try and narrow down why the app window isn't drawing in b/235463625 where the draw state for launcher is stuck in DRAW_PENDING. - mLastReportNextDrawReason: the reason the last draw was requested, maybe useful in telling if wm is not requesting a draw if not set - mLastPerformTraversalsSkipDrawReason: the reason perform traversals returned without drawing (includes wm/predraw cancel reasons) - mLastPerformDrawSkippedReason: the reason perform draw returned without drawing - mLocalSyncState: extra logging to confirm that the last sync actually completes Bug: 235463625 Test: dumpsys -T 60000 activity -v all Test: dumpsys activity activities Change-Id: I10118470fe62075920e9ce29fe449b0cfc8570c9 Merged-In: I10118470fe62075920e9ce29fe449b0cfc8570c9
* Adds ViewTreeObserver window visibility listenersAlejandro Nijamkin2022-07-041-0/+84
| | | | | | | | | Follows the same exact pattern as the window attach and window focus listeners in the same class. Bug: 235403546 Test: Verified as part of follow-up systemui CLs Change-Id: I7c825baf5913e6e0b85f475503639a4d17483d4e
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-291-3/+3
| | | | | | | | | | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
* Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang2020-10-281-3/+3
| | | | | | | | | This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-271-3/+3
| | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
* Add @Nullable annotation to the parameter of Object.equals() methods.Roman Kalukiewicz2020-10-151-1/+1
| | | | | | | | | | | | | | | | | | Those annotations could be inferred by some tools (like Kotlin), but the https://checkerframework.org/ doesn't check inherited annotations complaining about all equals() invocations that get nullable argument. The change was generated by running find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /' in the frameworks/base directory and by automatically adding and formatting required imports if needed. No manual edits. Bug: 170883422 Test: Annotation change only. Should have not impact. Exempt-From-Owner-Approval: Mechanical change not specific to any component. Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I5be7335b23a92b8ac80d2fd890198273b66ad644
* Add @UnsupportedAppUsage annotations for greylist.Artur Satayev2019-11-191-0/+5
| | | | | | | | | | | | | go/cleanup-greylist-txt These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code. This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP. Bug: 137350495 Test: m Exempt-From-Owner-Approval: merge Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
* Clean up SurfaceView.Issei Suzuki2019-07-031-1/+1
| | | | | | Bug: 136538998 Test: no-op refactoring CL. Existing unit tests still pass. Change-Id: Idd6c5871ed34880a053f3a43ab4f7aa3a466b548
* Nullability for ViewTreeObserver gesture exclusionAdam Powell2019-04-101-2/+4
| | | | | | Bug: 128704597 Test: n/a Change-Id: Ia89458cf967ab4e01738ba1658e3460f27ae1830
* System gesture exclusion rects for ViewsAdam Powell2019-02-261-0/+55
| | | | | | | | | | | | | | | Allow views to register a list of rects where the device's system UI should not intercept complex (read: down+move+up) gestures on specific sub-regions of the view. This should not be used for large-scale, full-view gesture recognition such as scrolling, but rather for specific areas such as SeekBar's scroll thumb or DrawerLayout's edge strip for swiping open a navigation drawer. Add ability for ViewTreeObserver to observe transformed exclusion rects Bug: 126360272 Test: atest android.view.cts.SystemGestureExclusionRectsTest Change-Id: If89b6f66637e40efa12955d6408f6e37b25cb46f
* API: Clean up redundant and ineffective usages of SystemApi and TestApiAdrian Roos2018-12-111-3/+0
| | | | | | | | | | | | | Everything that is marked SystemApi or TestApi, but not @hide is still part of the public SDK, it is therefore not sound to have that combination. In the future, specifing such a combination will be considered an error to prevent inadvertently exposing SystemApi and TestApi as public API. Bug: 115333477 Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi Exempt-From-Owner-Approval: API cleanup
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-201-0/+19
| | | | | | | | | | | | | | | | | | | | | | For packages: android.view.textservice android.view.textclassifier.logging android.view.textclassifier android.view.inputmethod android.view.autofill android.view.accessibility android.view This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I4147b038ed7adf0311ee9918b44766f82a057eaf
* Add a frame commit callback test APIJohn Reck2018-07-271-0/+57
| | | | | | Bug: 111719753 Test: CtsUiRenderingTestCases Change-Id: Ie08d49b735f5a42a2f06e9049547a2287ecce575
* Unbreak even more APK 26 apps running on "O" preview/beta builds.Jeff Sharkey2017-05-171-1/+1
| | | | | | Bug: 38391358 Test: builds Change-Id: Ic48f9cb53da3ed8241e5d40d3096304ee4dfebd2
* Fix merge for OnDrawListenerJohn Reck2016-12-121-0/+8
| | | | | | | Test: CTS tests for PixelCopy pass; without this they time out as they never get the OnDraw call. Change-Id: I6acced4699182b969f38a606a1314b2ffb38d760
* Illegal behavior -> ExceptionJohn Reck2016-09-121-1/+28
| | | | | | | Throw an IllegalStateException if the contract of OnDrawListener is violated. Change-Id: Ic86f6a0c8cd69ee7a8daa0ba135a3df76f56a213
* Merge "SwipeDismissLayout makes activity opaque only after entry animation ↵Filip Gruszczynski2014-11-211-0/+49
|\ | | | | | | | | | | | | | | | | ends." into lmp-sprout-dev automerge: 96c5d37 * commit '96c5d37fb5139465cdd3d882b5deba830497557a': SwipeDismissLayout makes activity opaque only after entry animation ends.
| * SwipeDismissLayout makes activity opaque only after entry animation ends.Filip Gruszczynski2014-11-191-0/+49
| | | | | | | | | | Bug: 18340863 Change-Id: Ic60fa2463618f86b1ae23fc4a0c06cd348f28334
* | Add enter-animation-done callback for system windowsCraig Mautner2014-10-301-0/+86
|/ | | | | | | | | | | | | | | | Existing hidden methods allow activities to be notified when their windows have completed animating in. This change adds that capability to system windows using a ViewTreeObserver callback since system windows lack an activity token. The first subsystem to use this is the UserSwitchingDialog which was previously using a 250 msec timeout to dismiss the dialog. That deadline was often missed leaving the user with no dialog on the screen during the transition. Fixes bug 16661752. Change-Id: I70789e0d9c07112f275e76fb82850926305f290d
* Reset insets when inset computer is removed.Jeff Brown2013-09-301-0/+7
| | | | | | | | | | | | When an inset computer is registered with the view tree observer, we report content insets to the window manager. When an inset computer is subsequently unregistered, we must take care to clear these insets. This patch remembers whether the previously computed insets were non-empty so that it can force insets to be reset when needed. Bug: 10840662 Change-Id: I4cce5ba64cc5234b98363b025ac4bb42e64349f1
* Fix leak fix in ViewTreeObserverChet Haase2013-09-181-2/+2
| | | | | | | | | | | | The leak fix of the CopyOnWriteArray in ViewTreeObserver was too aggressive, always clearing the shadow copy when it should only have cleared it when needed. The way it works now, we will always clear the listeners for ViewTreeObserver after the listeners are processed. Issue #10815924 ViewTreeObserver leak fix too aggressive Change-Id: Iff0095d73beb38e52b0a5ae6b6378afec4458fd3
* Plug leaks in transitionsChet Haase2013-09-141-0/+2
| | | | | | | | | | | | | | | | Transitions were leaking views due to TransitionsValues holding references to views/parents. The references were fine, but the retention of the transition objects themselves were not. There were a few different places that needed to be plugged: - clones were not making new copies of some fields, leading to caching references in the original object (which was then cloned later to other clones) - Visibility was using a persistent field to cache temporary values. This transition, when cloned, would retain these instances, keeping references to views - ViewTreeObserver had a bug that would leak listeners Issue #10749071 Activity instance leak between TransitionManager and InputMethodManager Change-Id: I1d5d457dc5e020c7b9e8392a95e3b2c488461119
* Make sure textviews draw in layersRomain Guy2013-06-281-3/+10
| | | | Change-Id: I993a430880ab66739aed1fa7ae625290b2349835
* New media button API.Dianne Hackborn2013-03-221-0/+153
| | | | | | | | | | | This allows sending media buttons to any PendingIntent, so they can be captured with a registered receiver. Also add some new ViewTreeObserver APIs; this is all for a new support library API to watch media buttons while an app has input focus. Change-Id: I3c51cef59460662b008c9a2cc87d6a6383c21855
* Remove ViewTreeObserver allocationsRomain Guy2012-06-121-34/+145
| | | | | | A couple of allocations remain to handle possibly recursive listeners. Change-Id: I72fd271c2fc4f4ad427a27e0665f780cae117aea
* Revert "Remove ViewTreeObserver allocations"Chet Haase2012-06-071-161/+45
| | | | | | | | | | | | | | This reverts commit b999cc118fe430699e9a67d5dab355125b873abb. There was an assumption in this earlier change that observer dispatching could not be recursive - we could only ever have one iteration on the observer listener list. This assumption broke down in a specific app, and maybe in more, so reverting the change for now. We should probably find a way to accomplish the same allocation-minimizing goal without causing exceptions when violating our assumptions. Issue #6620795 [Application compatibility] Lufthansa app crashes Change-Id: I1c1f9ad329c14398feb0e74ce77e1a07111f7d1f
* Remove ViewTreeObserver allocationsRomain Guy2012-05-071-45/+161
| | | | | | | | | This change replaces CopyOnWriteArrayList with a custom CopyOnWriteArray. The new CopyOnWriteArray only allocates when a concurrent modification is detected. Only one loop can iterate over CopyOnWriteArray at any given time and the class is not thread safe. Change-Id: Ie67a1ec20ff095350bf3c5d4f87cdb231ad57221
* Add a new OnDrawListener to ViewRootRomain Guy2012-04-041-25/+94
| | | | | | | This can be used by app to efficiently listen for draw passes. This listener is guaranteed to not generate any garbage unlike OnPreDrawListener. Change-Id: Ida40d11a3f8a5d2617bafe722906ee5c9af48602
* Fix API typoRomain Guy2012-01-231-1/+18
| | | | Change-Id: Iac6de947b0d550cc8dd4a3b5d88baa322c21bbb8
* Fix scroll listeners lost in ViewTreeObserver.Mark Brophy2011-10-251-0/+8
| | | | | Bug: 5512156 Change-Id: I4bb7ccab39053ae75a4bef9309ab334a4ccecf51
* Support non-rectangular input regions.Jeff Brown2011-01-161-10/+26
| | | | | | | | This enables the system bar to carve out a region through which events will be sent to the IME behind it. Bug: 3238092 Change-Id: I69b855a8d9b5b3ee525266c0861826e53e5b5028
* Adding JNI methods as a faster reflection mechanismChet Haase2010-11-041-18/+17
| | | | | | | This approach is only for the common cases of void-return, single-argument float/int methods. Change-Id: Ifb31535a6f717b85417eced93c579be6e461e039
* AI 145994: Integrate #145778 from Donut.Dianne Hackborn2009-04-131-10/+12
| | | | Automated import of CL 145994
* auto import from //branches/cupcake_rel/...@140373The Android Open Source Project2009-03-181-42/+64
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+613
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-613/+0
|
* auto import from //branches/cupcake/...@132276The Android Open Source Project2009-02-191-0/+66
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-0/+171
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+376