Add a few TODOs for removing getSfInstance

Bug: 162235855
Test: N/A
Change-Id: Ie5ed75aa3971844be37cea92f6c1a353e42e82e8
This commit is contained in:
Ady Abraham
2022-03-04 10:01:11 -08:00
parent bbf0c85269
commit 6dc5f093c9
5 changed files with 6 additions and 0 deletions

View File

@@ -866,6 +866,7 @@ public final class ViewRootImpl implements ViewParent,
mDensity = context.getResources().getDisplayMetrics().densityDpi;
mNoncompatDensity = context.getResources().getDisplayMetrics().noncompatDensityDpi;
mFallbackEventHandler = new PhoneFallbackEventHandler(context);
// TODO(b/222696368): remove getSfInstance usage and use vsyncId for transactions
mChoreographer = useSfChoreographer
? Choreographer.getSfInstance() : Choreographer.getInstance();
mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE);

View File

@@ -24,6 +24,7 @@ import android.view.Choreographer;
*
* @hide
*/
// TODO(b/222698397): remove getSfInstance/this class usage and use vsyncId for transactions
public final class SfVsyncFrameCallbackProvider implements AnimationFrameCallbackProvider {
private final Choreographer mChoreographer;

View File

@@ -146,6 +146,7 @@ public class PipInputConsumer {
mMainExecutor.execute(() -> {
// Choreographer.getSfInstance() must be called on the thread that the input event
// receiver should be receiving events
// TODO(b/222697646): remove getSfInstance usage and use vsyncId for transactions
mInputEventReceiver = new InputEventReceiver(inputChannel,
Looper.myLooper(), Choreographer.getSfInstance());
if (mRegistrationListener != null) {

View File

@@ -94,6 +94,8 @@ public class PipMotionHelper implements PipAppOpsListener.Callback,
final FrameCallbackScheduler scheduler = new FrameCallbackScheduler() {
@Override
public void postFrameCallback(@androidx.annotation.NonNull Runnable runnable) {
// TODO(b/222697646): remove getSfInstance usage and use vsyncId for
// transactions
Choreographer.getSfInstance().postFrameCallback(t -> runnable.run());
}

View File

@@ -625,6 +625,7 @@ public class PipResizeGestureHandler {
class PipResizeInputEventReceiver extends BatchedInputEventReceiver {
PipResizeInputEventReceiver(InputChannel channel, Looper looper) {
// TODO(b/222697646): remove getSfInstance usage and use vsyncId for transactions
super(channel, looper, Choreographer.getSfInstance());
}