This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[camera] android-rework part 5: Android FPS range, resolution and sensor orientation features #3799
Merged
fluttergithubbot
merged 26 commits into
flutter:master
from
Baseflow:camera-android/fps_resolution_sensor_features
Jun 22, 2021
Merged
Changes from 10 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
2b7aa9b
Base classes to support Android camera features
mvanbeusekom f780742
Fixed formatting
mvanbeusekom 76bc5bd
Applied feedback from PR
mvanbeusekom 0bbed99
Added Android FPS range, resolution and sensor orientation features
mvanbeusekom 1ba738d
Use mockito-inline
mvanbeusekom de4e70f
Merge remote-tracking branch 'upstream/master' into camera-android/fp…
mvanbeusekom 728346a
Fix issue Pixel 4A
mvanbeusekom c014fe3
Merge remote-tracking branch 'upstream/master' into camera-android/fp…
mvanbeusekom 84f5e73
Added API documentation
mvanbeusekom f763f77
Processed feedback on PR
mvanbeusekom 4a7c73a
Fix formatting
mvanbeusekom a890919
Fix formatting
mvanbeusekom 55a6702
Only exclude 60 FPS limit for Pixel 4a
mvanbeusekom cd53321
Removed redundant empty line
mvanbeusekom 35831d3
Fixed comment
mvanbeusekom a9f3142
Test Pixel 4a workaround
mvanbeusekom 551800e
Add tests for orientation updates
mvanbeusekom 68cbc56
Fix formatting
mvanbeusekom 1b137c2
Fix formatting
mvanbeusekom 6514a00
Added missing license header
mvanbeusekom 7f0180e
Accept cameraName as String
mvanbeusekom 24af367
Format
mvanbeusekom 8313dd0
Removed obsolete comment
mvanbeusekom a39c2e1
update method structure in class to a more logical order
mvanbeusekom 3eecfe9
Merge remote-tracking branch 'origin/master' into camera-android/fps_…
mvanbeusekom 7299b1d
Fix formatting
mvanbeusekom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...src/test/java/io/flutter/plugins/camera/features/fpsrange/FpsRangeFeaturePixel4aTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| package io.flutter.plugins.camera.features.fpsrange; | ||
|
|
||
| import static org.junit.Assert.assertEquals; | ||
| import static org.mockito.Mockito.mock; | ||
|
|
||
| import android.os.Build; | ||
| import android.util.Range; | ||
| import io.flutter.plugins.camera.CameraProperties; | ||
| import io.flutter.plugins.camera.utils.TestUtils; | ||
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.robolectric.RobolectricTestRunner; | ||
|
|
||
| @RunWith(RobolectricTestRunner.class) | ||
| public class FpsRangeFeaturePixel4aTest { | ||
| @Test | ||
| public void ctor_should_initialize_fps_range_with_30_when_device_is_pixel_4a() { | ||
| TestUtils.setFinalStatic(Build.class, "BRAND", "google"); | ||
| TestUtils.setFinalStatic(Build.class, "MODEL", "Pixel 4a"); | ||
|
|
||
| FpsRangeFeature fpsRangeFeature = new FpsRangeFeature(mock(CameraProperties.class)); | ||
| Range<Integer> range = fpsRangeFeature.getValue(); | ||
| assertEquals(30, (int) range.getLower()); | ||
| assertEquals(30, (int) range.getUpper()); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.