NewPipe no longer used by default.

This commit is contained in:
Thomas 2020-04-04 09:31:09 +02:00
parent f889055ecd
commit 4acd172f21
3 changed files with 6 additions and 3 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/captures /captures
.externalNativeBuild .externalNativeBuild
.cxx .cxx
/app/release/

View File

@ -389,6 +389,7 @@ public class TransformActivity extends Activity {
targetIntents.add(targetIntent); targetIntents.add(targetIntent);
} }
} }
//NewPipe has to be manually added
if (isNewPipeInstalled() && Arrays.asList(invidious_instances).contains(Objects.requireNonNull(i.getData()).getHost())) { if (isNewPipeInstalled() && Arrays.asList(invidious_instances).contains(Objects.requireNonNull(i.getData()).getHost())) {
Intent targetIntent = new Intent(Intent.ACTION_VIEW); Intent targetIntent = new Intent(Intent.ACTION_VIEW);
targetIntent.setDataAndType(intent.getData(), intent.getType()); targetIntent.setDataAndType(intent.getData(), intent.getType());
@ -396,8 +397,9 @@ public class TransformActivity extends Activity {
targetIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); targetIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
targetIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); targetIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
targetIntent.setComponent(new ComponentName("org.schabi.newpipe", "org.schabi.newpipe.RouterActivity")); targetIntent.setComponent(new ComponentName("org.schabi.newpipe", "org.schabi.newpipe.RouterActivity"));
startActivity(targetIntent); targetIntents.add(targetIntent);
} else if (targetIntents.size() > 0) { }
if (targetIntents.size() > 0) {
Intent chooserIntent = Intent.createChooser(targetIntents.remove(0), getString(R.string.open_with)); Intent chooserIntent = Intent.createChooser(targetIntents.remove(0), getString(R.string.open_with));
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, targetIntents.toArray(new Parcelable[]{})); chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, targetIntents.toArray(new Parcelable[]{}));
startActivity(chooserIntent); startActivity(chooserIntent);

View File

@ -3,7 +3,7 @@ Added:
- Unshorten support for buff.ly - Unshorten support for buff.ly
Changed: Changed:
- Improve detection of apps opening by default links - Improve apps detection for opening links
- Add titles above links for apps - Add titles above links for apps
Fixed: Fixed: