BootCompletedReceiver: Enforce receiving the correct broadcast

This satisfies an Android security lint.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Samuel Holland 2017-07-31 22:15:50 -05:00
parent 84e19d6c72
commit b324e7b7f1

View File

@ -8,6 +8,8 @@ public class BootCompletedReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (!intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED))
return;
Intent startServiceIntent = new Intent(context, ProfileService.class);
context.startService(startServiceIntent);
}