External sharing improvements

Improve NewPipe's share on some devices + fix crash when no browser is set on some devices

Catching ActivityNotFoundException when trying to open the default browser
Use an ACTION_CHOOSER intent and put as an extra intent the intent to
open an URI / share an URI when no default app is set.

Add a LinkHelper class which set a custom action when clicking web links
in the description of a content. This class also helps to implement a confirmation dialog when trying to open web links in an external app.
This commit is contained in:
TiA4f8R 2020-12-15 20:11:55 +01:00 committed by Stypox
parent 7bf976cda8
commit d2cb003585
13 changed files with 285 additions and 111 deletions

View file

@ -12,21 +12,20 @@
lines="253,325"/>
<suppress checks="FinalParameters"
files="ListHelper.java"
lines="281,313"/>
files="ListHelper.java"
lines="281,313"/>
<suppress checks="EmptyBlock"
files="ContentSettingsFragment.java"
lines="227,245"/>
files="ContentSettingsFragment.java"
lines="227,245"/>
<!-- org.schabi.newpipe.streams -->
<suppress checks="LineLength"
files="WebMWriter.java"
lines="156,158"/>
files="WebMWriter.java"
lines="156,158"/>
<suppress checks="FileLength"
files="Player.java"/>
files="Player.java"/>
<suppress checks="FileLength"
files="VideoDetailFragment.java"/>
files="VideoDetailFragment.java"/>
</suppressions>