Skip to content

Commit

Permalink
List of included changes:
Browse files Browse the repository at this point in the history
  - Add query permission for IMAGE_CAPTURE in vision samples

PiperOrigin-RevId: 369548429
Change-Id: I328b2c03e33d0a643782a1f853fa17bb85a2e55a
  • Loading branch information
Google ML Kit authored and Chenxi Song committed Apr 26, 2021
1 parent 7c71153 commit 550cf97
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions android/automl/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ repositories {

dependencies {
// Image labeling with AutoML model support
implementation 'com.google.mlkit:image-labeling-custom:16.3.0'
implementation 'com.google.mlkit:object-detection-custom:16.3.0'
implementation 'com.google.mlkit:image-labeling-custom:16.3.1'
implementation 'com.google.mlkit:object-detection-custom:16.3.1'
implementation 'com.google.mlkit:linkfirebase:16.1.0'

implementation 'androidx.multidex:multidex:2.0.1'
Expand Down
6 changes: 5 additions & 1 deletion android/automl/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,9 @@
android:exported="false"/>

</application>

<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,6 @@ protected void onLayout(boolean changed, int left, int top, int right, int botto
getChildAt(i).layout(0, 0, childWidth, childHeight);
Log.d(TAG, "Assigned view: " + i);
}

try {
startIfReady();
} catch (IOException e) {
Log.e(TAG, "Could not start camera source.", e);
}
}

private boolean isPortraitMode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public synchronized void draw(Canvas canvas) {
float y = TEXT_SIZE * 1.5f;

canvas.drawText(
"InputImage size: " + overlay.getImageWidth() + "x" + overlay.getImageHeight(),
"InputImage size: " + overlay.getImageHeight() + "x" + overlay.getImageWidth(),
x,
y,
textPaint);
Expand Down

0 comments on commit 550cf97

Please sign in to comment.