Loading services/core/java/com/android/server/wm/ActivityRecord.java +15 −2 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_FOCUS; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_SAVED_STATE; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_STATES; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_SWITCH; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_TRANSITION; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_VISIBILITY; import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_CONFIGURATION; import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_FOCUS; Loading Loading @@ -1631,6 +1632,7 @@ final class ActivityRecord extends ConfigurationContainer { void updateOptionsLocked(ActivityOptions options) { if (options != null) { if (DEBUG_TRANSITION) Slog.i(TAG, "Update options for " + this); if (pendingOptions != null) { pendingOptions.abort(); } Loading @@ -1641,6 +1643,7 @@ final class ActivityRecord extends ConfigurationContainer { void applyOptionsLocked() { if (pendingOptions != null && pendingOptions.getAnimationType() != ANIM_SCENE_TRANSITION) { if (DEBUG_TRANSITION) Slog.i(TAG, "Applying options for " + this); applyOptionsLocked(pendingOptions, intent); if (task == null) { clearOptionsLocked(false /* withAbort */); Loading Loading @@ -1762,9 +1765,19 @@ final class ActivityRecord extends ConfigurationContainer { pendingOptions = null; } ActivityOptions takeOptionsLocked() { ActivityOptions takeOptionsLocked(boolean fromClient) { if (DEBUG_TRANSITION) Slog.i(TAG, "Taking options for " + this + " callers=" + Debug.getCallers(6)); ActivityOptions opts = pendingOptions; // If we are trying to take activity options from the client, do not null it out if it's a // remote animation as the client doesn't need it ever. This is a workaround when client is // faster to take the options than we are to resume the next activity. // TODO (b/132432864): Fix the root cause of these transition preparing/applying options // timing somehow if (!fromClient || opts == null || opts.getRemoteAnimationAdapter() == null) { pendingOptions = null; } return opts; } Loading services/core/java/com/android/server/wm/ActivityStack.java +2 −2 Original line number Diff line number Diff line Loading @@ -3379,7 +3379,7 @@ class ActivityStack extends ConfigurationContainer { canMoveOptions = false; if (noOptions && topOptions == null) { topOptions = p.takeOptionsLocked(); topOptions = p.takeOptionsLocked(false /* fromClient */); if (topOptions != null) { noOptions = false; } Loading Loading @@ -3418,7 +3418,7 @@ class ActivityStack extends ConfigurationContainer { } canMoveOptions = false; if (noOptions && topOptions == null) { topOptions = p.takeOptionsLocked(); topOptions = p.takeOptionsLocked(false /* fromClient */); if (topOptions != null) { noOptions = false; } Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -2934,7 +2934,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { synchronized (mGlobalLock) { final ActivityRecord r = ActivityRecord.isInStackLocked(token); if (r != null) { final ActivityOptions activityOptions = r.takeOptionsLocked(); final ActivityOptions activityOptions = r.takeOptionsLocked( true /* fromClient */); return activityOptions == null ? null : activityOptions.toBundle(); } return null; Loading services/core/java/com/android/server/wm/AppTransition.java +2 −0 Original line number Diff line number Diff line Loading @@ -1909,6 +1909,8 @@ public class AppTransition implements Dump { } void overridePendingAppTransitionRemote(RemoteAnimationAdapter remoteAnimationAdapter) { if (DEBUG_APP_TRANSITIONS) Slog.i(TAG, "Override pending remote transitionSet=" + isTransitionSet() + " adapter=" + remoteAnimationAdapter); if (isTransitionSet()) { clear(); mNextAppTransitionType = NEXT_TRANSIT_TYPE_REMOTE; Loading services/core/java/com/android/server/wm/TaskRecord.java +1 −1 Original line number Diff line number Diff line Loading @@ -1493,7 +1493,7 @@ class TaskRecord extends ConfigurationContainer { if (r.finishing) { continue; } ActivityOptions opts = r.takeOptionsLocked(); ActivityOptions opts = r.takeOptionsLocked(false /* fromClient */); if (opts != null) { ret.updateOptionsLocked(opts); } Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +15 −2 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_FOCUS; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_SAVED_STATE; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_STATES; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_SWITCH; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_TRANSITION; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_VISIBILITY; import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_CONFIGURATION; import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_FOCUS; Loading Loading @@ -1631,6 +1632,7 @@ final class ActivityRecord extends ConfigurationContainer { void updateOptionsLocked(ActivityOptions options) { if (options != null) { if (DEBUG_TRANSITION) Slog.i(TAG, "Update options for " + this); if (pendingOptions != null) { pendingOptions.abort(); } Loading @@ -1641,6 +1643,7 @@ final class ActivityRecord extends ConfigurationContainer { void applyOptionsLocked() { if (pendingOptions != null && pendingOptions.getAnimationType() != ANIM_SCENE_TRANSITION) { if (DEBUG_TRANSITION) Slog.i(TAG, "Applying options for " + this); applyOptionsLocked(pendingOptions, intent); if (task == null) { clearOptionsLocked(false /* withAbort */); Loading Loading @@ -1762,9 +1765,19 @@ final class ActivityRecord extends ConfigurationContainer { pendingOptions = null; } ActivityOptions takeOptionsLocked() { ActivityOptions takeOptionsLocked(boolean fromClient) { if (DEBUG_TRANSITION) Slog.i(TAG, "Taking options for " + this + " callers=" + Debug.getCallers(6)); ActivityOptions opts = pendingOptions; // If we are trying to take activity options from the client, do not null it out if it's a // remote animation as the client doesn't need it ever. This is a workaround when client is // faster to take the options than we are to resume the next activity. // TODO (b/132432864): Fix the root cause of these transition preparing/applying options // timing somehow if (!fromClient || opts == null || opts.getRemoteAnimationAdapter() == null) { pendingOptions = null; } return opts; } Loading
services/core/java/com/android/server/wm/ActivityStack.java +2 −2 Original line number Diff line number Diff line Loading @@ -3379,7 +3379,7 @@ class ActivityStack extends ConfigurationContainer { canMoveOptions = false; if (noOptions && topOptions == null) { topOptions = p.takeOptionsLocked(); topOptions = p.takeOptionsLocked(false /* fromClient */); if (topOptions != null) { noOptions = false; } Loading Loading @@ -3418,7 +3418,7 @@ class ActivityStack extends ConfigurationContainer { } canMoveOptions = false; if (noOptions && topOptions == null) { topOptions = p.takeOptionsLocked(); topOptions = p.takeOptionsLocked(false /* fromClient */); if (topOptions != null) { noOptions = false; } Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -2934,7 +2934,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { synchronized (mGlobalLock) { final ActivityRecord r = ActivityRecord.isInStackLocked(token); if (r != null) { final ActivityOptions activityOptions = r.takeOptionsLocked(); final ActivityOptions activityOptions = r.takeOptionsLocked( true /* fromClient */); return activityOptions == null ? null : activityOptions.toBundle(); } return null; Loading
services/core/java/com/android/server/wm/AppTransition.java +2 −0 Original line number Diff line number Diff line Loading @@ -1909,6 +1909,8 @@ public class AppTransition implements Dump { } void overridePendingAppTransitionRemote(RemoteAnimationAdapter remoteAnimationAdapter) { if (DEBUG_APP_TRANSITIONS) Slog.i(TAG, "Override pending remote transitionSet=" + isTransitionSet() + " adapter=" + remoteAnimationAdapter); if (isTransitionSet()) { clear(); mNextAppTransitionType = NEXT_TRANSIT_TYPE_REMOTE; Loading
services/core/java/com/android/server/wm/TaskRecord.java +1 −1 Original line number Diff line number Diff line Loading @@ -1493,7 +1493,7 @@ class TaskRecord extends ConfigurationContainer { if (r.finishing) { continue; } ActivityOptions opts = r.takeOptionsLocked(); ActivityOptions opts = r.takeOptionsLocked(false /* fromClient */); if (opts != null) { ret.updateOptionsLocked(opts); } Loading