summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-07-31 22:15:50 -0500
committerSamuel Holland <samuel@sholland.org>2017-07-31 22:15:50 -0500
commitb324e7b7f1908bbf95698191ed462191dd2a523c (patch)
tree321b044b41061df4e52eaa572ee43dba1bb3cf42 /app/src/main/java
parent84e19d6c72f0b6241650de9344b258350dff257e (diff)
BootCompletedReceiver: Enforce receiving the correct broadcast
This satisfies an Android security lint. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/wireguard/android/BootCompletedReceiver.java2
1 files changed, 2 insertions, 0 deletions
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);
}