forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kotlinify modules/core interfaces (facebook#45787)
Summary: Pull Request resolved: facebook#45787 # Changelog: [Internal] - As in the title. Reviewed By: cortinico Differential Revision: D60377675
- Loading branch information
1 parent
1c1c833
commit ef53e10
Showing
10 changed files
with
89 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
...ges/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/JSTimers.java
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/JSTimers.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
package com.facebook.react.modules.core | ||
|
||
import com.facebook.proguard.annotations.DoNotStrip | ||
import com.facebook.react.bridge.JavaScriptModule | ||
import com.facebook.react.bridge.WritableArray | ||
|
||
@DoNotStrip | ||
public interface JSTimers : JavaScriptModule { | ||
public fun callTimers(timerIDs: WritableArray) | ||
|
||
public fun callIdleCallbacks(frameTime: Double) | ||
|
||
public fun emitTimeDriftWarning(warningMessage: String) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
...e/ReactAndroid/src/main/java/com/facebook/react/modules/core/PermissionAwareActivity.java
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
...ive/ReactAndroid/src/main/java/com/facebook/react/modules/core/PermissionAwareActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
package com.facebook.react.modules.core | ||
|
||
/** | ||
* Interface used to denote activities that can forward permission requests and call | ||
* [PermissionListener] with the permission request results. | ||
*/ | ||
public interface PermissionAwareActivity { | ||
/** See [Activity.checkPermission]. */ | ||
public fun checkPermission(permission: String, pid: Int, uid: Int): Int | ||
|
||
/** See [Activity.checkSelfPermission]. */ | ||
public fun checkSelfPermission(permission: String): Int | ||
|
||
/** See [Activity.shouldShowRequestPermissionRationale]. */ | ||
public fun shouldShowRequestPermissionRationale(permission: String): Boolean | ||
|
||
/** See [Activity.requestPermissions]. */ | ||
public fun requestPermissions( | ||
permissions: Array<String>, | ||
requestCode: Int, | ||
listener: PermissionListener? | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
.../ReactAndroid/src/main/java/com/facebook/react/modules/core/RCTNativeAppEventEmitter.java
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
...ve/ReactAndroid/src/main/java/com/facebook/react/modules/core/RCTNativeAppEventEmitter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
package com.facebook.react.modules.core | ||
|
||
import com.facebook.proguard.annotations.DoNotStrip | ||
import com.facebook.react.bridge.JavaScriptModule | ||
|
||
/** Module that handles global application events. */ | ||
@DoNotStrip | ||
public fun interface RCTNativeAppEventEmitter : JavaScriptModule { | ||
public fun emit(eventName: String, data: Any?) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters