Skip to content

Commit afcd7b9

Browse files
authored
Fix LCPContentProtection preventing fallback on other DRMs in some cases (#113)
1 parent 1ead4ae commit afcd7b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

readium/lcp/r2-lcp/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212

1313
<!-- Used to get the device's name for LSD "register" -->
1414
<uses-permission android:name="android.permission.BLUETOOTH" />
15+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
1516

1617
</manifest>

readium/lcp/r2-lcp/src/main/java/org/readium/r2/lcp/LcpContentProtection.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import org.readium.r2.shared.publication.asset.FileAsset
1515
import org.readium.r2.shared.publication.asset.PublicationAsset
1616
import org.readium.r2.shared.publication.services.contentProtectionServiceFactory
1717
import org.readium.r2.shared.util.Try
18-
import timber.log.Timber
1918

2019
internal class LcpContentProtection(
2120
private val lcpService: LcpService,
@@ -30,7 +29,7 @@ internal class LcpContentProtection(
3029
sender: Any?
3130
): Try<ContentProtection.ProtectedAsset, Publication.OpeningException>? {
3231
if (asset !is FileAsset) {
33-
return Try.failure(Publication.OpeningException.UnsupportedFormat(Exception("Only `FileAsset` is supported with the `LcpContentProtection`, make sure you are trying to open a package from the file system")))
32+
return null
3433
}
3534

3635
if (!lcpService.isLcpProtected(asset.file)) {

0 commit comments

Comments
 (0)