-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Build Tools / SDK / Kotlin #249
Conversation
@@ -38,6 +39,7 @@ class RecordAudioPresenter( | |||
private val mediaTransformer: MediaTransformer | |||
) : TransformationPresenter(context, mediaTransformer) { | |||
|
|||
@SuppressLint("MissingPermission") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is demo app code, I thought I would just suppress the warning rather than doing all the plumbing to expose the required permission. In prod code, the MediaSource correctly exposes this and the consumer can handle it accordingly.
@@ -31,6 +32,7 @@ class RecordCameraPresenter( | |||
private val mediaTransformer: MediaTransformer | |||
) : TransformationPresenter(context, mediaTransformer) { | |||
|
|||
@SuppressLint("MissingPermission") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is demo app code, I thought I would just suppress the warning rather than doing all the plumbing to expose the required permission. In prod code, the MediaSource correctly exposes this and the consumer can handle it accordingly.
@RequiresApi(Build.VERSION_CODES.LOLLIPOP) | ||
fun getDisplaySmartSize(display: Display): SmartSize { | ||
val outPoint = Point() | ||
display.getRealSize(outPoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is deprecated. Since it was only there to handle devices with "smaller than 1080p screens" and is only demo app code, I decided to simplify the code and just remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I started looking into fleshing out CameraX support but found when adding the dependency, there was a miss-match of kotlin version that reported warnings. I then went down a rabbit hole to see what would be required to upgrade. These were the changes I ended up making, so thought I would raise a PR for consideration. This also includes some fixes for the warnings coming identified by the upgraded build tools.
This change includes: