Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/israelalagbe/FaceLocker into…
Browse files Browse the repository at this point in the history
… dev
  • Loading branch information
israelalagbe committed Sep 2, 2021
2 parents f7e1d70 + 2d682c4 commit 3cd6539
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions app/src/main/java/wavetech/facelocker/utils/LockscreenService.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public IBinder onBind(Intent intent) {
@Override
public void onCreate() {
super.onCreate();

}

// Register for Lockscreen event intents
Expand All @@ -39,31 +38,17 @@ public int onStartCommand(Intent intent, int flags, int startId) {
filter.addAction(Intent.ACTION_SCREEN_OFF);
mReceiver = new LockscreenIntentReceiver();
registerReceiver(mReceiver, filter);
<<<<<<< HEAD

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
startMyOwnForeground();
else
startForeground(1, new Notification());

=======
startForeground();
>>>>>>> 2d682c4ac1e52fb4fc61f89c509d443f38173743
return START_STICKY;
}

// Run service in foreground so it is less likely to be killed by system
private void startMyOwnForeground() {
// Notification notification = new NotificationCompat.Builder(this)
// .setContentTitle(getResources().getString(R.string.app_name))
// .setTicker(getResources().getString(R.string.app_name))
// .setContentText("Running")
// .setSmallIcon(R.drawable.face_icon_logo)
// .setContentIntent(null)
// .setOngoing(true)
// .build();
// startForeground(9999,notification);

String NOTIFICATION_CHANNEL_ID = "wavetech.facelocker";
String channelName = "LockScreenService";
NotificationChannel chan = new NotificationChannel(NOTIFICATION_CHANNEL_ID, channelName, NotificationManager.IMPORTANCE_NONE);
Expand Down

0 comments on commit 3cd6539

Please sign in to comment.