tried fixing #3

This commit is contained in:
Nandan Desai 2020-04-24 01:47:33 +05:30
parent 9e314629ee
commit 1067f80b6d
1 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,7 @@ public class PrivacyBreacherService extends Service {
private static final String TAG = "PrivacyBreacherService";
public static MutableLiveData<ArrayList<String>> eventDatabase = new MutableLiveData<>();
public static MutableLiveData<ArrayList<String>> eventDatabase;
private EventReceiver eventReceiver;
@ -33,6 +33,7 @@ public class PrivacyBreacherService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
eventDatabase = new MutableLiveData<>();
startForeground(R.string.app_name, getNotification(this));
IntentFilter intentFilter = new IntentFilter(Intent.ACTION_SCREEN_ON);