mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-02 22:29:25 +00:00
Fix AudioRecord package name for Android 16
Since commit 9f91a5eebb4520b9333576e946b3911d0f946a04 in frameworks/av (AOSP), an AudioRecord can be created only if the declared package name in the AttributionSource is "shell" (for the shell UID): - <https://android.googlesource.com/platform/frameworks/av/+/7c4e6991acdf8d110e9b00d144863c3c4823bc43/services/audiopolicy/permission/NativePermissionController.cpp#129> - <https://android.googlesource.com/platform/frameworks/av/+/7c4e6991acdf8d110e9b00d144863c3c4823bc43/services/audiopolicy/permission/NativePermissionController.cpp#40> Refs https://android.googlesource.com/platform/frameworks/av/+/9f91a5eebb4520b9333576e946b3911d0f946a04%5E%21/ Fixes #5698 <https://github.com/Genymobile/scrcpy/issues/5698> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
parent
5b1229a55f
commit
330a9b1ec9
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ public final class FakeContext extends ContextWrapper {
|
|||
@Override
|
||||
public AttributionSource getAttributionSource() {
|
||||
AttributionSource.Builder builder = new AttributionSource.Builder(Process.SHELL_UID);
|
||||
builder.setPackageName(PACKAGE_NAME);
|
||||
builder.setPackageName("shell");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue