summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityView.java
Commit message (Collapse)AuthorAgeFilesLines
* Deleting ActivityViewAntonio Kantek2021-05-201-720/+0
| | | | | | Test: atest CtsAccessibilityServiceTestCases Bug: 179161778 Change-Id: Ic66f3740819634366edb20a34a7c8177af258c2f
* Remove single task display pathWinson Chung2020-10-211-20/+9
| | | | | | | Test: atest TaskStackChangedListenerTest Test: atest RecentTasksTest Bug: 165794879 Change-Id: I4c86e58026be7bcbbd8a2568b396a281668b9385
* Merge "Use Builder for ActivityView"Charles Chen2020-09-161-23/+99
|\
| * Use Builder for ActivityViewCharles Chen2020-09-161-23/+99
| | | | | | | | | | | | fixes: 162901735 Test: touched tests Change-Id: I230d65d76b1bc8dfbae304b33579e7eb96d0593d
| * Require permission to create trusted displaysAndrii Kulian2020-08-121-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 162627132 Test: atest VirtualDisplayTest#testTrustedVirtualDisplay Test: atest frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bubbles Test: atest DisplayTest Test: atest VirtualDisplayTest#testTrustedVirtualDisplay Test: atest VirtualDisplayTest#testUntrustedSysDecorVirtualDisplay Change-Id: Id06b2013ef5fdeadf321f14f8b611c733031d54d
* | Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347Jeff Sharkey2020-09-141-1/+1
|\ \ | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195 Change-Id: I7da537200efe31e803234bd1a0236843064186c8
| * | Update language to comply with Android's inclusive language guidanceJeff Sharkey2020-09-141-1/+1
| |/ | | | | | | | | | | | | | | | | See https://source.android.com/setup/contribute/respectful-code for reference Test: none Bug: 168334533 Exempt-From-Owner-Approval: docs updates Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
* / Require permission to create trusted displaysAndrii Kulian2020-09-011-2/+13
|/ | | | | | | | | | | | | | Bug: 162627132 Test: atest VirtualDisplayTest#testTrustedVirtualDisplay Test: atest frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bubbles Test: atest DisplayTest Test: atest VirtualDisplayTest#testTrustedVirtualDisplay Test: atest VirtualDisplayTest#testUntrustedSysDecorVirtualDisplay Test: adb logcat -b events Change-Id: Id06b2013ef5fdeadf321f14f8b611c733031d54d Merged-In: Id06b2013ef5fdeadf321f14f8b611c733031d54d
* Merge "Update virtual display size before turning it on." into rvc-devIssei Suzuki2020-06-231-2/+16
|\
| * Update virtual display size before turning it on.Issei Suzuki2020-06-191-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a bubble is expanded, a virtual display turns on, an activity for the bubble is resumed, and the activity draws contents on the virtual display. The system waits until the contents is drawn, then shows the contents in the bubble. However, if size of the virtual display is changed after resuming the activity, an app transition initiated by the activity is canceled, and this sequence gets stuck. As a result, contents in the bubble is never displayed. Test: Manual. Bug: 158675422 Change-Id: I3ba0805fd09f4dee36dae6a236b5b6fc7983e06b
* | Fixed the conflict of the release methods of ActivityView & TaskEmbeddershawnlin2020-06-151-11/+4
|/ | | | | | | | | | | | | | There is a case in Bubble that we might release a un-initialized TaskEmbedder while calling ActivityView.release() (ex. create a bubble and don't expand it and then dismiss it) which will cause an exception. Allow ActivityView.release() to be called at anytime and check the initialization state before calling TaskEmbedder.release(). Bug: 155417004 Test: 1. Add bubbles and don't expands them then dimiss them 2. Check logs. Change-Id: I583ddd36f407c908cb63c109834940fc91c8d130
* Add a @hide ctr to disable background layer in ActivityView & SurfaceViewshawnlin2020-06-051-1/+9
| | | | | | | | Bug: 152441717 Test: 1. Open bubble 2. adb shell dumpsys SurfaceFlinger 3. Check result Change-Id: I3bda67bb56781eb75b51dc51f491a97efac7b4ef
* Add the IME insets to virtual display for bubbleYunfan Chen2020-04-301-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | This patch will add a fake IME window to virtual display when IME is showing and covering a bubble window. Without the fake window, the bubble will not receive the correct IME insets. To do that, this patch: 1. Added an interface in ActivityView to get VirtualDisplay when needed, in order to create the display context. 2. Modify the visibility update. When the target is not a client controlled target, we ignore the client visibility. We also call visibility update when the control target updated. 3. With the modified infra, add the window with correct param and context. Bug: 150780413 Test: atest WmTests:DisplayPolicyLayoutTests Test: atest InsetsStateTest Test: atest InsetsPolicyTest Test: go/wm-smoke Test: See reproduce steps in the bug Change-Id: I52691b5c7f81261de580bb4fc762e88486e78141
* Make ActivityViews backing virtual display privateLinus Tufvesson2020-04-161-1/+13
| | | | | | | | | Bug: 150310377 Test: atest CtsWindowManagerDeviceTestCases:ActivityViewTest Test: Used bubbles test app to verify that it's still happy when using private VDs Change-Id: I02c6840b1f908a5177c217494de0110f5ce78f7e
* Add TestApi interfaces for window organizersWale Ogunwale2020-04-011-3/+6
| | | | | | | | Enables testing the API surfaces from CTS. Bug: 149338177 Test: they pass! Change-Id: I7e1f2852585a10c20d299bd87e9a87f828d06d6a
* Add task organizer based task embedderWinson Chung2020-03-301-8/+48
| | | | | | | | | | | | | | - Split TaskEmbedder into its current VirtualDisplay implementation and an implementation that uses task org to create and manage the task - Use the task org embedder implementation in separate bubble task view - Skip task org tasks from triggering task resizing - Add task org callback for back press on task root if requested Bug: 148977538 Test: atest CtsWindowManagerDeviceTestCases:ActivityViewTest Test: atest WmTests:TaskOrganizerTests Change-Id: Id422bb2547197c617f914ed7cf5085e02a1c3fb5
* Allow Shortcuts to be started on ActivityViewMady Mellor2019-12-021-0/+29
| | | | | | | | | | | | | | | We're doing some experiments with using shortcut info to produce bubbles instead of bubble metadata, shortcuts can only be launched via LauncherAppsService, not an intent so we need a new method on ActivityView. Test: manual with sysui CL ag/9617215: 1) enable shortcut-created bubbles 2) send a notification with shortcutId attached 3) expand that bubble Bug: 143173197 Bug: 138116133 Change-Id: I4d621ce703a40512588b9bd834dece9fe2ba9d8a
* Make onActivityViewDestroyed called when AV is released.Yuncheol Heo2019-11-101-1/+1
| | | | | Test: WmTests:TaskStackChangedListenerTest#testSingleTaskDisplayEmpty Change-Id: I1271edb08b65b3ca29f92b237d0a65defb7bb38a
* Extracts core logic of ActivityView into TaskEmbedderMark Renouf2019-11-071-379/+122
| | | | | | | | | | | | | | | | | TaskEmbedder is a new building block for task embedding which will be used by SystemUI to perform more complex operations than what can be acheived using ActivityView today. For task embedding use cases, integrating TaskEmbedder directly with a SurfaceView (or other surface) will allow: - management of multiple tasks within a single parent surface - access to the surfacecontrol of each task for manipulation/animation - (SurfaceView) configure whether zOrder above or below. See: go/av-refactor Change-Id: Ia813c52bc2da3a776e727b5bbd2b03b8ff09f302
* Remove embedded & document launch always restrictions from a bubbleMady Mellor2019-10-031-2/+4
| | | | | | | | | | | | | | * No longer need the embedded flag as of ag/9341444 * Instead of requiring the app to specify documentLaunchMode=always we'll apply the relevant intent flags to force that behaviour * Adds a new param to include a "fillInIntent" which can adjust the flags on the PendingIntent. Bug: 138325285 Test: manual with BubblesTest (removed the flags in the test app, things should still bubble) Test: atest NotificationManagerTest (needs CTS CL) Change-Id: I08de491fc89d8182f2b2a7df95c985d8be847aab
* Support frame-synchronized clipping on SurfaceViewMark Renouf2019-09-181-0/+42
| | | | | | Bug: 123306815 Test: See ag/9384030, manual test of bubbles expand collapse animation Change-Id: I5350501667fe729a0c668e8f6edaf30070a2e1ec
* Fix ActivityView surface can't visible for ActivityViewTestlumark2019-08-061-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CL [1] introduced ActivityView's surface view set alpha as zero by default. but SurfaceView ignores alpha value by default. So to archieve SurfaceView can support alpha value and then introduced CL[2]. with that CL, it will affect ActivityView that can't see the surface because of this zero alpha value. Since CLs[1] & [2] are mainly considered for BubbleController to implement content visiblity with setting surface view's alpha value without flickering, and in BubbleExpandedView#onFinishInflate has already called setContentVisibility(false) to set ActivityView's alpha value as zero before add this view. So removing ActivityView's default zero alpha value would be fine, since it may not always the case that need to set zero alpha but need to show the black rectangle surface for user. (i.e. ActivityViewTest or Android Auto) Also, refined ActivityView#setAlpha for some stuff to make it clear. [1]: Ie5aed373996419b059935889b564ca91c2e3cf23 [2]: I86847de59109b2adf12a2c7c50c988c2cbcf0450 Bug: 137937105 Test: manual as below steps 1) make & install ActivityViewTest 2) launch "AV Main" shortcut 3) press "Test ActivityView" -> "Launch test activity" 4) see if launched Acitvity is visible as expected. Test: atest ActivityViewTest, observe if ActivityView is visible during testing. Change-Id: Iaf480912f06a6851001a42bf90e4d962c8a88a37
* Fix ActivityViewTest#testInputMethod failed in freeform modelumark2019-07-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since IMM#reportActivityView() expects a matrix that transform coordinates that maps (0, 0) in the ActivityView to the actual screen coordinates in the host process. So transform coordinates with getLocationInWindow which presents the location that inside of ActivityView will be wrong when in freeform mode. We should use getLocationOnScreen to fix this. Fix: 137566626 Test: atest ActivityViewTest#testInputMethod in freeform / desktop mode Test: manual as below steps: 0) Make sure device connected HW keyboard & set Gboard launguages as Japanese input. 1) Make and install ActivityViewTest. 2) Launch any app and enter split screen mode. 3) Launch "AV Main" with shortcut in split screen bottom stack. 4) Press "Test Scroll ActiviyView" - > "launch" 5) Scroll down ActivityView & tap EditText and then type words with HW keyboard. 6) Check if candidate view shown on the right place that aligned with EditText. Change-Id: Ia40b9aa94028592fd16e45c7226ec6e3cf07c9b1
* Support alpha value in SurfaceView.Issei Suzuki2019-07-041-0/+1
| | | | | | | | | | | | | For backward compatibility, SurfaceView ignores alpha value by default. In order to reflect alpha value set on the SurfaceView to its underlying surface, setUseAlpha() needs to be called. Translucent alpha only works when the surface is placed z-above. Otherwise only fully opaque and transparent status are supported. Bug: 130442248 Test: Manual, use BubblesTest app and checks if alpha is set. Change-Id: I86847de59109b2adf12a2c7c50c988c2cbcf0450
* Synchronize bubble activity rendering status and its visibility change.Issei Suzuki2019-05-211-0/+11
| | | | | | | | | | | - Add an API ITaskStackListener.onSingleTaskDisplayDrawn() to notifity contents are drawn for the first time on a display which can only contain one task. - BubbleController updates contents visibility (actually alpha value) of the Surface in a ActivityView. Bug: 130442248 Test: atest WmTests:TaskStackChangedListenerTest Change-Id: Ie5aed373996419b059935889b564ca91c2e3cf23
* Adds setCornerRadius to ActivityView & SurfaceViewMark Renouf2019-05-161-0/+11
| | | | | | | | | Applies corner radius to Bubbles when expanded, based on dialogCornerRadius theme attribute. Test: manual -- Enable Bubbles, add one and expand, observe corners Bug: 123545569 Change-Id: I88162a974534786b4ac8bed4e0fa1302bded9096
* Reenable CursorAnchorInfo API with ActivityViewYohei Yukawa2019-05-021-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With my previous CL [1], CursorAnchorInfo API was globally disabled for cross-display scenario including ActivityView scenario. This CL slightly relaxes the above condition so that IMEs can rely on CursorAnchorInfo APIs again to interact with apps running inside ActivityView. The basic idea here is keeping reporting relevant information from ActivityView to InputMethodManagerService (IMMS) so that IMMS can take the display hierarchy because of ActivityView into account. As long as IMMS has the up-to-date hierarchical information, IMMS can tell InputMethodManager (IMM) running in the IME client process about the missing coordinate transformation information from the virtual display space to the outer display space where the IME is actually shown. Note that there was a similar fix for AccessibilityService that keeps reporting ActivityView location to WindowManagerService (WMS) [2]. Ideally we should be able to share the logic, but to do so we need to introduce a generalized callback mechanism into WMS so that IMMS can be notified when a cetain coordinate transform matrix has changed. For Q, this CL implements IMMS's own mechanism to keep track of ActivityView hierarchy instead of introducing a direct dependency from WMS to IMMS. For R+, most likely we may want to reconsider how ActivityView should be implemented. There should be no behavior change in this CL if ActivityView is not involved. [1]: Ie2f7a5117cff3a13ad5c5806fd4b3abef7569549 3d2cc0fffd13f46923d0fcfdd73d375ebbe955ce [2]: I38da5b84a11890bf0f4a57eb9d5b7e71bdcc16a9 d8ec93860957c95d00b1c1fa18ba2f302d06720e Fix: 115693908 Test: atest CtsWindowManagerDeviceTestCases:ActivityViewTest#testInputMethod Change-Id: Id0411a80456182111bb5b681c6d1230b58e7ec2e
* Refine getTransformationMatrix for windows in a re-parented displayTiger Huang2019-05-021-24/+38
| | | | | | | | | | | | Currently, the translation of the transformation matrix computed by WindowState.getTransformationMatrix is related to its own display. However, if the display has been re-parented, the translation might be misplaced to the visual result. This CL makes it return the global transformation matrix. Bug: 129098348 Test: atest WindowStateTests Change-Id: I38da5b84a11890bf0f4a57eb9d5b7e71bdcc16a9
* Make lifecycle events for bubble activity views report normallyMady Mellor2019-04-241-0/+28
| | | | | | | | | | | | | | | | | | | | There are some extra onPause / onResume events in ActivityView due to SysUI calling startActivity in onActivityViewReady which happens a bit before the display being turned on. This CL posts the startActivity call which is enough to avoid the extra lifecycle events. This CL also adds new method on ActivityView to startActivity with your own ActivityOptions (because posting causes activity transition to occur...) Test: manual - have Bubbles test APK - create a new bubble - adb logcat | grep "BubbleActivity" - observe the logging to make sure lifecycle events behave normally Bug: 130363466 Change-Id: Ia44d6033e5cff625222006632b7bdc4dc1e59e81
* Fix back presses dismissing bubbles when IME is upMady Mellor2019-04-161-0/+11
| | | | | | | | | | | | | | | | | | | | If bubbles is expanded & shade is not use the virtual display id of the expanded activity view (if it's valid, otherwise do whats normal). Test: manual 1) have expanded bubble with IME up 2) hit back button => note that the IME goes away but the bubble remains 1) have expanded bubble up 2) pull down shade 3) hit back button => shade goes away Do above with gesture nav turned on & do back gesture Test: atest KeyButtonViewTest Fixes: 122535136 Change-Id: Iabaace66cfb4d3d80b1a3a3c7b0773deb48fbcaa
* Reduce the window tap exclude region for child above itTiger Huang2019-03-281-10/+39
| | | | | | | | | | | | | | | For letting touches directly go to the embedded display, we've opened a tap exclude region for the ActivityView. However, if there is a view on top of the region, the view cannot be touched within the region. In this CL, we reduce the tap exclude region if there is a can-receive- pointer-event view on top of the region. Bug: 128517544 Test: atest CtsActivityManagerDeviceTestCases:ActivityViewTest Test: atest FrameworksCoreTests:ViewGroupTest Test: Menual test with ActivityViewTest and Bubbles Change-Id: I68e2a9fe9d0891801b533ab8d25074f64bef5a79
* Added some TestApi that are already used by CTSWale Ogunwale2019-02-211-7/+4
| | | | | | | | Allows us to remove the use of private platform API from CTS. Bug: 124134247 Test: builds Change-Id: Iceb81ff7c9385e877d2612fbb7b506245d116928
* Merge "Make WindowContainer surfaces container layers by default."Chavi Weingarten2019-02-211-1/+1
|\
| * Make WindowContainer surfaces container layers by default.Chavi Weingarten2019-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit f6ef18334b4b90f025fa0ece969c2ce2f92221b1. Reason for revert: ag/6227549 fixes underlying issue Change-Id: Id1456529ef0009f8e28575ef591d9559c43db4a5 Fixes: 122561221 Test: go/wm-smoke
* | Merge "Adds TaskInfo to some TaskChangeListener methods"Mark Renouf2019-02-211-17/+17
|\ \ | |/ |/|
| * Adds TaskInfo to some TaskChangeListener methodsMark Renouf2019-02-201-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | This change dispatches TaskInfo directly for some methods which currently only pass taskId. This eliminates the need for second binder call to search for the TaskInfo. See also: ag/6306456 Bug: 124058588 Bug: 123631242 Test: atest WmTests:TaskStackChangedListenerTest Change-Id: I2e4c458f2a1ae684ef8d9f6a4ab2fbcfe13570b5
* | Forward StatusBar.onBackPressed to Bubbles when expandedMark Renouf2019-02-181-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | StatusBarWindowView is the root of the StatusBar window and handles all key events at dispatchKeyEvent All keys dispatched to the StatusBar window flow through StatusBarWindowView#dispatchKeyEvent. A BACK key event is forwarded to StatusBar.onBackPressed() If StatusBar#canPanelBeCollapsed() is false, the action is passed to BubbleController which forwards to the expanded bubble by calling to ActivityView#performBackPress(). Bug: 123631742 Test: manual, go/bubbles-app Change-Id: I0ccafc02f876c973ebc267055162621109b2dcc0
* | ActivityView: avoid crash in release() when detached from windowMark Renouf2019-02-141-0/+6
|/ | | | | | | | Adds an isAttachedToWindow() check to updateLocation() and cleanTapExcludeRegion() which both require a reference to a Window. Bug: 112574121 Change-Id: I71f184d74eb88d79effaeb3340ce5362155ed0fb
* Set insets on the virtual display to avoid IME covering the bubble.Issei Suzuki2019-02-081-0/+23
| | | | | | Bug: 123544535 Test: Manual test using the test app, and atest DisplayPolicyLayoutTests Change-Id: If2fceea97f4d702d000d887883c7f131337e9fd0
* Revert "Make WindowContainer surfaces container layers by default."Jorim Jaggi2019-01-311-1/+1
| | | | | | | | | | | | This reverts commit 139c77763bbba26d30993589a43aa987a0ba4ef0. Reason: Device gets put into GL comp pretty much all the time, trashing performance and battery. Bug: 123686354 Bug: 122561221 Change-Id: Icf658f331c407d03e844557cc2531c034aa38083 Exempt-From-Owner-Approval: Simple revert
* Merge "Let the activity embedded in ActivityView can be directly touched"Tiger Huang2019-01-301-47/+6
|\
| * Let the activity embedded in ActivityView can be directly touchedTiger Huang2019-01-301-47/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to eliminate the latency caused by forwarding the event. In this CL, we put an input portal window behind an ActivityView, and subtract the touchable region of the the ActivityView, so that the user can touch through the portal window, and let the touch arrive on the embedded activity. Bug: 120675821 Test: Manual test with ActivityViewTest Test: atest CtsActivityManagerDeviceTestCases:ActivityViewTest Change-Id: I6776387b65cf6a7d2ea60cb00ffdd38be22081ac
* | Make WindowContainer surfaces container layers by default.chaviw2019-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | WindowContainers surfaces will never have a buffer so change them to be container layers to avoid confusion on the buffer count in SurfaceFlinger. Also restrict SurfaceControl Builder to set a single surface type to avoid confusion. Test: go/wm-smoke Bug: 122561221 Change-Id: I26b5810675ef3a3cc1a33533b6afcb0d0489d5ba
* | Adds callbacks for task creation and removalMark Renouf2019-01-241-8/+55
|/ | | | | | Test: ? Bug: 112574121 Change-Id: Ifb6b82e3656b82f103e529089ae43f79b810aca3
* SurfaceControl: Accept instance rather than handle for reparentRobert Carr2019-01-221-2/+2
| | | | | | | | In preparation for public API. Bug: 111297488 Test: Builds. Change-Id: I80da54d92989ec0afe9fcdde324847f0de0c5083
* Merge "Added turn on/off virtual display"Chavi Weingarten2019-01-151-23/+14
|\
| * Added turn on/off virtual displaychaviw2018-12-261-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | VirtualDisplays are considered on if they have a surface and off if they don't. This causes problems for displays that don't have a surface. Instead, create a separate API to allow the client to request the surface be on or off. To ensure backwards compatibility for VirtualDisplays, set the display to on or off when the surface is added or removed. Change-Id: If9d8db94a66d6484ac492a53c1cd8fb7da851b88 Fixes: 119209373 Test: Created surfaceless virtual display that can be manually turned on or off
* | Merge changes from topic "remove-scoped-connection"Rob Carr2019-01-071-1/+2
|\ \ | | | | | | | | | | | | | | | * changes: Remove usage of scoped connections. Allow SurfaceControl to be passed over AIDL.
| * | Remove usage of scoped connections.Robert Carr2019-01-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tracking SurfaceFlinger changes. Now to construct a child surface we need the SurfaceControl as opposed to just the surface, and so we parcel the SurfaceControl across relayout. Test: Manual Bug: 62536731 Bug: 111373437 Bug: 111297488 Change-Id: I0a034767e92becec63071d7b1e3e71b95d505b77
* | | Merge "Forward setVisibility call to SurfaceView for ActivityView."Chavi Weingarten2019-01-071-0/+7
|\ \ \ | |/ / |/| |