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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user