summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2017-08-24 22:27:00 +0200
committerSpiritCroc <spiritcroc@gmail.com>2017-08-26 08:57:04 +0200
commit621b6500819305dd2bfb97c53553a71843f85600 (patch)
tree007474f9f34b0208d1236efefffca2469d6f13ca
parent52499d20a6f6b9a1d08104d3ec6dcd0e2962d3ce (diff)
Email: Fix led notification settingsHEADn7.1
* Enabling LED notifications for email crashes the app because the notification manager requires a small icon in order to post the notification * Add one to get rid of the crash (* The notification is only shown for preview purposes so no need for a title or text) BUGBASH-423 Change-Id: Ie70f82cbfbf87dc17def215d9fff334fbeba95b0
-rw-r--r--res/drawable/ic_email.xml10
-rw-r--r--src/com/android/mail/preferences/notifications/LightSettingsDialog.java1
2 files changed, 11 insertions, 0 deletions
diff --git a/res/drawable/ic_email.xml b/res/drawable/ic_email.xml
new file mode 100644
index 000000000..fea62c2b1
--- /dev/null
+++ b/res/drawable/ic_email.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/black"
+ android:pathData="M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z" />
+</vector>
diff --git a/src/com/android/mail/preferences/notifications/LightSettingsDialog.java b/src/com/android/mail/preferences/notifications/LightSettingsDialog.java
index 4abfe353a..a2c6538fe 100644
--- a/src/com/android/mail/preferences/notifications/LightSettingsDialog.java
+++ b/src/com/android/mail/preferences/notifications/LightSettingsDialog.java
@@ -315,6 +315,7 @@ public class LightSettingsDialog extends AlertDialog implements
final Notification.Builder builder = new Notification.Builder(getContext());
builder.setLights(color, speedOn, speedOff);
+ builder.setSmallIcon(R.drawable.ic_email);
builder.setExtras(b);
mNotificationManager.notify(R.layout.notification_pulse_time_item, builder.build());