mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Attach base context to application
This commit is contained in:
parent
3d93a099b7
commit
e811b7710d
1 changed files with 2 additions and 0 deletions
|
|
@ -136,6 +136,8 @@ public final class Workarounds {
|
|||
return FakeContext.PACKAGE_NAME;
|
||||
}
|
||||
};
|
||||
Method method = ContextWrapper.class.getDeclaredMethod("attachBaseContext", Context.class);
|
||||
method.invoke(application, retrieveSystemContext());
|
||||
|
||||
Field initialApplicationField = activityThreadClass.getDeclaredField("mInitialApplication");
|
||||
initialApplicationField.setAccessible(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue