mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-24 08:37:32 +01:00
Small fixlets
This commit is contained in:
parent
400ae2bc3b
commit
d5cca84780
@ -65,6 +65,9 @@ public class GBApplication extends Application {
|
||||
private static Appender<ILoggingEvent> fileLogger;
|
||||
private static Prefs prefs;
|
||||
private static GBPrefs gbPrefs;
|
||||
/**
|
||||
* Note: is null on Lollipop and Kitkat
|
||||
*/
|
||||
private static NotificationManager notificationManager;
|
||||
|
||||
public static final String ACTION_QUIT
|
||||
@ -127,7 +130,7 @@ public class GBApplication extends Application {
|
||||
LocalBroadcastManager.getInstance(this).registerReceiver(mReceiver, filterLocal);
|
||||
|
||||
if (isRunningMarshmallowOrLater()) {
|
||||
notificationManager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
|
||||
notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
}
|
||||
|
||||
// for testing DB stuff
|
||||
@ -272,7 +275,7 @@ public class GBApplication extends Application {
|
||||
boolean exists = false;
|
||||
int starred = 0;
|
||||
try {
|
||||
if (cursor.moveToFirst()) {
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
exists = true;
|
||||
starred = cursor.getInt(cursor.getColumnIndexOrThrow(PhoneLookup.STARRED));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user