Class RequirementsWatcher
- java.lang.Object
-
- com.google.android.exoplayer2.scheduler.RequirementsWatcher
-
@Deprecated public final class RequirementsWatcher extends Object
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Watches whether theRequirements
are met and notifies theRequirementsWatcher.Listener
on changes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RequirementsWatcher.Listener
Deprecated.Notified when RequirementsWatcher instance first created and on changes whether theRequirements
are met.
-
Constructor Summary
Constructors Constructor Description RequirementsWatcher(Context context, RequirementsWatcher.Listener listener, Requirements requirements)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Requirements
getRequirements()
Deprecated.Returns watchedRequirements
.@com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int
start()
Deprecated.Starts watching for changes.void
stop()
Deprecated.Stops watching for changes.
-
-
-
Constructor Detail
-
RequirementsWatcher
public RequirementsWatcher(Context context, RequirementsWatcher.Listener listener, Requirements requirements)
Deprecated.- Parameters:
context
- Any context.listener
- Notified whether theRequirements
are met.requirements
- The requirements to watch.
-
-
Method Detail
-
start
@RequirementFlags public @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int start()
Deprecated.Starts watching for changes. Must be called from a thread that has an associatedLooper
. Listener methods are called on the caller thread.- Returns:
- Initial
RequirementFlags
that are not met, or 0.
-
stop
public void stop()
Deprecated.Stops watching for changes.
-
getRequirements
public Requirements getRequirements()
Deprecated.Returns watchedRequirements
.
-
-