-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Connect SDK] Add camera support to the Connect SDK (#9607)
* Initial camera implementation # Conflicts: # connect-example/src/main/java/com/stripe/android/connect/example/ui/features/payouts/PayoutsExampleActivity.kt # connect/src/main/java/com/stripe/android/connect/PayoutsView.kt # Conflicts: # connect/src/main/java/com/stripe/android/connect/PayoutsView.kt # connect/src/main/java/com/stripe/android/connect/webview/StripeConnectWebViewClient.kt # Conflicts: # connect-example/src/main/java/com/stripe/android/connect/example/ui/features/payouts/PayoutsExampleActivity.kt # connect/src/main/java/com/stripe/android/connect/EmbeddedComponentManager.kt # connect/src/main/java/com/stripe/android/connect/PayoutsView.kt * Update request code * Update example activity * Refactor permission, handle within manager * Fix leftover merge conflicts # Conflicts: # connect/src/main/java/com/stripe/android/connect/webview/StripeConnectWebViewContainer.kt * WIP * Fix merge * Fix build issues * fix activity * Fix suspend function * refactor with activity oncreate * Show promo badge in bank form (#9734) * Show promo badge in bank form * Address code review feedback Fix layout issue with super-long bank name and validate with screenshot test. * Add Embedded Appearance params to AppearanceBottomSheetDialogFragment (#9727) * Add Embedded Appearance params to AppearanceBottomSheetDialogFragment * [MOBILESDK-2480]update text style for bacs secondary button type (#9745) * update text style for bacs secondary button type * screenshots for screenshot tests * Apply suggestions from code review Capitalize comment and add period Co-authored-by: Bella Koch <160939932+amk-stripe@users.noreply.github.com> * crypto payment method (#9753) * Better handle process death for all confirmation flow cases in `DefaultConfirmationHandler` (#9754) * Fix lints, remove unneeded cancellation function * Add tests * Fix tests * Add/fix logging * Fix lint from log line * Fix main thread * Update connect/src/main/java/com/stripe/android/connect/webview/StripeConnectWebViewContainer.kt Co-authored-by: lng-stripe <91862945+lng-stripe@users.noreply.github.com> * Update connect/src/main/java/com/stripe/android/connect/EmbeddedComponentManager.kt Co-authored-by: lng-stripe <91862945+lng-stripe@users.noreply.github.com> * unsupported behavior to log warning * Fix docstrings * Update crashing behavior for camera permission request * Move functions around for clarity * Update tests * Update and fix tests * Fix detekt lints * Fix main activity * Remove unnecessary fragment, move logger out of constructor * Clean up lib restriction * Remove unnecessary unconfined test dispatcher * Update api * Lint fixes --------- Co-authored-by: Till Hellmund <tillh@stripe.com> Co-authored-by: tjclawson-stripe <163896025+tjclawson-stripe@users.noreply.github.com> Co-authored-by: Tian Zhao <tianzhao@stripe.com> Co-authored-by: Bella Koch <160939932+amk-stripe@users.noreply.github.com> Co-authored-by: ericzhang-stripe <94195995+ericzhang-stripe@users.noreply.github.com> Co-authored-by: Samer Alabi <141707240+samer-stripe@users.noreply.github.com> Co-authored-by: lng-stripe <91862945+lng-stripe@users.noreply.github.com>
- Loading branch information
1 parent
82489c2
commit 3d66b3c
Showing
12 changed files
with
360 additions
and
61 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
|
||
<uses-permission android:name="android.permission.CAMERA"/> | ||
<uses-feature android:name="android.hardware.camera" android:required="false" /> | ||
</manifest> |
28 changes: 0 additions & 28 deletions
28
connect/src/main/java/com/stripe/android/connect/AccountOnboardingFragment.kt
This file was deleted.
Oops, something went wrong.
This file contains 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 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
16 changes: 16 additions & 0 deletions
16
connect/src/main/java/com/stripe/android/connect/util/CoreUtils.kt
This file contains 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,16 @@ | ||
package com.stripe.android.connect.util | ||
|
||
import android.app.Activity | ||
import android.content.Context | ||
import android.content.ContextWrapper | ||
|
||
/** | ||
* Returns the [Activity] that this [Context] is attached to, or null if none. | ||
*/ | ||
internal fun Context.findActivity(): Activity? { | ||
return when (this) { | ||
is Activity -> this | ||
is ContextWrapper -> baseContext.findActivity() | ||
else -> null | ||
} | ||
} |
This file contains 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.