Unverified Commit ebb0aceb authored by Vitalii Koshura's avatar Vitalii Koshura Committed by GitHub

Merge pull request #4006 from talregev/TalR_Remove_PNGS

[Android] Remove PNG's for large icon notification and use vector icon instead
parents adb7eae3 6b3cc271
......@@ -212,26 +212,17 @@ public class ClientNotification {
case ClientStatus.COMPUTING_STATUS_NEVER:
case ClientStatus.COMPUTING_STATUS_SUSPENDED:
case ClientStatus.COMPUTING_STATUS_IDLE:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
if(isSmall) {
icon = R.mipmap.ic_boinc_paused_white;
} else {
icon = R.mipmap.ic_boinc_paused_notification;
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP && isSmall) {
icon = R.mipmap.ic_boinc_paused_white;
}
else {
icon = R.drawable.ic_boinc_paused;
}
break;
default:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
if(isSmall) {
icon = R.mipmap.ic_boinc_white;
} else {
icon = R.mipmap.ic_launcher;
}
}
else {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP && isSmall) {
icon = R.mipmap.ic_boinc_white;
} else {
icon = R.drawable.ic_boinc;
}
}
......
......@@ -157,7 +157,7 @@ public class NoticeNotification {
private Notification buildSummaryNotification() {
final int notices = currentlyNotifiedNotices.size();
final String projectName = currentlyNotifiedNotices.get(0).getProjectName();
final int icon = Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP ? R.mipmap.ic_launcher : R.drawable.ic_boinc;
final int icon = R.drawable.ic_boinc;
final int smallIcon = Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP ?
R.mipmap.ic_boinc_notice_white : R.drawable.ic_boinc_notice;
// build new notification from scratch every time a notice arrives
......@@ -194,7 +194,7 @@ public class NoticeNotification {
private Bitmap getLargeProjectIcon(final Context context, final String projectName) {
final Bitmap projectIconBitmap = clientStatus.getProjectIconByName(projectName);
final int icon = Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP ? R.mipmap.ic_launcher : R.drawable.ic_boinc;
final int icon = R.drawable.ic_boinc;
try {
return projectIconBitmap != null ?
Bitmap.createScaledBitmap(
......
......@@ -18,6 +18,6 @@
along with BOINC. If not, see <http://www.gnu.org/licenses/>.
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<background android:drawable="@color/white"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is part of BOINC.
http://boinc.berkeley.edu
Copyright (C) 2020 University of California
BOINC is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
BOINC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with BOINC. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment