Commit 0f90604
committed
fix: address PR review comments
- opt-in ExperimentalCamera2Interop to suppress lint UnsafeOptInUsageError
- MainActivity: fix String identity comparison (== -> .equals())
- CameraDemoActivity: add null guard for createVideoOutputPath() result;
guard getCameraProvider() NPE in onPause
- FileUtil: invalidate storagePath cache in init() to allow re-resolution
- PermissionUtil: only pass missing permissions to requestPermissions(),
not the full array
- CameraGLSurfaceView: make mCameraProvider volatile; synchronize
getCameraProvider(), setCameraProvider(), and setFlashMode(); forward
existing preview size to newly set provider
- CameraGLSurfaceView: fix deprecated focusAtPoint to pass actual Camera
instance instead of null to legacy AutoFocusCallback
- CameraGLSurfaceViewWithTexture: onSwitchCamera now checks
needsManualRotation() before applying PI/2 rotation so CameraX
preserves its own orientation handling
- Camera1Provider: replace hardcoded 90-degree JPEG rotation with
CameraInfo-derived rotation (handles front camera correctly)
- CameraXProvider: replace deprecated setTargetResolution() with
ResolutionSelector/ResolutionStrategy for Preview and ImageCapture
- CameraXProvider: move takePicture image conversion to background
executor to avoid blocking the main thread
- CameraXProvider: fix imageProxyToYuvImage to correctly copy Y plane
row-by-row using rowStride and build NV21 chroma using per-pixel
and per-row strides, fixing corrupted output when rowStride != width
- Pass EXTRA_CAMERA_API to all activities in MainActivity, not just
CameraDemoActivity, so FaceTrackingDemoActivity honours the user's
camera API selection
- Restore thread interrupt status in CameraXProvider.openCamera() when
catching InterruptedException to avoid silently discarding the signal
- Add TODO comment in values-v35/styles.xml noting that
windowOptOutEdgeToEdgeEnforcement is deprecated in API 36 and will
require proper insets handling when targeting Android 161 parent e89ce06 commit 0f90604
9 files changed
Lines changed: 151 additions & 57 deletions
File tree
- cgeDemo/src/main
- java/org/wysaid/cgeDemo
- res/values-v35
- library/src/main/java/org/wysaid
- camera
- myUtils
- view
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
| |||
531 | 537 | | |
532 | 538 | | |
533 | 539 | | |
534 | | - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
535 | 544 | | |
536 | 545 | | |
537 | 546 | | |
| |||
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
253 | 252 | | |
254 | 253 | | |
255 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
Lines changed: 40 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
144 | 178 | | |
145 | 179 | | |
146 | 180 | | |
| |||
152 | 186 | | |
153 | 187 | | |
154 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
155 | 192 | | |
156 | 193 | | |
157 | 194 | | |
158 | 195 | | |
159 | | - | |
| 196 | + | |
160 | 197 | | |
161 | 198 | | |
162 | 199 | | |
| |||
168 | 205 | | |
169 | 206 | | |
170 | 207 | | |
| 208 | + | |
171 | 209 | | |
172 | 210 | | |
173 | | - | |
| 211 | + | |
174 | 212 | | |
175 | 213 | | |
176 | 214 | | |
| |||
Lines changed: 55 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
| |||
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
111 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
112 | 122 | | |
| 123 | + | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
| |||
346 | 357 | | |
347 | 358 | | |
348 | 359 | | |
349 | | - | |
| 360 | + | |
350 | 361 | | |
351 | 362 | | |
352 | 363 | | |
353 | | - | |
| 364 | + | |
354 | 365 | | |
355 | 366 | | |
356 | 367 | | |
| |||
377 | 388 | | |
378 | 389 | | |
379 | 390 | | |
| 391 | + | |
380 | 392 | | |
381 | 393 | | |
382 | 394 | | |
| |||
391 | 403 | | |
392 | 404 | | |
393 | 405 | | |
394 | | - | |
395 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
396 | 412 | | |
397 | 413 | | |
398 | 414 | | |
399 | 415 | | |
400 | | - | |
401 | 416 | | |
402 | 417 | | |
403 | 418 | | |
| |||
432 | 447 | | |
433 | 448 | | |
434 | 449 | | |
435 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
436 | 456 | | |
437 | 457 | | |
438 | 458 | | |
| |||
492 | 512 | | |
493 | 513 | | |
494 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
495 | 519 | | |
496 | 520 | | |
497 | 521 | | |
| |||
503 | 527 | | |
504 | 528 | | |
505 | 529 | | |
506 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
507 | 534 | | |
508 | | - | |
509 | 535 | | |
510 | | - | |
511 | 536 | | |
512 | 537 | | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
| 538 | + | |
518 | 539 | | |
519 | | - | |
520 | | - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
521 | 545 | | |
522 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
523 | 549 | | |
524 | 550 | | |
| 551 | + | |
525 | 552 | | |
| 553 | + | |
526 | 554 | | |
527 | 555 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
539 | 563 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
| 564 | + | |
| 565 | + | |
547 | 566 | | |
548 | 567 | | |
549 | 568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
71 | | - | |
| 73 | + | |
72 | 74 | | |
73 | | - | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| |||
0 commit comments