Merge "Add a failsafe to update surface position after activity-level transit" into udc-dev
This commit is contained in:
@@ -7981,6 +7981,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
mLastReportedConfiguration.getMergedConfiguration())) {
|
mLastReportedConfiguration.getMergedConfiguration())) {
|
||||||
ensureActivityConfiguration(0 /* globalChanges */, false /* preserveWindow */,
|
ensureActivityConfiguration(0 /* globalChanges */, false /* preserveWindow */,
|
||||||
false /* ignoreVisibility */, true /* isRequestedOrientationChanged */);
|
false /* ignoreVisibility */, true /* isRequestedOrientationChanged */);
|
||||||
|
if (mTransitionController.inPlayingTransition(this)) {
|
||||||
|
mTransitionController.mValidateActivityCompat.add(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mAtmService.getTaskChangeNotificationController().notifyActivityRequestedOrientationChanged(
|
mAtmService.getTaskChangeNotificationController().notifyActivityRequestedOrientationChanged(
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import android.annotation.Nullable;
|
|||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.app.IApplicationThread;
|
import android.app.IApplicationThread;
|
||||||
import android.app.WindowConfiguration;
|
import android.app.WindowConfiguration;
|
||||||
|
import android.graphics.Point;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
@@ -140,6 +141,14 @@ class TransitionController {
|
|||||||
*/
|
*/
|
||||||
final ArrayList<ActivityRecord> mValidateCommitVis = new ArrayList<>();
|
final ArrayList<ActivityRecord> mValidateCommitVis = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of activity-level participants. ActivityRecord is not expected to change independently,
|
||||||
|
* however, recent compatibility logic can now cause this at arbitrary times determined by
|
||||||
|
* client code. If it happens during an animation, the surface can be left at the wrong spot.
|
||||||
|
* TODO(b/290237710) remove when compat logic is moved.
|
||||||
|
*/
|
||||||
|
final ArrayList<ActivityRecord> mValidateActivityCompat = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently playing transitions (in the order they were started). When finished, records are
|
* Currently playing transitions (in the order they were started). When finished, records are
|
||||||
* removed from this list.
|
* removed from this list.
|
||||||
@@ -905,6 +914,14 @@ class TransitionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mValidateCommitVis.clear();
|
mValidateCommitVis.clear();
|
||||||
|
for (int i = 0; i < mValidateActivityCompat.size(); ++i) {
|
||||||
|
ActivityRecord ar = mValidateActivityCompat.get(i);
|
||||||
|
if (ar.getSurfaceControl() == null) continue;
|
||||||
|
final Point tmpPos = new Point();
|
||||||
|
ar.getRelativePosition(tmpPos);
|
||||||
|
ar.getSyncTransaction().setPosition(ar.getSurfaceControl(), tmpPos.x, tmpPos.y);
|
||||||
|
}
|
||||||
|
mValidateActivityCompat.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user