Merge "Update InputSink on transition finish" into tm-qpr-dev
This commit is contained in:
@@ -927,7 +927,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
// SystemUi sets the pinned mode on activity after transition is done.
|
// SystemUi sets the pinned mode on activity after transition is done.
|
||||||
boolean mWaitForEnteringPinnedMode;
|
boolean mWaitForEnteringPinnedMode;
|
||||||
|
|
||||||
private final ActivityRecordInputSink mActivityRecordInputSink;
|
final ActivityRecordInputSink mActivityRecordInputSink;
|
||||||
|
|
||||||
// Activities with this uid are allowed to not create an input sink while being in the same
|
// Activities with this uid are allowed to not create an input sink while being in the same
|
||||||
// task and directly above this ActivityRecord. This field is updated whenever a new activity
|
// task and directly above this ActivityRecord. This field is updated whenever a new activity
|
||||||
@@ -7971,7 +7971,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean isInTransition() {
|
boolean isInTransition() {
|
||||||
return mTransitionController.inTransition() // Shell transitions.
|
return mTransitionController.inTransition(this) // Shell transitions.
|
||||||
|| isAnimating(PARENTS | TRANSITION); // Legacy transitions.
|
|| isAnimating(PARENTS | TRANSITION); // Legacy transitions.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ class ActivityRecordInputSink {
|
|||||||
// Don't block touches from passing through to an activity below us in the same task, if
|
// Don't block touches from passing through to an activity below us in the same task, if
|
||||||
// that activity is either from the same uid or if that activity has launched an activity
|
// that activity is either from the same uid or if that activity has launched an activity
|
||||||
// in our uid.
|
// in our uid.
|
||||||
final ActivityRecord activityBelowInTask =
|
final ActivityRecord activityBelowInTask = mActivityRecord.getTask() != null
|
||||||
mActivityRecord.getTask().getActivityBelow(mActivityRecord);
|
? mActivityRecord.getTask().getActivityBelow(mActivityRecord) : null;
|
||||||
final boolean allowPassthrough = activityBelowInTask != null && (
|
final boolean allowPassthrough = activityBelowInTask != null && (
|
||||||
activityBelowInTask.mAllowedTouchUid == mActivityRecord.getUid()
|
activityBelowInTask.mAllowedTouchUid == mActivityRecord.getUid()
|
||||||
|| activityBelowInTask.isUid(mActivityRecord.getUid()));
|
|| activityBelowInTask.isUid(mActivityRecord.getUid()));
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ import java.lang.annotation.Retention;
|
|||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -656,6 +655,19 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
|
|||||||
mController.dispatchLegacyAppTransitionFinished(ar);
|
mController.dispatchLegacyAppTransitionFinished(ar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the input-sink (touch-blocking) state now that the animation is finished.
|
||||||
|
SurfaceControl.Transaction inputSinkTransaction = null;
|
||||||
|
for (int i = 0; i < mParticipants.size(); ++i) {
|
||||||
|
final ActivityRecord ar = mParticipants.valueAt(i).asActivityRecord();
|
||||||
|
if (ar == null || !ar.isVisible()) continue;
|
||||||
|
if (inputSinkTransaction == null) {
|
||||||
|
inputSinkTransaction = new SurfaceControl.Transaction();
|
||||||
|
}
|
||||||
|
ar.mActivityRecordInputSink.applyChangesToSurfaceIfChanged(inputSinkTransaction);
|
||||||
|
}
|
||||||
|
if (inputSinkTransaction != null) inputSinkTransaction.apply();
|
||||||
|
|
||||||
// Always schedule stop processing when transition finishes because activities don't
|
// Always schedule stop processing when transition finishes because activities don't
|
||||||
// stop while they are in a transition thus their stop could still be pending.
|
// stop while they are in a transition thus their stop could still be pending.
|
||||||
mController.mAtm.mTaskSupervisor
|
mController.mAtm.mTaskSupervisor
|
||||||
|
|||||||
Reference in New Issue
Block a user