From 54d3bff26df81b828be14448cff40e3751ad369a Mon Sep 17 00:00:00 2001 From: TobiGr Date: Tue, 12 Oct 2021 16:44:17 +0200 Subject: [PATCH 1/2] Move checking for new version to MainAcitvity When the service is started from the Application class, the app might be still in the background. This is definetly not the case when MainActivity.onCreate() is called. Fixes #7227 --- app/src/main/java/org/schabi/newpipe/App.java | 5 ----- app/src/main/java/org/schabi/newpipe/MainActivity.java | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index 35b0b267450..b44f7517daa 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -43,8 +43,6 @@ import io.reactivex.rxjava3.functions.Consumer; import io.reactivex.rxjava3.plugins.RxJavaPlugins; -import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService; - /* * Copyright (C) Hans-Christoph Steiner 2016 * App.java is part of NewPipe. @@ -113,9 +111,6 @@ public void onCreate() { && prefs.getBoolean(getString(R.string.show_image_indicators_key), false)); configureRxJavaErrorHandler(); - - // Check for new version - startNewVersionCheckService(); } @Override diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 5b1cf48e54c..18ab69b7b42 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -20,6 +20,8 @@ package org.schabi.newpipe; +import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService; + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -163,6 +165,9 @@ protected void onCreate(final Bundle savedInstanceState) { FocusOverlayView.setupFocusObserver(this); } openMiniPlayerUponPlayerStarted(); + + // Check for new version + startNewVersionCheckService(); } private void setupDrawer() throws Exception { From 7c9896beaf314a8b28dea4cdb4e7fc6d1d31fab8 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Tue, 12 Oct 2021 15:42:33 +0200 Subject: [PATCH 2/2] Release NewPipe 0.21.12 (978) --- app/build.gradle | 4 ++-- fastlane/metadata/android/en-US/changelogs/978.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/978.txt diff --git a/app/build.gradle b/app/build.gradle index 25493490ab3..e09395cffdb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { resValue "string", "app_name", "NewPipe" minSdkVersion 19 targetSdkVersion 29 - versionCode 977 - versionName "0.21.11" + versionCode 978 + versionName "0.21.12" multiDexEnabled true diff --git a/fastlane/metadata/android/en-US/changelogs/978.txt b/fastlane/metadata/android/en-US/changelogs/978.txt new file mode 100644 index 00000000000..34fa05f85fb --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/978.txt @@ -0,0 +1 @@ +Fixed executing the check for a new NewPipe version. This check was executed too early sometimes and therefore lead to an app crash. That should be fixed now.