mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 17:53:40 +00:00
Fix service calls that won't foreground
This commit is contained in:
parent
512dc19471
commit
6dcec7c2c5
@ -11,9 +11,7 @@ public class BootReceiver extends BroadcastReceiver {
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (intent != null && Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
||||
Intent messageRetrievalService = new Intent(context, MessageRetrievalService.class);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) context.startForegroundService(messageRetrievalService);
|
||||
else context.startService(messageRetrievalService);
|
||||
context.startService(messageRetrievalService);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,9 +23,7 @@ public class PanicResponderListener extends BroadcastReceiver {
|
||||
{
|
||||
Intent lockIntent = new Intent(context, KeyCachingService.class);
|
||||
lockIntent.setAction(KeyCachingService.CLEAR_KEY_ACTION);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) context.startForegroundService(lockIntent);
|
||||
else context.startService(lockIntent);
|
||||
context.startService(lockIntent);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user