Search in sources :

Example 1 with CallSuper

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);
}
Also used : TypedArray(android.content.res.TypedArray) CallSuper(androidx.annotation.CallSuper)

Example 2 with CallSuper

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();
}
Also used : TypedArray(android.content.res.TypedArray) CallSuper(androidx.annotation.CallSuper)

Example 3 with CallSuper

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);
}
Also used : IdlingResource(androidx.test.espresso.IdlingResource) TestActivity(com.yarolegovich.discretescrollview.context.TestActivity) Before(org.junit.Before) CallSuper(androidx.annotation.CallSuper)

Example 4 with CallSuper

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;
}
Also used : ByteBuffer(java.nio.ByteBuffer) CallSuper(androidx.annotation.CallSuper)

Example 5 with CallSuper

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;
    }
}
Also used : DrmInitData(com.google.android.exoplayer2.drm.DrmInitData) SchemeData(com.google.android.exoplayer2.drm.DrmInitData.SchemeData) CallSuper(androidx.annotation.CallSuper)

Aggregations

CallSuper (androidx.annotation.CallSuper)29 Bundle (android.os.Bundle)5 Nullable (androidx.annotation.Nullable)5 FragmentActivity (androidx.fragment.app.FragmentActivity)4 SuppressLint (android.annotation.SuppressLint)3 View (android.view.View)3 IntentFilter (android.content.IntentFilter)2 TypedArray (android.content.res.TypedArray)2 Paint (android.graphics.Paint)2 TextView (android.widget.TextView)2 Format (com.google.android.exoplayer2.Format)2 DecoderReuseEvaluation (com.google.android.exoplayer2.decoder.DecoderReuseEvaluation)2 FlexibleViewHolder (eu.davidea.viewholders.FlexibleViewHolder)2 BaseRegistrationViewModel (org.thoughtcrime.securesms.registration.viewmodel.BaseRegistrationViewModel)2 ColorStateList (android.content.res.ColorStateList)1 Resources (android.content.res.Resources)1 StateListDrawable (android.graphics.drawable.StateListDrawable)1 MediaFormat (android.media.MediaFormat)1 InputType (android.text.InputType)1 EditorInfo (android.view.inputmethod.EditorInfo)1