Skip to content

Commit

Permalink
Use explicit constants in @TargetApi
Browse files Browse the repository at this point in the history
  • Loading branch information
rom1v committed Oct 21, 2024
1 parent db24106 commit 05c80a0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.genymobile.scrcpy.wrappers;

import com.genymobile.scrcpy.AndroidVersions;
import com.genymobile.scrcpy.util.Ln;

import android.annotation.TargetApi;
Expand Down Expand Up @@ -208,7 +209,7 @@ public void unregisterRotationWatcher(IRotationWatcher rotationWatcher) {
}
}

@TargetApi(29)
@TargetApi(AndroidVersions.API_29_ANDROID_10)
public void registerDisplayFoldListener(IDisplayFoldListener foldListener) {
try {
manager.getClass().getMethod("registerDisplayFoldListener", IDisplayFoldListener.class).invoke(manager, foldListener);
Expand All @@ -217,7 +218,7 @@ public void registerDisplayFoldListener(IDisplayFoldListener foldListener) {
}
}

@TargetApi(29)
@TargetApi(AndroidVersions.API_29_ANDROID_10)
public void unregisterDisplayFoldListener(IDisplayFoldListener foldListener) {
try {
manager.getClass().getMethod("unregisterDisplayFoldListener", IDisplayFoldListener.class).invoke(manager, foldListener);
Expand Down

0 comments on commit 05c80a0

Please sign in to comment.