mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +01:00
Fix some lgtm warnings
This commit is contained in:
parent
ebdf385baa
commit
f3a7861fdb
@ -399,7 +399,7 @@ public class GBApplication extends Application {
|
||||
|
||||
private static void loadAppsNotifBlackList() {
|
||||
GB.log("Loading apps_notification_blacklist", GB.INFO, null);
|
||||
apps_notification_blacklist = (HashSet<String>) sharedPrefs.getStringSet(GBPrefs.PACKAGE_BLACKLIST, null);
|
||||
apps_notification_blacklist = (HashSet<String>) sharedPrefs.getStringSet(GBPrefs.PACKAGE_BLACKLIST, null); // lgtm [java/abstract-to-concrete-cast]
|
||||
if (apps_notification_blacklist == null) {
|
||||
apps_notification_blacklist = new HashSet<>();
|
||||
}
|
||||
@ -451,7 +451,7 @@ public class GBApplication extends Application {
|
||||
|
||||
private static void loadAppsPebbleBlackList() {
|
||||
GB.log("Loading apps_pebblemsg_blacklist", GB.INFO, null);
|
||||
apps_pebblemsg_blacklist = (HashSet<String>) sharedPrefs.getStringSet(GBPrefs.PACKAGE_PEBBLEMSG_BLACKLIST, null);
|
||||
apps_pebblemsg_blacklist = (HashSet<String>) sharedPrefs.getStringSet(GBPrefs.PACKAGE_PEBBLEMSG_BLACKLIST, null); // lgtm [java/abstract-to-concrete-cast]
|
||||
if (apps_pebblemsg_blacklist == null) {
|
||||
apps_pebblemsg_blacklist = new HashSet<>();
|
||||
}
|
||||
@ -523,7 +523,7 @@ public static String packageNameToPebbleMsgSender(String packageName) {
|
||||
|
||||
private static void loadCalendarsBlackList() {
|
||||
GB.log("Loading calendars_blacklist", GB.INFO, null);
|
||||
calendars_blacklist = (HashSet<String>) sharedPrefs.getStringSet(GBPrefs.CALENDAR_BLACKLIST, null);
|
||||
calendars_blacklist = (HashSet<String>) sharedPrefs.getStringSet(GBPrefs.CALENDAR_BLACKLIST, null); // lgtm [java/abstract-to-concrete-cast]
|
||||
if (calendars_blacklist == null) {
|
||||
calendars_blacklist = new HashSet<>();
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ public class NotificationFilterActivity extends AbstractGBActivity {
|
||||
|
||||
notificationFilterEntryDao.deleteByKeyInTx(mFilterEntryIds);
|
||||
|
||||
Long filterId = notificationFilterDao.insertOrReplace(mNotificationFilter);
|
||||
long filterId = notificationFilterDao.insertOrReplace(mNotificationFilter);
|
||||
|
||||
// only save words if filter mode != none
|
||||
if (mNotificationFilter.getNotificationFilterMode() != NOTIFICATION_FILTER_MODE_NONE) {
|
||||
|
@ -356,7 +356,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
}
|
||||
|
||||
/**
|
||||
* @param text: original text
|
||||
* @param text original text
|
||||
* @return 'text' or a new String without non supported chars like emoticons, etc.
|
||||
*/
|
||||
private String sanitizeNotifText(String text) {
|
||||
|
@ -1044,12 +1044,12 @@ public class ZeTimeDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
if (musicControlMsg[6] > volume) {
|
||||
musicCmd.event = GBDeviceEventMusicControl.Event.VOLUMEUP;
|
||||
if(volume < 90) {
|
||||
volume += 10;
|
||||
volume += (byte) 10;
|
||||
}
|
||||
} else {
|
||||
musicCmd.event = GBDeviceEventMusicControl.Event.VOLUMEDOWN;
|
||||
if(volume > 10) {
|
||||
volume -= 10;
|
||||
volume -= (byte) 10;
|
||||
}
|
||||
}
|
||||
try {
|
||||
|
@ -88,7 +88,7 @@ public class EmojiConverter {
|
||||
try {
|
||||
return EmojiUtils.shortCodify(text);
|
||||
} catch (Exception e){
|
||||
LOG.warn("An exception occured when converting advanced emoji to ASCII", text);
|
||||
LOG.warn("An exception occured when converting advanced emoji to ASCII: " + text);
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user