Loading
Set options on startingActivity instead of topActivity
When an activity is starting, it may not be the top activity yet. If that occurs, the options are set on the wrong activity when moveTaskToFrontLocked is called. Therefore, when the options on the correct activity are consumed and cleared, the options are still set on the incorrect activity. This can lead to incorrect behavior. Specifically, this was causing issues when a RemoteAnimation was set for a starting activity. The activity that was previously on top was also getting the options and expecting a RemoteAnimation. This caused no animation to execute when the next expected animation was a WindowAnimation because it was still waiting on the RemoteAnimation Fixes: 74611027 Test: Launch activity then background. Open second activity from notification. When pressing back, window animation should start. Change-Id: I2198d8e2a0b14fb060c71a265cc98f24ce018ef9