Java Code Examples for com.google.android.exoplayer2.util.Util#nullSafeArrayConcatenation()
The following examples show how to use
com.google.android.exoplayer2.util.Util#nullSafeArrayConcatenation() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DrmInitData.java From MediaSDK with Apache License 2.0 | 5 votes |
/** * Returns an instance containing the {@link #schemeDatas} from both this and {@code other}. The * {@link #schemeType} of the instances being merged must either match, or at least one scheme * type must be {@code null}. * * @param drmInitData The instance to merge. * @return The merged result. */ public DrmInitData merge(DrmInitData drmInitData) { Assertions.checkState( schemeType == null || drmInitData.schemeType == null || TextUtils.equals(schemeType, drmInitData.schemeType)); String mergedSchemeType = schemeType != null ? this.schemeType : drmInitData.schemeType; SchemeData[] mergedSchemeDatas = Util.nullSafeArrayConcatenation(schemeDatas, drmInitData.schemeDatas); return new DrmInitData(mergedSchemeType, mergedSchemeDatas); }
Example 2
Source File: Metadata.java From MediaSDK with Apache License 2.0 | 5 votes |
/** * Returns a copy of this metadata with the specified entries appended. * * @param entriesToAppend The entries to append. * @return The metadata instance with the appended entries. */ public Metadata copyWithAppendedEntries(Entry... entriesToAppend) { if (entriesToAppend.length == 0) { return this; } return new Metadata(Util.nullSafeArrayConcatenation(entries, entriesToAppend)); }
Example 3
Source File: DrmInitData.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
/** * Returns an instance containing the {@link #schemeDatas} from both this and {@code other}. The * {@link #schemeType} of the instances being merged must either match, or at least one scheme * type must be {@code null}. * * @param drmInitData The instance to merge. * @return The merged result. */ public DrmInitData merge(DrmInitData drmInitData) { Assertions.checkState( schemeType == null || drmInitData.schemeType == null || TextUtils.equals(schemeType, drmInitData.schemeType)); String mergedSchemeType = schemeType != null ? this.schemeType : drmInitData.schemeType; SchemeData[] mergedSchemeDatas = Util.nullSafeArrayConcatenation(schemeDatas, drmInitData.schemeDatas); return new DrmInitData(mergedSchemeType, mergedSchemeDatas); }
Example 4
Source File: DrmInitData.java From Telegram with GNU General Public License v2.0 | 5 votes |
/** * Returns an instance containing the {@link #schemeDatas} from both this and {@code other}. The * {@link #schemeType} of the instances being merged must either match, or at least one scheme * type must be {@code null}. * * @param drmInitData The instance to merge. * @return The merged result. */ public DrmInitData merge(DrmInitData drmInitData) { Assertions.checkState( schemeType == null || drmInitData.schemeType == null || TextUtils.equals(schemeType, drmInitData.schemeType)); String mergedSchemeType = schemeType != null ? this.schemeType : drmInitData.schemeType; SchemeData[] mergedSchemeDatas = Util.nullSafeArrayConcatenation(schemeDatas, drmInitData.schemeDatas); return new DrmInitData(mergedSchemeType, mergedSchemeDatas); }