From b324e7b7f1908bbf95698191ed462191dd2a523c Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Mon, 31 Jul 2017 22:15:50 -0500 Subject: BootCompletedReceiver: Enforce receiving the correct broadcast This satisfies an Android security lint. Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/BootCompletedReceiver.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app') diff --git a/app/src/main/java/com/wireguard/android/BootCompletedReceiver.java b/app/src/main/java/com/wireguard/android/BootCompletedReceiver.java index 9f7e3dc2..64887369 100644 --- a/app/src/main/java/com/wireguard/android/BootCompletedReceiver.java +++ b/app/src/main/java/com/wireguard/android/BootCompletedReceiver.java @@ -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); } -- cgit v1.2.3