-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[camera_android_camerax] Updates internal API wrapper to use ProxyApis #8618
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
Merged
Merged
Changes from all commits
Commits
Show all changes
167 commits
Select commit
Hold shift + click to select a range
7990d35
add kotlin
bparrishMines 849f149
add copyright
bparrishMines f54d5d9
some work towards
bparrishMines fe63e89
rest of non persmission and system stuff for pigeon
bparrishMines bbe060f
compiling
bparrishMines a131960
compiling
bparrishMines 8d3664a
change dependencies
bparrishMines 1f93a1e
some progress
bparrishMines bdf0460
finish on system api update
bparrishMines 65de5b9
finish platform implementation
bparrishMines ee8adb5
add missing java classes
bparrishMines 2b553ef
some of the classes
bparrishMines e4ab7bc
most of the api implementations
bparrishMines 2d85644
finish java api implementations
bparrishMines 52e4145
remove other implementations
bparrishMines 4f05e1d
more java cleanup
bparrishMines c07b09a
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines 5bf75b8
formatting
bparrishMines 575a496
code builds again
bparrishMines 475d465
fix setup
bparrishMines 696454d
temporary work for value
bparrishMines 7bf4991
proxy for setup generics
bparrishMines 9530050
update proxy
bparrishMines 5d39444
java test files and update library
bparrishMines ac5394c
add setup generics
bparrishMines 6b33f06
default mocks for proxy
bparrishMines 9537145
fix test lints
bparrishMines e43984c
passing tests
bparrishMines 66773c3
change tests to set the proxy
bparrishMines 5e5fb5d
3rd test
bparrishMines b07d8b5
tests broken
bparrishMines 62f2426
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines 1c40c4e
fix preview
bparrishMines e2d6d25
fix third test
bparrishMines 79598e7
semi fix test
bparrishMines 1a7c9c8
change how comments are
bparrishMines 8f94c8e
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines add672d
Merge branch 'camerax_proxy' of github.com:bparrishMines/packages int…
bparrishMines 418e5b0
fix test
bparrishMines 0427fa9
another test
bparrishMines 0a8841b
another test
bparrishMines 14007a8
improve another test
bparrishMines 38ad55e
remove unused methods
bparrishMines 2c09d11
another test
bparrishMines e76bcaf
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines 0525d53
another test
bparrishMines 6ba035e
another test
bparrishMines bf12f84
more passing tests
bparrishMines 1b1e183
fix systerm service test
bparrishMines b22548e
18 out of 91 tests
bparrishMines 0010bad
21 tests
bparrishMines c674290
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines 4857bf1
22 tests
bparrishMines f0247d0
23
bparrishMines 01e5f28
25
bparrishMines 1f4c594
29
bparrishMines bb0166b
34
bparrishMines 6ff4f08
40
bparrishMines 9248b1f
47
bparrishMines bcfffc7
50
bparrishMines 28fef62
55 tests passing
bparrishMines b1699e7
fix first exposure test
bparrishMines f71f535
second exposure test
bparrishMines be5fd35
test 60
bparrishMines 7c248bb
63 tests
bparrishMines 5bbb31e
first focus test
bparrishMines 02a152a
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines 51aa98e
67 tests
bparrishMines 7b34e55
71 tests
bparrishMines 6e7fc93
failing test still
bparrishMines 28e9535
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines 9d2c860
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines e54975e
test
bparrishMines 53fb961
more tests fixed
bparrishMines 5d994ea
84 tests
bparrishMines 7d8c3b5
finish all dart unit tests
bparrishMines 1f1f31d
fix analysis errors
bparrishMines c70f4d4
fix all analysis errors
bparrishMines ee2d959
fix dart file names
bparrishMines 61e0626
fix platform side with a few missing stuff
bparrishMines 7555588
fix request options
bparrishMines 18b2310
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines b626999
fixes
bparrishMines 744138b
formatting
bparrishMines 5582bbb
one java test done
bparrishMines 2164d40
move
bparrishMines b4482a3
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines 9fd4f86
add mockito
bparrishMines 3c82486
formatting and fix tests
bparrishMines 78ee70f
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines b3a84b6
camera2cameracontrol test
bparrishMines d16b24a
camera2camera info test
bparrishMines 979993b
add static method tests
bparrishMines 4afd975
plugin tests
bparrishMines 2fedfda
cameracontrol tests
bparrishMines 0886ff1
camerainfo test
bparrishMines 703f176
range tests
bparrishMines 03cbebe
test class override
bparrishMines 3b5722c
more tests
bparrishMines cfd8cac
camera selector test
bparrishMines 646fcd5
more more tests
bparrishMines fd07800
capture request optiosn
bparrishMines 424456e
formatting
bparrishMines 7f48551
device orientation api test
bparrishMines a34228d
2 more tests
bparrishMines 4410f79
focusmetering tests
bparrishMines fb912b8
image analysis
bparrishMines 503aea9
image capture tests
bparrishMines 2a48433
image capture test
bparrishMines 542cd06
live data
bparrishMines 50eb131
metering point tests
bparrishMines 2f8e3c2
pending recording
bparrishMines 6e21dba
start of preview tests
bparrishMines a3b5dcb
preview test
bparrishMines d02456f
process camera tests
bparrishMines fc23510
quality selector
bparrishMines 0ab8585
recorder tests
bparrishMines 395e768
resolution filter and recording
bparrishMines 8691de4
more java tests
bparrishMines 8a904b3
create camerapermissions error
bparrishMines ade6c52
system services manager test
bparrishMines 515db6d
rest of java tests
bparrishMines 1605146
version bump
bparrishMines d555f3a
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines b675d18
fix tests
bparrishMines 712225f
add licenses
bparrishMines 637fc60
fixup java tests
bparrishMines c544f32
remove unused code
bparrishMines ae792fa
add UnsafeOptInUsageError suppress
bparrishMines 2c55484
synthetic accessor lint
bparrishMines fd23cfe
nonnull
bparrishMines 7ce2e64
more nonnull
bparrishMines 5dc41af
last one
bparrishMines a202ba2
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines 77688e4
fix imports and device orientation controller
bparrishMines 986718e
fix rotation tests
bparrishMines d5ac8a5
lints
bparrishMines 163f41f
formatting
bparrishMines 949afb7
use a single previewproxyapi
bparrishMines 0a616aa
better comments
bparrishMines 5ef7811
remove unused vars
bparrishMines c1f12a3
switch to onSurfaceCleanup
bparrishMines 83d6ad3
review comments
bparrishMines 496b79a
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines bd4cf2f
fix remove and use get
bparrishMines 7aa02b6
added suppress for generated kotlin
bparrishMines 79d230e
bump dart
bparrishMines ffd3a45
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines 631bcc0
switch back to cleanup
bparrishMines d43749a
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines d7ea161
change to pigeonInstance
bparrishMines 190a2b0
maybe weird formatting
bparrishMines 892b96e
uncomment
bparrishMines 5036d74
add expected pattern to tests
bparrishMines 7e927fc
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines a539d65
formatting
bparrishMines c5ae202
throw exception on error
bparrishMines 177339d
fix permission unit test
bparrishMines 0a42540
change ignore to true
bparrishMines 9eb2270
Merge branch 'main' of github.com:flutter/packages into camerax_proxy
bparrishMines d63078b
add docs for systemservices
bparrishMines 9100a9c
log error on failed flutter method
bparrishMines 5954729
unused method
bparrishMines e627829
improve example and add comment
bparrishMines 3c6529c
fix syntheticaccessor lint
bparrishMines 44f9113
surface missing cameracontrol errors
bparrishMines a8327d1
also try catch turning torch mode off
bparrishMines 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
74 changes: 0 additions & 74 deletions
74
...roid_camerax/android/src/main/java/io/flutter/plugins/camerax/AnalyzerFlutterApiImpl.java
This file was deleted.
Oops, something went wrong.
119 changes: 0 additions & 119 deletions
119
...android_camerax/android/src/main/java/io/flutter/plugins/camerax/AnalyzerHostApiImpl.java
This file was deleted.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
...ra_android_camerax/android/src/main/java/io/flutter/plugins/camerax/AnalyzerProxyApi.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,64 @@ | ||
// 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.camerax; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.camera.core.ImageAnalysis.Analyzer; | ||
import java.util.Objects; | ||
|
||
/** | ||
* ProxyApi implementation for {@link Analyzer}. This class may handle instantiating native object | ||
* instances that are attached to a Dart instance or handle method calls on the associated native | ||
* class or an instance of that class. | ||
*/ | ||
class AnalyzerProxyApi extends PigeonApiAnalyzer { | ||
AnalyzerProxyApi(@NonNull ProxyApiRegistrar pigeonRegistrar) { | ||
super(pigeonRegistrar); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public ProxyApiRegistrar getPigeonRegistrar() { | ||
return (ProxyApiRegistrar) super.getPigeonRegistrar(); | ||
} | ||
|
||
/** Implementation of {@link Analyzer} that passes arguments of callback methods to Dart. */ | ||
static class AnalyzerImpl implements Analyzer { | ||
final AnalyzerProxyApi api; | ||
|
||
AnalyzerImpl(@NonNull AnalyzerProxyApi api) { | ||
this.api = api; | ||
} | ||
|
||
@Override | ||
public void analyze(@NonNull androidx.camera.core.ImageProxy image) { | ||
api.getPigeonRegistrar() | ||
.runOnMainThread( | ||
new ProxyApiRegistrar.FlutterMethodRunnable() { | ||
@Override | ||
public void run() { | ||
api.analyze( | ||
AnalyzerImpl.this, | ||
image, | ||
ResultCompat.asCompatCallback( | ||
result -> { | ||
if (result.isFailure()) { | ||
onFailure( | ||
"Analyzer.analyze", | ||
Objects.requireNonNull(result.exceptionOrNull())); | ||
} | ||
return null; | ||
})); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public Analyzer pigeon_defaultConstructor() { | ||
return new AnalyzerImpl(this); | ||
} | ||
} |
65 changes: 0 additions & 65 deletions
65
...erax/android/src/main/java/io/flutter/plugins/camerax/AspectRatioStrategyHostApiImpl.java
This file was deleted.
Oops, something went wrong.
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.