|
|
@ -78,8 +78,8 @@ public final class SurfaceControl {
|
|
|
|
|
|
|
|
|
|
|
|
public static IBinder getBuiltInDisplay(int builtInDisplayId) {
|
|
|
|
public static IBinder getBuiltInDisplay(int builtInDisplayId) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
// Android Q does not have this method anymore but has a
|
|
|
|
// the method signature has changed in Android Q
|
|
|
|
// replacement.
|
|
|
|
// <https://github.com/Genymobile/scrcpy/issues/586>
|
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
|
|
|
return (IBinder) CLASS.getMethod("getBuiltInDisplay", int.class).invoke(null, builtInDisplayId);
|
|
|
|
return (IBinder) CLASS.getMethod("getBuiltInDisplay", int.class).invoke(null, builtInDisplayId);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|