Class Requirements
- java.lang.Object
-
- com.google.android.exoplayer2.scheduler.Requirements
-
- All Implemented Interfaces:
Parcelable
@Deprecated public final class Requirements extends Object implements Parcelable
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.Defines a set of device state requirements.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRequirements.RequirementFlagsDeprecated.Requirement flags.-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<Requirements>CREATORDeprecated.static intDEVICE_CHARGINGDeprecated.Requirement that the device is charging.static intDEVICE_IDLEDeprecated.Requirement that the device is idle.static intDEVICE_STORAGE_NOT_LOWDeprecated.Requirement that the device's internal storage is not low.static intNETWORKDeprecated.Requirement that the device has network connectivity.static intNETWORK_UNMETEREDDeprecated.Requirement that the device has a network connection that is unmetered.-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Constructor Description Requirements(@com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int requirements)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancheckRequirements(Context context)Deprecated.Returns whether the requirements are met.intdescribeContents()Deprecated.booleanequals(Object o)Deprecated.RequirementsfilterRequirements(int requirementsFilter)Deprecated.Filters the requirements, returning the subset that are enabled by the provided filter.@com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags intgetNotMetRequirements(Context context)Deprecated.Returns requirements that are not met, or 0.@com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags intgetRequirements()Deprecated.Returns the requirements.inthashCode()Deprecated.booleanisChargingRequired()Deprecated.Returns whether the device is required to be charging.booleanisIdleRequired()Deprecated.Returns whether the device is required to be idle.booleanisNetworkRequired()Deprecated.Returns whether network connectivity is required.booleanisStorageNotLowRequired()Deprecated.Returns whether the device is required to not be low on internal storage.booleanisUnmeteredNetworkRequired()Deprecated.Returns whether un-metered network connectivity is required.voidwriteToParcel(Parcel dest, int flags)Deprecated.
-
-
-
Field Detail
-
NETWORK
public static final int NETWORK
Deprecated.Requirement that the device has network connectivity.- See Also:
- Constant Field Values
-
NETWORK_UNMETERED
public static final int NETWORK_UNMETERED
Deprecated.Requirement that the device has a network connection that is unmetered.- See Also:
- Constant Field Values
-
DEVICE_IDLE
public static final int DEVICE_IDLE
Deprecated.Requirement that the device is idle.- See Also:
- Constant Field Values
-
DEVICE_CHARGING
public static final int DEVICE_CHARGING
Deprecated.Requirement that the device is charging.- See Also:
- Constant Field Values
-
DEVICE_STORAGE_NOT_LOW
public static final int DEVICE_STORAGE_NOT_LOW
Deprecated.Requirement that the device's internal storage is not low. Note that this requirement is not affected by the status of external storage.- See Also:
- Constant Field Values
-
CREATOR
public static final Parcelable.Creator<Requirements> CREATOR
Deprecated.
-
-
Constructor Detail
-
Requirements
public Requirements(@RequirementFlags @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int requirements)
Deprecated.- Parameters:
requirements- A combination of requirement flags.
-
-
Method Detail
-
getRequirements
@RequirementFlags public @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int getRequirements()
Deprecated.Returns the requirements.
-
filterRequirements
public Requirements filterRequirements(int requirementsFilter)
Deprecated.Filters the requirements, returning the subset that are enabled by the provided filter.- Parameters:
requirementsFilter- The enabledRequirements.RequirementFlags.- Returns:
- The filtered requirements. If the filter does not cause a change in the requirements then this instance will be returned.
-
isNetworkRequired
public boolean isNetworkRequired()
Deprecated.Returns whether network connectivity is required.
-
isUnmeteredNetworkRequired
public boolean isUnmeteredNetworkRequired()
Deprecated.Returns whether un-metered network connectivity is required.
-
isChargingRequired
public boolean isChargingRequired()
Deprecated.Returns whether the device is required to be charging.
-
isIdleRequired
public boolean isIdleRequired()
Deprecated.Returns whether the device is required to be idle.
-
isStorageNotLowRequired
public boolean isStorageNotLowRequired()
Deprecated.Returns whether the device is required to not be low on internal storage.
-
checkRequirements
public boolean checkRequirements(Context context)
Deprecated.Returns whether the requirements are met.- Parameters:
context- Any context.- Returns:
- Whether the requirements are met.
-
getNotMetRequirements
@RequirementFlags public @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int getNotMetRequirements(Context context)
Deprecated.Returns requirements that are not met, or 0.- Parameters:
context- Any context.- Returns:
- The requirements that are not met, or 0.
-
describeContents
public int describeContents()
Deprecated.- Specified by:
describeContentsin interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
Deprecated.- Specified by:
writeToParcelin interfaceParcelable
-
-