use of androidx.annotation.CallSuper in project AndroidPicker by gzu-liyujiang.
the class LinkageWheelLayout method onAttributeSet.
@CallSuper
@Override
protected void onAttributeSet(@NonNull Context context, @Nullable AttributeSet attrs) {
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.LinkageWheelLayout);
setFirstVisible(typedArray.getBoolean(R.styleable.LinkageWheelLayout_wheel_firstVisible, true));
setThirdVisible(typedArray.getBoolean(R.styleable.LinkageWheelLayout_wheel_thirdVisible, true));
String firstLabel = typedArray.getString(R.styleable.LinkageWheelLayout_wheel_firstLabel);
String secondLabel = typedArray.getString(R.styleable.LinkageWheelLayout_wheel_secondLabel);
String thirdLabel = typedArray.getString(R.styleable.LinkageWheelLayout_wheel_thirdLabel);
typedArray.recycle();
setLabel(firstLabel, secondLabel, thirdLabel);
}
use of androidx.annotation.CallSuper in project AndroidPicker by gzu-liyujiang.
the class OptionWheelLayout method onAttributeSet.
@CallSuper
@Override
protected void onAttributeSet(@NonNull Context context, @Nullable AttributeSet attrs) {
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.OptionWheelLayout);
labelView.setText(typedArray.getString(R.styleable.OptionWheelLayout_wheel_label));
typedArray.recycle();
}
use of androidx.annotation.CallSuper in project DiscreteScrollView by yarolegovich.
the class DiscreteScrollViewTest method setUp.
@Before
@CallSuper
public void setUp() {
TestActivity activity = testActivity.getActivity();
scrollView = activity.getScrollView();
adapter = testActivity.getActivity().getAdapter();
List<IdlingResource> resources = activity.getIdlingResources();
idlingResources = resources.toArray(new IdlingResource[resources.size()]);
IdlingRegistry.getInstance().register(idlingResources);
}
use of androidx.annotation.CallSuper in project ExoPlayer by google.
the class BaseAudioProcessor method getOutput.
@CallSuper
@Override
public ByteBuffer getOutput() {
ByteBuffer outputBuffer = this.outputBuffer;
this.outputBuffer = EMPTY_BUFFER;
return outputBuffer;
}
use of androidx.annotation.CallSuper in project ExoPlayer by google.
the class MatroskaExtractor method endMasterElement.
/**
* Called when the end of a master element is encountered.
*
* @see EbmlProcessor#endMasterElement(int)
*/
@CallSuper
protected void endMasterElement(int id) throws ParserException {
assertInitialized();
switch(id) {
case ID_SEGMENT_INFO:
if (timecodeScale == C.TIME_UNSET) {
// timecodeScale was omitted. Use the default value.
timecodeScale = 1000000;
}
if (durationTimecode != C.TIME_UNSET) {
durationUs = scaleTimecodeToUs(durationTimecode);
}
break;
case ID_SEEK:
if (seekEntryId == UNSET_ENTRY_ID || seekEntryPosition == C.POSITION_UNSET) {
throw ParserException.createForMalformedContainer("Mandatory element SeekID or SeekPosition not found", /* cause= */
null);
}
if (seekEntryId == ID_CUES) {
cuesContentPosition = seekEntryPosition;
}
break;
case ID_CUES:
if (!sentSeekMap) {
extractorOutput.seekMap(buildSeekMap(cueTimesUs, cueClusterPositions));
sentSeekMap = true;
} else {
// We have already built the cues. Ignore.
}
this.cueTimesUs = null;
this.cueClusterPositions = null;
break;
case ID_BLOCK_GROUP:
if (blockState != BLOCK_STATE_DATA) {
// We've skipped this block (due to incompatible track number).
return;
}
// Commit sample metadata.
int sampleOffset = 0;
for (int i = 0; i < blockSampleCount; i++) {
sampleOffset += blockSampleSizes[i];
}
Track track = tracks.get(blockTrackNumber);
track.assertOutputInitialized();
for (int i = 0; i < blockSampleCount; i++) {
long sampleTimeUs = blockTimeUs + (i * track.defaultSampleDurationNs) / 1000;
int sampleFlags = blockFlags;
if (i == 0 && !blockHasReferenceBlock) {
// If the ReferenceBlock element was not found in this block, then the first frame is a
// keyframe.
sampleFlags |= C.BUFFER_FLAG_KEY_FRAME;
}
int sampleSize = blockSampleSizes[i];
// The offset is to the end of the sample.
sampleOffset -= sampleSize;
commitSampleToOutput(track, sampleTimeUs, sampleFlags, sampleSize, sampleOffset);
}
blockState = BLOCK_STATE_START;
break;
case ID_CONTENT_ENCODING:
assertInTrackEntry(id);
if (currentTrack.hasContentEncryption) {
if (currentTrack.cryptoData == null) {
throw ParserException.createForMalformedContainer("Encrypted Track found but ContentEncKeyID was not found", /* cause= */
null);
}
currentTrack.drmInitData = new DrmInitData(new SchemeData(C.UUID_NIL, MimeTypes.VIDEO_WEBM, currentTrack.cryptoData.encryptionKey));
}
break;
case ID_CONTENT_ENCODINGS:
assertInTrackEntry(id);
if (currentTrack.hasContentEncryption && currentTrack.sampleStrippedBytes != null) {
throw ParserException.createForMalformedContainer("Combining encryption and compression is not supported", /* cause= */
null);
}
break;
case ID_TRACK_ENTRY:
Track currentTrack = checkStateNotNull(this.currentTrack);
if (currentTrack.codecId == null) {
throw ParserException.createForMalformedContainer("CodecId is missing in TrackEntry element", /* cause= */
null);
} else {
if (isCodecSupported(currentTrack.codecId)) {
currentTrack.initializeOutput(extractorOutput, currentTrack.number);
tracks.put(currentTrack.number, currentTrack);
}
}
this.currentTrack = null;
break;
case ID_TRACKS:
if (tracks.size() == 0) {
throw ParserException.createForMalformedContainer("No valid tracks were found", /* cause= */
null);
}
extractorOutput.endTracks();
break;
default:
break;
}
}
Aggregations