diff --git a/demos/main/src/main/AndroidManifest.xml b/demos/main/src/main/AndroidManifest.xml
index f0bc0ce50a..25b87f5185 100644
--- a/demos/main/src/main/AndroidManifest.xml
+++ b/demos/main/src/main/AndroidManifest.xml
@@ -19,7 +19,6 @@
-
diff --git a/library/core/src/main/AndroidManifest.xml b/library/core/src/main/AndroidManifest.xml
index 430930a3ca..1a6971fdcc 100644
--- a/library/core/src/main/AndroidManifest.xml
+++ b/library/core/src/main/AndroidManifest.xml
@@ -14,4 +14,7 @@
limitations under the License.
-->
-
+
+
+
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/scheduler/PlatformScheduler.java b/library/core/src/main/java/com/google/android/exoplayer2/scheduler/PlatformScheduler.java
index d60bfb2e82..f59e43f35a 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/scheduler/PlatformScheduler.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/scheduler/PlatformScheduler.java
@@ -26,6 +26,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.PersistableBundle;
+import android.support.annotation.RequiresPermission;
import android.util.Log;
import com.google.android.exoplayer2.util.Util;
@@ -78,6 +79,7 @@ public final class PlatformScheduler implements Scheduler {
* @param serviceAction The action which the service will be started with.
* @param servicePackage The package of the service which contains the logic of the job.
*/
+ @RequiresPermission(android.Manifest.permission.RECEIVE_BOOT_COMPLETED)
public PlatformScheduler(
Context context,
Requirements requirements,
@@ -103,6 +105,8 @@ public final class PlatformScheduler implements Scheduler {
return true;
}
+ // @RequiresPermission constructor annotation should ensure the permission is present.
+ @SuppressWarnings("MissingPermission")
private static JobInfo buildJobInfo(
Context context,
Requirements requirements,
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/scheduler/Requirements.java b/library/core/src/main/java/com/google/android/exoplayer2/scheduler/Requirements.java
index 8c8cf6a3b5..30b07da3eb 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/scheduler/Requirements.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/scheduler/Requirements.java
@@ -32,8 +32,6 @@ import java.lang.annotation.RetentionPolicy;
/**
* Defines a set of device state requirements.
- *
- *
To use network type requirement, application needs to have ACCESS_NETWORK_STATE permission.
*/
public final class Requirements {