2017-07-03 11:36:31 -07:00
|
|
|
package org.thoughtcrime.securesms.service;
|
|
|
|
|
|
|
|
import android.content.BroadcastReceiver;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Intent;
|
2017-11-27 12:18:14 -08:00
|
|
|
import android.os.Build;
|
2017-07-03 11:36:31 -07:00
|
|
|
|
|
|
|
public class BootReceiver extends BroadcastReceiver {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onReceive(Context context, Intent intent) {
|
2017-11-27 12:18:14 -08:00
|
|
|
if (intent != null && Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
|
|
|
Intent messageRetrievalService = new Intent(context, MessageRetrievalService.class);
|
2017-12-20 11:27:57 -08:00
|
|
|
context.startService(messageRetrievalService);
|
2017-11-27 12:18:14 -08:00
|
|
|
}
|
2017-07-03 11:36:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|