androidx.annotation.RestrictTo.Scope Java Examples
The following examples show how to use
androidx.annotation.RestrictTo.Scope.
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: VideoCapture.java From mollyim-android with GNU General Public License v3.0 | 6 votes |
/** * {@inheritDoc} * * @hide */ @RestrictTo(Scope.LIBRARY_GROUP) @Override public void clear() { mVideoHandlerThread.quitSafely(); // audio encoder release mAudioHandlerThread.quitSafely(); if (mAudioEncoder != null) { mAudioEncoder.release(); mAudioEncoder = null; } if (mAudioRecorder != null) { mAudioRecorder.release(); mAudioRecorder = null; } if (mCameraSurface != null) { releaseCameraSurface(true); } super.clear(); }
Example #2
Source File: VideoCapture.java From mollyim-android with GNU General Public License v3.0 | 5 votes |
/** * {@inheritDoc} * * @hide */ @Override @Nullable @RestrictTo(Scope.LIBRARY_GROUP) protected UseCaseConfig.Builder<?, ?, ?> getDefaultBuilder(@Nullable CameraInfo cameraInfo) { VideoCaptureConfig defaults = CameraX.getDefaultUseCaseConfig(VideoCaptureConfig.class, cameraInfo); if (defaults != null) { return VideoCaptureConfig.Builder.fromConfig(defaults); } return null; }
Example #3
Source File: VideoCapture.java From mollyim-android with GNU General Public License v3.0 | 5 votes |
/** * {@inheritDoc} * * @hide */ @Override @RestrictTo(Scope.LIBRARY_GROUP) @NonNull protected Map<String, Size> onSuggestedResolutionUpdated( @NonNull Map<String, Size> suggestedResolutionMap) { if (mCameraSurface != null) { mVideoEncoder.stop(); mVideoEncoder.release(); mAudioEncoder.stop(); mAudioEncoder.release(); releaseCameraSurface(false); } try { mVideoEncoder = MediaCodec.createEncoderByType(VIDEO_MIME_TYPE); mAudioEncoder = MediaCodec.createEncoderByType(AUDIO_MIME_TYPE); } catch (IOException e) { throw new IllegalStateException("Unable to create MediaCodec due to: " + e.getCause()); } String cameraId = getBoundCameraId(); Size resolution = suggestedResolutionMap.get(cameraId); if (resolution == null) { throw new IllegalArgumentException( "Suggested resolution map missing resolution for camera " + cameraId); } setupEncoder(cameraId, resolution); return suggestedResolutionMap; }
Example #4
Source File: ShapeAppearancePathProvider.java From material-components-android with Apache License 2.0 | 5 votes |
/** * Writes the given {@link ShapeAppearanceModel} to {@code path} * * @param shapeAppearanceModel The shape to be applied in the path. * @param interpolation the desired interpolation. * @param bounds the desired bounds for the path. * @param pathListener the path * @param path the returned path out-var. */ @RestrictTo(Scope.LIBRARY_GROUP) public void calculatePath( ShapeAppearanceModel shapeAppearanceModel, float interpolation, RectF bounds, PathListener pathListener, @NonNull Path path) { path.rewind(); overlappedEdgePath.rewind(); boundsPath.rewind(); boundsPath.addRect(bounds, Direction.CW); ShapeAppearancePathSpec spec = new ShapeAppearancePathSpec( shapeAppearanceModel, interpolation, bounds, pathListener, path); // Calculate the transformations (rotations and translations) necessary for each edge and // corner treatment. for (int index = 0; index < 4; index++) { setCornerPathAndTransform(spec, index); setEdgePathAndTransform(index); } for (int index = 0; index < 4; index++) { appendCornerPath(spec, index); appendEdgePath(spec, index); } path.close(); overlappedEdgePath.close(); // Union with the edge paths that had an intersection to handle overlaps. if (VERSION.SDK_INT >= VERSION_CODES.KITKAT && !overlappedEdgePath.isEmpty()) { path.op(overlappedEdgePath, Op.UNION); } }
Example #5
Source File: ScanHelper.java From android-beacon-library with Apache License 2.0 | 4 votes |
@RestrictTo(Scope.TESTS) CycledLeScanCallback getCycledLeScanCallback() { return mCycledLeScanCallback; }
Example #6
Source File: BeaconService.java From android-beacon-library with Apache License 2.0 | 4 votes |
@RestrictTo(Scope.TESTS) protected CycledLeScanCallback getCycledLeScanCallback() { return mScanHelper.getCycledLeScanCallback(); }
Example #7
Source File: RunningAverageRssiFilter.java From android-beacon-library with Apache License 2.0 | 4 votes |
@RestrictTo(Scope.TESTS) static long getSampleExpirationMilliseconds() { return sampleExpirationMilliseconds; }
Example #8
Source File: CameraXView.java From mollyim-android with GNU General Public License v3.0 | 2 votes |
/** * Returns the maximum duration of videos, or {@link #INDEFINITE_VIDEO_DURATION} if there is no * timeout. * * @hide Not currently implemented. */ @RestrictTo(Scope.LIBRARY_GROUP) public long getMaxVideoDuration() { return mCameraModule.getMaxVideoDuration(); }