From bab6b91fddaa813d0655d7d8f1f71afdc0f10d41 Mon Sep 17 00:00:00 2001 From: Adrian Ulrich Date: Tue, 14 Oct 2014 12:58:40 +0200 Subject: [PATCH] get rid of obsolete inverted_color feature --- res/xml/preference_notifications.xml | 5 ----- .../android/vanilla/PlaybackService.java | 17 +---------------- .../blinkenlights/android/vanilla/PrefKeys.java | 1 - 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/res/xml/preference_notifications.xml b/res/xml/preference_notifications.xml index 0093f4c4..b05a03ac 100644 --- a/res/xml/preference_notifications.xml +++ b/res/xml/preference_notifications.xml @@ -35,9 +35,4 @@ THE SOFTWARE. android:entries="@array/notification_action_entries" android:entryValues="@array/entry_values" android:defaultValue="0" /> - diff --git a/src/ch/blinkenlights/android/vanilla/PlaybackService.java b/src/ch/blinkenlights/android/vanilla/PlaybackService.java index f01c25f0..c1f78f05 100644 --- a/src/ch/blinkenlights/android/vanilla/PlaybackService.java +++ b/src/ch/blinkenlights/android/vanilla/PlaybackService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012-2013 Adrian Ulrich + * Copyright (C) 2012-2014 Adrian Ulrich * Copyright (C) 2010, 2011 Christopher Eby * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -291,10 +291,6 @@ public final class PlaybackService extends Service * {@link PlaybackService#createNotificationAction(SharedPreferences)}. */ private PendingIntent mNotificationAction; - /** - * Use white text instead of black default text in notification. - */ - private boolean mInvertNotification; private Looper mLooper; private Handler mHandler; @@ -420,7 +416,6 @@ public final class PlaybackService extends Service mHeadsetOnly = settings.getBoolean(PrefKeys.HEADSET_ONLY, false); mStockBroadcast = settings.getBoolean(PrefKeys.STOCK_BROADCAST, false); - mInvertNotification = settings.getBoolean(PrefKeys.NOTIFICATION_INVERTED_COLOR, false); mNotificationAction = createNotificationAction(settings); mHeadsetPause = getSettings(this).getBoolean(PrefKeys.HEADSET_PAUSE, true); mShakeAction = settings.getBoolean(PrefKeys.ENABLE_SHAKE, false) ? Action.getAction(settings, PrefKeys.SHAKE_ACTION, Action.NextSong) : Action.Nothing; @@ -756,9 +751,6 @@ public final class PlaybackService extends Service } else if (PrefKeys.NOTIFICATION_ACTION.equals(key)) { mNotificationAction = createNotificationAction(settings); updateNotification(); - } else if (PrefKeys.NOTIFICATION_INVERTED_COLOR.equals(key)) { - mInvertNotification = settings.getBoolean(PrefKeys.NOTIFICATION_INVERTED_COLOR, false); - updateNotification(); } else if (PrefKeys.NOTIFICATION_MODE.equals(key)){ mNotificationMode = Integer.parseInt(settings.getString(PrefKeys.NOTIFICATION_MODE, "1")); // This is the only way to remove a notification created by @@ -782,8 +774,6 @@ public final class PlaybackService extends Service } else if (PrefKeys.COVERLOADER_SHADOW.equals(key)) { Song.mCoverLoadMode = settings.getBoolean(PrefKeys.COVERLOADER_SHADOW, true) ? Song.mCoverLoadMode | Song.COVER_MODE_SHADOW : Song.mCoverLoadMode & ~(Song.COVER_MODE_SHADOW); Song.mFlushCoverCache = true; - } else if (PrefKeys.NOTIFICATION_INVERTED_COLOR.equals(key)) { - updateNotification(); } else if (PrefKeys.HEADSET_ONLY.equals(key)) { mHeadsetOnly = settings.getBoolean(key, false); if (mHeadsetOnly && isSpeakerOn()) @@ -1884,11 +1874,6 @@ public final class PlaybackService extends Service expanded.setTextViewText(R.id.album, song.album); expanded.setTextViewText(R.id.artist, song.artist); - if (mInvertNotification) { - views.setTextColor(R.id.title, 0xffffffff); - views.setTextColor(R.id.artist, 0xffffffff); - } - Notification notification = new Notification(); notification.contentView = views; notification.icon = R.drawable.status_icon; diff --git a/src/ch/blinkenlights/android/vanilla/PrefKeys.java b/src/ch/blinkenlights/android/vanilla/PrefKeys.java index 9ade8db3..ff428854 100644 --- a/src/ch/blinkenlights/android/vanilla/PrefKeys.java +++ b/src/ch/blinkenlights/android/vanilla/PrefKeys.java @@ -46,7 +46,6 @@ public class PrefKeys { public static final String MEDIA_BUTTON = "media_button"; public static final String MEDIA_BUTTON_BEEP = "media_button_beep"; public static final String NOTIFICATION_ACTION = "notification_action"; - public static final String NOTIFICATION_INVERTED_COLOR = "notification_inverted_color"; public static final String NOTIFICATION_MODE = "notification_mode"; public static final String PLAYBACK_ON_STARTUP = "playback_on_startup"; public static final String SCROBBLE = "scrobble";