From 3a9729de06de84cba0ac2672a6540052f9d62433 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 14 Aug 2018 16:15:04 +0100 Subject: [PATCH 1/2] Fix service notification channel for older Android versions (prior to Oreo) --- src/main/java/io/lbry/browser/LbrynetService.java | 13 ++++++++----- .../browser/reactmodules/DownloadManagerModule.java | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/lbry/browser/LbrynetService.java b/src/main/java/io/lbry/browser/LbrynetService.java index a4af3f67..548cf602 100644 --- a/src/main/java/io/lbry/browser/LbrynetService.java +++ b/src/main/java/io/lbry/browser/LbrynetService.java @@ -7,6 +7,7 @@ import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Intent; import android.content.Context; +import android.os.Build; import android.os.Bundle; import android.os.Binder; import android.os.IBinder; @@ -53,11 +54,13 @@ public class LbrynetService extends PythonService { NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); - NotificationChannel channel = new NotificationChannel( - NOTIFICATION_CHANNEL_ID, "LBRY Browser", NotificationManager.IMPORTANCE_LOW); - channel.setDescription("LBRY service notification channel"); - channel.setShowBadge(false); - notificationManager.createNotificationChannel(channel); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + NotificationChannel channel = new NotificationChannel( + NOTIFICATION_CHANNEL_ID, "LBRY Browser", NotificationManager.IMPORTANCE_LOW); + channel.setDescription("LBRY service notification channel"); + channel.setShowBadge(false); + notificationManager.createNotificationChannel(channel); + } Intent contextIntent = new Intent(context, MainActivity.class); PendingIntent pIntent = PendingIntent.getActivity(context, 0, contextIntent, PendingIntent.FLAG_UPDATE_CURRENT); diff --git a/src/main/java/io/lbry/browser/reactmodules/DownloadManagerModule.java b/src/main/java/io/lbry/browser/reactmodules/DownloadManagerModule.java index fee26b72..3b56144f 100644 --- a/src/main/java/io/lbry/browser/reactmodules/DownloadManagerModule.java +++ b/src/main/java/io/lbry/browser/reactmodules/DownloadManagerModule.java @@ -81,8 +81,8 @@ public class DownloadManagerModule extends ReactContextBaseJavaModule { PendingIntent pendingIntent = PendingIntent.getBroadcast(context, GROUP_ID, intent, 0); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); NotificationCompat.Builder builder = new NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_ID); - builder.setContentTitle("Active downloads") - .setContentText("Active downloads") + builder.setContentTitle("Active LBRY downloads") + .setContentText("Active LBRY downloads") .setSmallIcon(android.R.drawable.stat_sys_download) .setPriority(NotificationCompat.PRIORITY_LOW) .setGroup(GROUP_DOWNLOADS) -- 2.45.2 From 84e4151f42ea474af08ef9d6fbc71f7728bd857b Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 14 Aug 2018 17:45:54 +0100 Subject: [PATCH 2/2] use new libgmp mirror for builds --- recipes/libgmp/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libgmp/__init__.py b/recipes/libgmp/__init__.py index b0db5ce8..a974f04e 100644 --- a/recipes/libgmp/__init__.py +++ b/recipes/libgmp/__init__.py @@ -7,7 +7,7 @@ import sh class LibGMPRecipe(Recipe): version = '6.1.2' - url = 'https://ftp.gnu.org/pub/gnu/gmp/gmp-{version}.tar.bz2' + url = 'http://www.mirrorservice.org/pub/gnu/gmp/gmp-{version}.tar.bz2' #url = 'https://gmplib.org/download/gmp/gmp-{version}.tar.bz2' def should_build(self, arch): -- 2.45.2