From 4b775d15a2a13a2322514bdb6549b9bd410a28a8 Mon Sep 17 00:00:00 2001 From: yilun Date: Mon, 6 Nov 2017 12:27:10 +0000 Subject: [PATCH 1/3] Fixes ClassCastException when getting Bitmap from AdaptiveIcon on Android 8+ --- .../us/shandian/giga/service/DownloadManagerService.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/us/shandian/giga/service/DownloadManagerService.java b/app/src/main/java/us/shandian/giga/service/DownloadManagerService.java index d60ae86ab..50975728f 100755 --- a/app/src/main/java/us/shandian/giga/service/DownloadManagerService.java +++ b/app/src/main/java/us/shandian/giga/service/DownloadManagerService.java @@ -6,8 +6,8 @@ import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; -import android.graphics.drawable.BitmapDrawable; -import android.graphics.drawable.Drawable; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Binder; import android.os.Handler; @@ -15,7 +15,6 @@ import android.os.HandlerThread; import android.os.IBinder; import android.os.Message; import android.support.v4.app.NotificationCompat.Builder; -import android.support.v4.content.ContextCompat; import android.support.v4.content.PermissionChecker; import android.util.Log; import android.widget.Toast; @@ -96,12 +95,12 @@ public class DownloadManagerService extends Service { openDownloadListIntent, PendingIntent.FLAG_UPDATE_CURRENT); - Drawable icon = ContextCompat.getDrawable(this, R.mipmap.ic_launcher); + Bitmap iconBitmap = BitmapFactory.decodeResource(this.getResources(), R.mipmap.ic_launcher); Builder builder = new Builder(this, getString(R.string.notification_channel_id)) .setContentIntent(pendingIntent) .setSmallIcon(android.R.drawable.stat_sys_download) - .setLargeIcon(((BitmapDrawable) icon).getBitmap()) + .setLargeIcon(iconBitmap) .setContentTitle(getString(R.string.msg_running)) .setContentText(getString(R.string.msg_running_detail)); From 441b510775e2d2b7b335a05a3d1067c40f6ea0be Mon Sep 17 00:00:00 2001 From: TobiGr Date: Tue, 7 Nov 2017 14:48:33 +0100 Subject: [PATCH 2/3] Fix plurals not showing number of views, videos and subscribers Fix typo in pull request template --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- app/src/main/res/values-cs/strings.xml | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0f588e9dd..d0e58680a 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1 +1 @@ -- [ ] I carefully reed the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md) and agree to them. +- [ ] I carefully read the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md) and agree to them. diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 85dc7357d..196c1e517 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -204,24 +204,21 @@ otevření ve vyskakovacím okně %s odběratel %s odběratelů - %s odběratelé - + %s odběratelé Žádná zhlédnutí %s zhlédnutí %s zhlédnutí - %s zhlédnutí - + %s zhlédnutí Žádná videa %s video %s videí - %s videa - + %s videa Stahování From 1c20a4d9eb0e10f3d1b814242a5aeccc21bc1cc4 Mon Sep 17 00:00:00 2001 From: Arjen Singels Date: Wed, 8 Nov 2017 13:58:01 +0200 Subject: [PATCH 3/3] Update CONTRIBUTING.md fixed typo. --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4a3cc8254..ae6ea696c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -32,7 +32,7 @@ Do not report crashes in the GitHub issue tracker. NewPipe has an automated cras * Please test (compile and run) your code before you submit changes! Ideally, provide test feedback in the PR description. Untested code will **not** be merged! * Try to figure out yourself why builds on our CI fail. * Make sure your PR is up-to-date with the rest of the code. Often, a simple click on "Update branch" will do the job, but if not, you are asked to merge the master branch manually and resolve the problems on your own. That will make the maintainers' jobs way easier. -* Please show intention to maintain your features and code after you contributed it. Unmaintained code is a hassle for the core developers, and just adds work. If you do not intend to maintain features you contributed, please think again about sumission, or clearly state that in the description of your PR. +* Please show intention to maintain your features and code after you contributed it. Unmaintained code is a hassle for the core developers, and just adds work. If you do not intend to maintain features you contributed, please think again about submission, or clearly state that in the description of your PR. * Respond yourselves if someone requests changes or otherwise raises issues about your PRs. * Check if your contributions align with the [fdroid inclusion guidelines](https://f-droid.org/en/docs/Inclusion_Policy/). * Check if your submission can be build with the current fdroid build server setup.