File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import android .content .Intent ;
1111import android .content .SharedPreferences ;
1212import android .content .pm .PackageManager ;
13+ import android .os .Build ;
1314import android .os .Bundle ;
1415import android .text .TextUtils ;
1516import android .view .ContextThemeWrapper ;
@@ -776,7 +777,10 @@ private void runOnVisible(final ResultRunnable runnable) {
776777 }
777778 if (isPaused ) {
778779 buffer .add (runnable );
779- if (!getActivityContext ().isChangingConfigurations ()) {
780+ // this trick doesn't seem to work on Android 10+ (API 29)
781+ // which places restrictions on starting activities from the background
782+ if (Build .VERSION .SDK_INT < Build .VERSION_CODES .Q
783+ && !getActivityContext ().isChangingConfigurations ()) {
780784 // try to bring the activity back to front if minimised
781785 final Intent i = new Intent (getActivityContext (), RouterActivity .class );
782786 i .setFlags (Intent .FLAG_ACTIVITY_REORDER_TO_FRONT );
You can’t perform that action at this time.
0 commit comments