-
-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(remove-screen-capture-restriction): remove app constraint (#411)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
- Loading branch information
1 parent
fa44f12
commit 31251f0
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...app/revanced/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch.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,21 @@ | ||
package app.revanced.all.screencapture.removerestriction; | ||
|
||
import android.media.AudioAttributes; | ||
import android.os.Build; | ||
|
||
import androidx.annotation.RequiresApi; | ||
|
||
public final class RemoveScreencaptureRestrictionPatch { | ||
// Member of AudioAttributes.Builder | ||
@RequiresApi(api = Build.VERSION_CODES.Q) | ||
public static AudioAttributes.Builder setAllowedCapturePolicy(final AudioAttributes.Builder builder, final int capturePolicy) { | ||
builder.setAllowedCapturePolicy(AudioAttributes.ALLOW_CAPTURE_BY_ALL); | ||
|
||
return builder; | ||
} | ||
|
||
// Member of AudioManager static class | ||
public static void setAllowedCapturePolicy(final int capturePolicy) { | ||
// Ignore request | ||
} | ||
} |