mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 22:12:55 +00:00
Always cancel the persistent notification when the app task is removed
This commit is contained in:
parent
35a14d3198
commit
4cab92d615
1 changed files with 9 additions and 9 deletions
|
@ -17,14 +17,9 @@ public class NotificationService extends Service {
|
|||
private static final String CODE_LOCK_STATUS_ID = "lock_status_channel";
|
||||
private static final String CODE_LOCK_VAULT_ACTION = "lock_vault";
|
||||
|
||||
public NotificationService() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent,int flags, int startId){
|
||||
super.onStartCommand(intent, flags, startId);
|
||||
|
||||
serviceMethod();
|
||||
return Service.START_STICKY;
|
||||
}
|
||||
|
@ -46,10 +41,15 @@ public class NotificationService extends Service {
|
|||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
|
||||
notificationManager.cancel(VAULT_UNLOCKED_ID);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTaskRemoved(Intent rootIntent) {
|
||||
super.onTaskRemoved(rootIntent);
|
||||
stopSelf();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue