summaryrefslogtreecommitdiff
path: root/core/java/android/app/IActivityManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Move IActivityManager to aidl.Sudheer Shanka2016-11-041-1105/+0
| | | | | | Bug: 30977067 Test: Existing tests are passing, dump commands still working. Change-Id: I9cf81c4d381ebce14a6c701e409cbb269f2ff1fb
* Add shell command to move activity stacks between displaysAndrii Kulian2016-11-031-0/+2
| | | | | | | | Also rename "stack movetask" command to be consistent with other shell commands. Test: New CTS tests coming soon. Change-Id: I3d7e04e0ae8ea76c27c3e4c1e286d5cd4539870c
* The big keyguard transition refactor (1/n)Jorim Jaggi2016-11-011-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The heart of this change are two things: 1) Instead of using the force hide mechanism to hide windows behind Keyguard, we actually make the activities invisible in activity manager. 2) When Keyguard is going away, we change the visibilities in activity manager and run an app transition. At the very core we move the responsibility of hiding activities to ActivityStack, which checks whether Keyguard is showing, and then hides all non-show-when-locked activities. For that, we need to check whether any window of an activity has SHOW_WHEN_LOCKED set. We introduce a callback from WM -> AM in case these Keyguard flags have changed. Furthermore, we decide whether to occlude Keyguard in KeyguardController, which just checks whether the top activity has SHOW_WHEN_LOCKED set. When this state changes, we prepare an occlude/unocclude app transition, and in PWM we just inform the Keyguard about the animation so SysUI can play along this animations in a mostly synchronized manner. Since we now use an app transition when unlocking the phone, we get lockscreen launch animations for free - window manager automatically waits until the activity is drawn, or directly executes the transition if there is nothing to animate. Thus, we can remove all the infrastructure around "waitingForActivityDrawn". The logic to show/hide non-app windows is moved to policy, and we add the ability to run animations on non-app windows when executing an app transition. Test: 1) runtest frameworks-services -c com.android.server.wm.AppTransitionTests 2) Manually test unlocking Keyguard: 2a) Without security 2b) With security 2c) With security but trusted 2d) Portrait while activity behind is in landscape 3) Test launching things from Keyguard 3a) Without security 3b) With security 3c) Launch camera without security 3d) Launch camera with security 3e) Launch camera with securtiy and trusted 3f) Launch voice affordance 4) Set no notifications on lockscreen, drag down, make sure you get the correct animation 5) Test clicking "emergency" on bouncer 5b) Test "Emergency info" on emergency dialer 5c) Test clicking edit button on emergency info, should show pattern on Keyguard Bug: 32057734 Change-Id: Icada03cca74d6a612c1f988845f4d4f601087558
* Creating PinnedStackController.Winson Chung2016-10-311-14/+2
| | | | | | | | | | | | - Creating a PinnedStackController to keep track of the state of the PIP to prevent changes in the system (ie. IME showing) and user interaction from clobbering each other. - Refactoring calls in AM into WM/controller Test: android.server.cts.ActivityManagerPinnedStackTests Change-Id: Ie59dfd45d5c54764ba69a589b3b8148845e92cc3 Signed-off-by: Winson Chung <winsonc@google.com>
* Add new methods to ITaskStackListenerYorke Lee2016-10-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor task change notification logic into a separate class TaskChangeNotificationController. Add ActivityManagerService.unregisterTaskStackChangedListener Add a no-op implementation that clients can subclass to avoid having to reimplement all new methods when they are added. Add new methods: onTaskAdded onTaskRemoved onTaskMovedToFront onTaskDescriptionChanged onActivityRequestedOrientationChanged onTaskFinishing Design doc: https://docs.google.com/document/d/1IgWZ44rKe9k1CzkjP2Mohv12OgRD1FxH8oLAyzhvCY4/edit#heading=h.yhzl6os0dbo5 Cherry-picked from I8302d6d3baf1ac1ca928765fe203091b9fab4070 Bug: 32277482 Test: Verify that callbacks are called in dummy implementations Change-Id: I2ac2b870147ef049f3ee05fc5916c99332334526
* Merge "Refactor stack removal methods"Andrii Kulian2016-10-271-2/+0
|\
| * Refactor stack removal methodsAndrii Kulian2016-10-261-2/+0
| | | | | | | | | | | | | | | | Refactor some parts of stack removal to make methods implementations correspond to their names. Change-Id: Ie686c463d67232d9d5fd96468fe3911003d22471 Test: Manual and existing tests still pass.
* | Fix wrong bounds being used in landscape.Winson Chung2016-10-261-2/+2
|/ | | | | | | | | | | - Ensure we use the right display size when calculating PIP bounds. - Also update interface to take the display id. Test: android.server.cts.ActivityManagerPinnedStackTests Test: #testPinnedStackDefaultBounds Test: #testPinnedStackMovementBounds Change-Id: I01fd8ba6dee212c29a9a092673ee8f7843e41af6
* Apply display override config for secondary displaysAndrii Kulian2016-10-251-1/+14
| | | | | | | | | | Now display-specific settings, such as dimensions and orientation, are stored in display override config. For default display it is mirroring the global config. Each time when global config is updated, override of the default display should be updated too and vice versa. Test: Existing and manual tests still pass. Change-Id: Ic6c2190092d328820f314a05bed43c875db18170
* Changing initial PIP bounds specifications.Winson2016-10-201-0/+12
| | | | | | | | | | - Change from a absolute bounds to a size, gravity and inset to allow easier tweaking of initial pinned stack bounds. Test: android.server.cts.ActivityManagerPinnedStackTests Test: #testPinnedStackDefaultBounds Test: #testPinnedStackMovementBounds Change-Id: I82a102bbd2d83259c6c84915071d1a16728e3aa7
* Fixed issue with screen rotation not working for landscape<->seascapeWale Ogunwale2016-10-051-1/+2
| | | | | | | | | | | | | | | | | | Problem as introduced in the refactor to change how configuration works in activity manager in ag/1460784. With the new change we don't call back into window manager to set new configuration if there are no changes. The new change is correct, however window manager was relying on this to unfreeze the display since the rotation changed. We now have activity manager return if it updated the configuration to window manager when the rotation changes do window manager can decide if it needs to perform additional actions like unfreezing the display. Bug: 31916697 Test: CTS and Manual testing. CTS: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases --test android.server.cts.ActivityManagerDockedStackTests Manual: Launch an app that suports all orientations and rotate it from landscape to seascape. Change-Id: I36ddeff1ccc9f6089227147b117a865571b8571e
* Configuration renaming and minor cleanup in AM and WMAndrii Kulian2016-09-161-0/+12
| | | | | | | | | | - Configuration members in AM and WM are renamed to mGlobalConfiguration. - Renamed parameters names in some methods to better represent their meaning. - Added and fixed some docs. Change-Id: Ie51f687fe4c10dbce776435f29d6b853fda50eec
* resolve merge conflicts of 4daa1b7 to masterRubin Xu2016-09-151-0/+13
|\ | | | | | | Change-Id: I5292c074234fccc26c7a843f56eb68edce26d678
| * Allow direct-boot aware activity to show before profile is unlockedRubin Xu2016-09-141-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work profile challenge is shown by intercepting normal activity launching and replacing it with the confirm credential activity. For direct boot aware activities, they should be able to be displayed when the work profile is still locked, so add a conditional in the activity intercepting logic to bypass work challenge in this case. Also launching work profile activities from notification is handled specially in order to avoid dismissing the notification if the work challenge is canceled, so add similar logic there to allow direct boot aware activity to go through. Bug: 30296144 Change-Id: Ib6395271cee2d4781009bb08d50351d73824de0c
* | Put activity into stopped state if recreated while stoppedChong Zhang2016-08-091-1/+4
|/ | | | | | | | | Move handling of recreate from client side to AMS, so that relaunch happens at the right condition and activity goes to right state after it's relaunched. bug: 30060825 Change-Id: Ia475c26927b305eb25ae12be8640aab1fb7677a0
* Follow up for I420bee8a11d430b1e52ded050536e56a85a48800Jorim Jaggi2016-07-271-1/+3
| | | | | | | | | - Log when hasTopUi state changes - Add hasTopUi to dumpstate - Only allow persistent processes to honor this flag Bug: 30292998 Change-Id: Ifb481c8d50b102ea4cac3078ea3eb39e45c08259
* Move SysUI to top app scheduling if panel expandedJorim Jaggi2016-07-231-0/+9
| | | | | | | | Also fixes a bug which didn't set the correct renderThreadTid when restarting an app (for example, when SystemUI gets killed). Bug: 30292998 Change-Id: I420bee8a11d430b1e52ded050536e56a85a48800
* Add new mode for SCHED_FIFO on UI and RenderThreads.Tim Murray2016-07-071-0/+4
| | | | | | | | | | | Add a new mode, controlled by sys.use_fifo_ui property, that enables the top app's UI and RenderThread to be SCHED_FIFO. This eliminates almost all jank due to scheduling competition with non-UI critical threads. This mode may not be suitable for all devices. bug 24503801 Change-Id: I7b8a31830ad80f7efa00236928d5476998ed4e00
* Merge "Add a new API to improve VR thread scheduling." into nyc-mr1-devTim Murray2016-06-301-0/+3
|\
| * Add a new API to improve VR thread scheduling.Srinath Sridharan2016-06-301-0/+3
| | | | | | | | | | | | | | | | Adds a new API that enables device-specific scheduler optimizations for latency-sensitive VR threads. BUG: 29163534 Change-Id: I58d7be0eb266eca452c804cd07004784fb7daf2b
* | Move getRecentTasks() to ParceledListSlice.Jeff Sharkey2016-06-291-1/+1
|\ \ | |/ |/| | | | | | | am: 479212cf50 Change-Id: Ic76f624396117d922aac60eac9c2caae4f1d7e27
| * Move getRecentTasks() to ParceledListSlice.Jeff Sharkey2016-06-291-1/+1
| | | | | | | | | | | | | | | | | | In extreme cases the list of recent tasks can grow beyond the size of a single Binder transaction. This change moves over to ParceledListSlice which handles chunking any large results. Bug: 29635557 Change-Id: Iaf1227234f5f8c9451f73a6a5c1dc89f2067f05f
* | Merge "Print names of observers causing timeout" into nyc-mr1-devFyodor Kupolov2016-06-231-1/+2
|\ \ | |/ |/|
| * Print names of observers causing timeoutFyodor Kupolov2016-06-231-1/+2
| | | | | | | | | | | | | | | | Pass and store name in registerUserSwitchObserver and later print names of observers causing timeout. Bug: 29039588 Change-Id: I09c4bcc986168a07f5e20ad0f38667b783332288
* | When uninstalling, only kill the requested user.Jeff Sharkey2016-06-231-2/+2
|/ | | | | | | | When an app is being uninstalled for a specific user, only kill the app under that user; leave the app running under other users. Bug: 28875343 Change-Id: Ie60753cfd22df10a2b17d8c3732b6f19d2fe1fb9
* resolve merge conflicts of cffb19c to mnc-dev am: 3f9ea2d386 am: d6c1126fab ↵Christopher Tate2016-06-171-1/+1
|\ | | | | | | | | | | | | | | am: e2c9b1af3e am: d2a4e1b39c Change-Id: I8e59a88278ba50ab7e3768031611065131ed6834
| * resolve merge conflicts of cffb19c to mnc-devChristopher Tate2016-06-161-1/+1
| |\ | | | | | | | | | Change-Id: I4dba574de2678d851e3d82961a07de27d61f5940
| | * Don\\\'t trust callers to supply app info to bindBackupAgent() am: ↵Christopher Tate2016-06-161-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | c58054f25f am: cd777e95a7 am: ec6c3f7a32 Change-Id: Idc2b6c712078493b4186edad750d8d5beab58adf
| | | * Don\'t trust callers to supply app info to bindBackupAgent()Christopher Tate2016-06-161-1/+1
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | am: c58054f25f Change-Id: I3b0bd91c38b5f13770f09f39c2eea78b63c29d7c
| | | | * Don't trust callers to supply app info to bindBackupAgent()Christopher Tate2016-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get the canonical identity and metadata about the package from the Package Manager at time of usage rather than rely on the caller to have gotten things right, even when the caller has the system uid. Bug 28795098 Change-Id: I215786bc894dedf7ca28e9c80cefabd0e40ca877
| | | | * Do not make ActivityContainer available to apps. DO NOT MERGECraig Mautner2015-02-191-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A security leak was discovered whereby a malicious app could get the IActivityContainer object from one app and use it to inject events into another app. This fix removes the availability of the IActivityContainer and replaces its one use with a method for returning the information the IActivityContainer was used for. Fixes bug 19394591. Change-Id: Ib3cec25b25130cd8e098892c057742cfd575cfdd
| | * | | am 28de8edb: am ab8f60e4: am a94e4297: Merge "Do not make ActivityContainer ↵Craig Mautner2015-02-171-3/+2
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | available to apps. DO NOT MERGE" into lmp-mr1-dev * commit '28de8edb7d72f938f47d7fdd8ce058c5c8933b8e': Do not make ActivityContainer available to apps. DO NOT MERGE
| | | * | Do not make ActivityContainer available to apps. DO NOT MERGECraig Mautner2015-02-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A security leak was discovered whereby a malicious app could get the IActivityContainer object from one app and use it to inject events into another app. This fix removes the availability of the IActivityContainer and replaces its one use with a method for returning the information the IActivityContainer was used for. Fixes bug 19394591. Change-Id: Ib3cec25b25130cd8e098892c057742cfd575cfdd
* | | | | Fix issue #27532364: Security Vulnerability in IIntentSender.sendDianne Hackborn2016-05-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to make IIntentSender oneway... but when the system is calling that for itself, it needs to be able to return a result code. Solution: instead of directly calling the interface, we have a new IPC through the activity manager. If the thing being used is the activity manager impl, it can do the synchronous send and return the result directly in place. If not, you only get asynchronous sending and thus never a failure result back (too bad for you!). Change-Id: I4096e5b00063e8dba66230585a2dfe67e35e8092
* | | | | Fix multi-window assiststructure trashingAmith Yamasani2016-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When multiple activities within the same process try to handle requests for AssistStructure, the singleton mLastAssistStructure tends to trash the old structure when a second window's request comes in. This change passes in a sessionId so that the cache is only cleared if the session id changes. Bug: 28348867 Change-Id: I07efcd933db7e48aefd25a1c95493b71bbcffe4b
* | | | | Merge "Move the 'pretend idle jobs can run now' broadcast into AMS" into nyc-devChris Tate2016-05-061-0/+3
|\ \ \ \ \
| * | | | | Move the 'pretend idle jobs can run now' broadcast into AMSChristopher Tate2016-05-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a protected broadcast, so sending it directly from 'am' is no longer an option. This is needed for CTS as well as being generally useful during app development. Bug 28406044 Change-Id: I101915a8c6f19454330a8db2079a75023c112582
* | | | | | Dismiss docked stack if an activity is shown on top of the lock screenWale Ogunwale2016-05-061-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is risky/complicated to try to put the activity showing on-top of the lock screen in the right fullscreen configuration with the current architecture. So, we just dismiss for now. Bug: 28195260 Change-Id: I29a0350993ce8fe548d4a465b06d877cde151c78
* | | | | Don’t relaunch activity in fullscreen stack when entering split screen modeWale Ogunwale2016-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When entering split-screen mode by long pressing the recents button, the top task in the fullscreen stack is moved to the docked stack and the new top task is the fullscreen stack is considered visible for a short amount of time until sys-ui launches the recents activity. This causes the new top activity in the fullscreen stack to be relaunched due to configuration change. To fix this sys-ui now sends an hint to activity manager to move the home stack forward so that it can be on-top of the fullscreen stack and makes it invisible before recent is launched and animated in. Bug: 28470261 Change-Id: Icfd85e932fe913dfb498752b5878cc7c690fd559
* | | | | Fix wrong app is launched after solving challenge from tapping notificationTony Mak2016-04-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PendingIntent.FLAG_ONE_SHOT is needed to prevent the PendingIntent being reused. Also, flag and activity option of credential intent in BaseStatusBar is not same as the one in ActivityStarter. Added a new function startConfirmDeviceCredentialIntent in AM to centralize it. Change-Id: I2d9e5923ad5d4d012f10057c409c666c8ca299a3 Fix: 28309964
* | | | | Work on issue #28221912: Starting service as foreground might...Dianne Hackborn2016-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...kill previous notification. Add new platform API to detach a notification from a service without dismissing it. Also, while I am here, add some more @IntDefs. Change-Id: I3bb46d9cd3db7f73716c8ced19c20fea800eb30d
* | | | | Merge "Remember task which is being locked" into nyc-devAndrii Kulian2016-04-151-4/+4
|\ \ \ \ \
| * | | | | Remember task which is being lockedAndrii Kulian2016-04-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to remember task which requested to be locked because we can accidentally lock another task after user interacts with pinning request dialog. Bug: 27876860 Change-Id: Ie8e607df4380dd33ea9b3474afc247b02e31de07
* | | | | | Multi-window assist callbackAmith Yamasani2016-04-131-1/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introducing a new callback in VoiceInteractionSession to provide assist data for additional activities in the foreground in a multiwindow setup. PIP, docked windows and free-form windows (top-most) will be queried for assist data and passed through the new API to the Voice Interaction service. Bug: 27718385 Change-Id: Ib4427c304611b75c2078dcb54f1f7e47ae7d9cfa
* | | | | Refactor usages of Picture In Picture and Multi Window (1/4)Andrii Kulian2016-03-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 27365860 Change-Id: I1590e430a12ceb84cb83da295e0bf7e4378fea96
* | | | | Update PRE_BOOT_COMPLETED for FBE.Jeff Sharkey2016-03-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that CE data isn't available until after a user is unlocked, we need to delay the PRE_BOOT_COMPLETED broadcasts. This is done by adding a new RUNNING_UNLOCKING user state to the UserController lifecycle. We now track the last fingerprint a user was logged in under, and we dispatch PRE_BOOT receivers when that fingerprint changes. To work around battery pull issues, we only persist the updated fingerprint once all PRE_BOOT receivers have finished. This is less granular than the original solution, but it's still correct. We only consider a user as "logged in" once it transitions into the RUNNING_UNLOCKED state. When starting a process, track if the user was "unlocked" when started, so that we only spin up unaware providers in processes started before user unlock. Add generic IProgressListener to communicate PRE_BOOT progress and strings up to lock screen. For now, LockSettingsService just blocks until finished, but it could display these strings in the future. Bug: 27220885 Change-Id: I349439776b885acd32f6a578d8951ffd95640be2
* | | | | Merge "Added support to specify animation duration when resizing stack" into ↵Wale Ogunwale2016-03-211-1/+16
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | nyc-dev
| * | | | | Added support to specify animation duration when resizing stackWale Ogunwale2016-03-211-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed for sys-ui to control the duration of various Pip transitions. Bug: 27674339 Change-Id: I7bad27aaa19755a73c594e88b88b56db033e1a45
* | | | | | Show launcher when profile is locked immediatelyTony Mak2016-03-211-0/+4
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we show launcher when keyguard is dismissed. It introduces these issues: 1. There can be no device lock 2. user could take a quick peek of the work app Current behavior: 1. We now show launcher once the work profile is locked. 2. Lock profile immediately if there is no device lock 3. Add cancel "lockProfileLater" logic Bug: 27241680 Bug: 27673460 Change-Id: I765aa22d4c8ae5017c1611f5a340a4b33d463b1e
* | | | | Don't show wallpaper when backdrop is visibleAdrian Roos2016-03-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hides the wallpaper when it's not needed and fixes the unlock animation to not unnecessairly show the wallpaper if neither the Keyguard nor the underlying app need it. Also fixes a bug where the enter animation had a background set, which led to uglyness when no wallpaper is involved. Bug: 27533740 Change-Id: I667c6f7ca6c0e1ff7e9f793c6ddc13f6da8387b1