forked from barry-ran/QtScrcpy
-
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.
- Loading branch information
Showing
13 changed files
with
124 additions
and
13 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
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
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
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
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
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
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
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
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
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
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
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
41 changes: 41 additions & 0 deletions
41
server/src/main/java/com/genymobile/scrcpy/wrappers/StatusBarManager.java
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,41 @@ | ||
package com.genymobile.scrcpy.wrappers; | ||
|
||
//import android.annotation.SuppressLint; | ||
import android.os.IInterface; | ||
//import android.view.InputEvent; | ||
|
||
import java.lang.reflect.InvocationTargetException; | ||
import java.lang.reflect.Method; | ||
|
||
public class StatusBarManager { | ||
|
||
private final IInterface manager; | ||
private final Method expandNotificationsPanelMethod; | ||
private final Method collapsePanelsMethod; | ||
|
||
public StatusBarManager(IInterface manager) { | ||
this.manager = manager; | ||
try { | ||
expandNotificationsPanelMethod = manager.getClass().getMethod("expandNotificationsPanel"); | ||
collapsePanelsMethod = manager.getClass().getMethod("collapsePanels"); | ||
} catch (NoSuchMethodException e) { | ||
throw new AssertionError(e); | ||
} | ||
} | ||
|
||
public void expandNotificationsPanel() { | ||
try { | ||
expandNotificationsPanelMethod.invoke(manager); | ||
} catch (InvocationTargetException | IllegalAccessException e) { | ||
throw new AssertionError(e); | ||
} | ||
} | ||
|
||
public void collapsePanels() { | ||
try { | ||
collapsePanelsMethod.invoke(manager); | ||
} catch (InvocationTargetException | IllegalAccessException e) { | ||
throw new AssertionError(e); | ||
} | ||
} | ||
} |