Skip to content

Commit

Permalink
Kotlinify ChoreographerProvider (#43840)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #43840

Changelog: [Internal]

As part of the Sustainability Week (see [post](https://fb.workplace.com/groups/251759413609061/permalink/742797531171911/)).

Reviewed By: cortinico

Differential Revision: D55731748

fbshipit-source-id: f43c687f44b351ade907be4dcd55518b5bef913d
  • Loading branch information
fabriziocucci authored and facebook-github-bot committed Apr 4, 2024
1 parent 9d51bfd commit 13cdd48
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.internal;
package com.facebook.react.internal

import android.view.Choreographer.FrameCallback

public interface ChoreographerProvider {
/**
* The interface to a android.view.Choreographer-like object, that can either use the
* android.view.Choreographer or a mock one for testing purposes, or override built-in
* android.view.Choreographer's behaviors.
*/
interface Choreographer {

public interface Choreographer {
/** Posts a frame callback to run on the next frame. */
void postFrameCallback(android.view.Choreographer.FrameCallback callback);
public fun postFrameCallback(callback: FrameCallback)

/** Removes a previously posted frame callback. */
void removeFrameCallback(android.view.Choreographer.FrameCallback callback);
public fun removeFrameCallback(callback: FrameCallback)
}

/**
* Get an instance of Choreographer.
*
* @return An instance of Choreographer.
*/
Choreographer getChoreographer();
public fun getChoreographer(): Choreographer
}

0 comments on commit 13cdd48

Please sign in to comment.