mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-20 03:25:03 +00:00
Simplify Application instantiation
The constructor is public.
This commit is contained in:
parent
446ea818a4
commit
8c3e2bae7b
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ public final class Workarounds {
|
|||
try {
|
||||
fillActivityThread();
|
||||
|
||||
Application app = Application.class.newInstance();
|
||||
Application app = new Application();
|
||||
Field baseField = ContextWrapper.class.getDeclaredField("mBase");
|
||||
baseField.setAccessible(true);
|
||||
baseField.set(app, FakeContext.get());
|
||||
|
|
Loading…
Add table
Reference in a new issue