From 25061ab07ca8b07e49da8a832753ddb921da4422 Mon Sep 17 00:00:00 2001 From: Coffeemakr Date: Tue, 31 Oct 2017 10:11:31 +0100 Subject: [PATCH 1/2] Add root-path /storage (fixes #707) See https://stackoverflow.com/questions/32333094/android-fileprovider-for-ext-sdcard for why this solution migth work. --- app/src/main/res/xml/provider_paths.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/xml/provider_paths.xml b/app/src/main/res/xml/provider_paths.xml index ffa74ab56..7c55d5a29 100644 --- a/app/src/main/res/xml/provider_paths.xml +++ b/app/src/main/res/xml/provider_paths.xml @@ -1,4 +1,5 @@ + \ No newline at end of file From 3d5c173d61bd7cdb202676d70dc191e928235071 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Tue, 31 Oct 2017 07:17:51 -0700 Subject: [PATCH 2/2] -Fixed new task intent for opening controls on players between sdk 21 and 24. --- .../main/java/org/schabi/newpipe/player/BackgroundPlayer.java | 4 ++-- .../main/java/org/schabi/newpipe/player/PopupVideoPlayer.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index a7a1e2797..863eaf3e8 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -132,8 +132,8 @@ public final class BackgroundPlayer extends Service { //////////////////////////////////////////////////////////////////////////*/ public void openControl(final Context context) { - final Intent intent = new Intent(context, BackgroundPlayerActivity.class); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { + Intent intent = new Intent(context, BackgroundPlayerActivity.class); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } context.startActivity(intent); diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 71ce4726a..89d58141d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -314,8 +314,8 @@ public final class PopupVideoPlayer extends Service { } public void openControl(final Context context) { - final Intent intent = new Intent(context, PopupVideoPlayerActivity.class); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { + Intent intent = new Intent(context, PopupVideoPlayerActivity.class); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } context.startActivity(intent);