|
1 | 1 | package com.braintreepayments.api; |
2 | 2 |
|
| 3 | +import android.app.Activity; |
3 | 4 | import android.content.ActivityNotFoundException; |
4 | 5 | import android.content.Context; |
5 | 6 | import android.content.Intent; |
6 | 7 | import android.net.Uri; |
7 | 8 |
|
8 | | -import androidx.activity.ComponentActivity; |
9 | 9 | import androidx.annotation.NonNull; |
10 | 10 | import androidx.annotation.VisibleForTesting; |
11 | 11 |
|
@@ -47,7 +47,7 @@ public BrowserSwitchClient() { |
47 | 47 | * or {@link BrowserSwitchStartResult.Failure} if browser could not be launched. |
48 | 48 | */ |
49 | 49 | @NonNull |
50 | | - public BrowserSwitchStartResult start(@NonNull ComponentActivity activity, @NonNull BrowserSwitchOptions browserSwitchOptions) { |
| 50 | + public BrowserSwitchStartResult start(@NonNull Activity activity, @NonNull BrowserSwitchOptions browserSwitchOptions) { |
51 | 51 | try { |
52 | 52 | assertCanPerformBrowserSwitch(activity, browserSwitchOptions); |
53 | 53 | } catch (BrowserSwitchException e) { |
@@ -92,7 +92,7 @@ public BrowserSwitchStartResult start(@NonNull ComponentActivity activity, @NonN |
92 | 92 | * @throws BrowserSwitchException exception containing the error message on why browser switch cannot be started |
93 | 93 | */ |
94 | 94 | public void assertCanPerformBrowserSwitch( |
95 | | - ComponentActivity activity, |
| 95 | + Activity activity, |
96 | 96 | BrowserSwitchOptions browserSwitchOptions |
97 | 97 | ) throws BrowserSwitchException { |
98 | 98 | Context appContext = activity.getApplicationContext(); |
@@ -127,7 +127,7 @@ private boolean isValidRequestCode(int requestCode) { |
127 | 127 | * @param intent the intent to return to your application containing a deep link result from the |
128 | 128 | * browser flow |
129 | 129 | * @param pendingRequest the pending request string returned from {@link BrowserSwitchStartResult.Started} via |
130 | | - * {@link BrowserSwitchClient#start(ComponentActivity, BrowserSwitchOptions)} |
| 130 | + * {@link BrowserSwitchClient#start(Activity, BrowserSwitchOptions)} |
131 | 131 | * @return a {@link BrowserSwitchFinalResult.Success} if the browser switch was successfully |
132 | 132 | * completed, or {@link BrowserSwitchFinalResult.NoResult} if no result can be found for the given |
133 | 133 | * pending request String. A {@link BrowserSwitchFinalResult.NoResult} will be |
|
0 commit comments