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:
parent
84e19d6c72
commit
b324e7b7f1
@ -8,6 +8,8 @@ public class BootCompletedReceiver extends BroadcastReceiver {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
if (!intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED))
|
||||||
|
return;
|
||||||
Intent startServiceIntent = new Intent(context, ProfileService.class);
|
Intent startServiceIntent = new Intent(context, ProfileService.class);
|
||||||
context.startService(startServiceIntent);
|
context.startService(startServiceIntent);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user