mirror of
https://github.com/Genymobile/scrcpy
synced 2025-01-19 22:01:25 +00:00
Adapt FakeContext to API 23
This commit is contained in:
parent
e4c152b1a3
commit
cfc9882897
@ -26,15 +26,13 @@ public final class FakeContext extends ContextWrapper {
|
|||||||
return PACKAGE_NAME;
|
return PACKAGE_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getOpPackageName() {
|
public String getOpPackageName() {
|
||||||
return PACKAGE_NAME;
|
return PACKAGE_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(31)
|
@TargetApi(31)
|
||||||
@Override
|
|
||||||
public AttributionSource getAttributionSource() {
|
public AttributionSource getAttributionSource() {
|
||||||
AttributionSource.Builder builder = new AttributionSource.Builder(Process.SHELL_UID);
|
AttributionSource.Builder builder = new AttributionSource.Builder(0);
|
||||||
builder.setPackageName(PACKAGE_NAME);
|
builder.setPackageName(PACKAGE_NAME);
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user