kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix service calls that won't foreground
rodzic
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);
|
||||
}
|
||||
}
|
||||
}
|
Ładowanie…
Reference in New Issue