1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-23 16:40:32 +00:00

Less indents and code -> better readable

Also removed a useless variable
This commit is contained in:
litetex 2021-10-26 20:29:03 +02:00
parent e5fd24b0d1
commit 403154b2e1

View File

@ -128,9 +128,10 @@ public final class CheckForNewAppVersion extends IntentService {
final String versionName, final String versionName,
final String apkLocationUrl, final String apkLocationUrl,
final int versionCode) { final int versionCode) {
final int notificationId = 2000; if (BuildConfig.VERSION_CODE >= versionCode) {
return;
}
if (BuildConfig.VERSION_CODE < versionCode) {
// A pending intent to open the apk location url in the browser. // A pending intent to open the apk location url in the browser.
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(apkLocationUrl)); final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(apkLocationUrl));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
@ -153,8 +154,7 @@ public final class CheckForNewAppVersion extends IntentService {
final NotificationManagerCompat notificationManager final NotificationManagerCompat notificationManager
= NotificationManagerCompat.from(application); = NotificationManagerCompat.from(application);
notificationManager.notify(notificationId, notificationBuilder.build()); notificationManager.notify(2000, notificationBuilder.build());
}
} }
public static boolean isReleaseApk(@NonNull final App app) { public static boolean isReleaseApk(@NonNull final App app) {