Skip to content

Commit

Permalink
Deprecate APIs that are deprecated only on JavaDoc (#37229)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #37229

Those methods all have replacements and they have been annotated as `deprecated` but only on the Javadoc level.
The Java compiler from 11 starts to emit warnigns for those functions so I'm actually annotating them with Deprecated correctly.

Changelog:
[Android] [Changed] - Deprecate APIs that are deprecate only on JavaDoc

Reviewed By: mdvacca

Differential Revision: D45525406

fbshipit-source-id: 9fea1a6374c9a14f7f07e5bca8db1221260c03fd
  • Loading branch information
cortinico authored and facebook-github-bot committed May 3, 2023
1 parent b07c812 commit 1be65ba
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ private void toggleElementInspector() {
* @deprecated Use {@link #onHostPause(Activity)} instead.
*/
@ThreadConfined(UI)
@Deprecated
public void onHostPause() {
UiThreadUtil.assertOnUiThread();

Expand Down Expand Up @@ -669,6 +670,7 @@ public void onViewDetachedFromWindow(View v) {
* @deprecated use {@link #onHostDestroy(Activity)} instead
*/
@ThreadConfined(UI)
@Deprecated
public void onHostDestroy() {
UiThreadUtil.assertOnUiThread();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ interface NativeMethod {
*
* @deprecated use {@link #invalidate()} instead.
*/
@Deprecated
void onCatalystInstanceDestroy();

/** Allow NativeModule to clean up. Called before {CatalystInstance#onHostDestroy} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ public boolean startActivityForResult(Intent intent, int code, Bundle bundle) {
}

/** @deprecated DO NOT USE, this method will be removed in the near future. */
@Deprecated
public boolean isBridgeless() {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public interface Cleanable {
*
* @deprecated
*/
@Deprecated
public static void cleanDataFromModules(CatalystInstance catalystInstance) {
for (NativeModule nativeModule : catalystInstance.getNativeModules()) {
if (nativeModule instanceof Cleanable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public interface RootView {
void onChildStartedNativeGesture(View childView, MotionEvent ev);

/** @deprecated */
@Deprecated
void onChildStartedNativeGesture(MotionEvent ev);

/**
Expand Down

0 comments on commit 1be65ba

Please sign in to comment.