Skip to content

Display and control your Android device

Fix virtual display after Android 16 upgrade

Romain Vimontafaca80b375a
diff --git a/server/src/main/aidl/android/view/IDisplayWindowListener.aidl b/server/src/main/aidl/android/view/IDisplayWindowListener.aidl
index 2b331175..3e664e81 100644
--- a/server/src/main/aidl/android/view/IDisplayWindowListener.aidl
+++ b/server/src/main/aidl/android/view/IDisplayWindowListener.aidl
@@ -63,4 +63,12 @@ oneway interface IDisplayWindowListener {
* Called when the keep clear ares on a display have changed.
*/
void onKeepClearAreasChanged(int displayId, in List<Rect> restricted, in List<Rect> unrestricted);
+
+ /**
+ * Called when the eligibility of the desktop mode for a display have changed.
+ */
+ void onDesktopModeEligibleChanged(int displayId);
+
+ void onDisplayAddSystemDecorations(int displayId);
+ void onDisplayRemoveSystemDecorations(int displayId);
}
diff --git a/server/src/main/java/com/genymobile/scrcpy/wrappers/DisplayWindowListener.java b/server/src/main/java/com/genymobile/scrcpy/wrappers/DisplayWindowListener.java
index f2ecb158..b8b00e44 100644
--- a/server/src/main/java/com/genymobile/scrcpy/wrappers/DisplayWindowListener.java
+++ b/server/src/main/java/com/genymobile/scrcpy/wrappers/DisplayWindowListener.java
@@ -36,4 +36,19 @@ public class DisplayWindowListener extends IDisplayWindowListener.Stub {
public void onKeepClearAreasChanged(int displayId, List<Rect> restricted, List<Rect> unrestricted) {
// empty default implementation
}
+
+ @Override
+ public void onDesktopModeEligibleChanged(int displayId) {
+ // empty default implementation
+ }
+
+ @Override
+ public void onDisplayAddSystemDecorations(int displayId) {
+ // empty default implementation
+ }
+
+ @Override
+ public void onDisplayRemoveSystemDecorations(int displayId) {
+ // empty default implementation
+ }
}