forcedotcom / SalesforceMobileSDK-Android

Android SDK for Salesforce
Other
339 stars 384 forks source link

Fix server picker issues with native login fallback to web based auth. #2548

Closed brandonpage closed 2 months ago

brandonpage commented 2 months ago

Because of the new CLEAR_TOP flag we should explicitly use the Webview Login Activity Class when switching servers to avoid accidentally dismissing the webview activity.

I was tempted to convert ServerPickerActivity to Kotlin instead of making webviewLoginActivityClass public as it isn't much work. However, customers can extend ServerPickerActivity and since a lot of it is Java public or protected we would need to carefully consider the external interface before and after. I think it makes more sense to evaluate what the interface should be (which has not been done for may years), make deprecations if necessary and convert it in 13.0.

mobilesdk-bot commented 2 months ago
2 Warnings
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.kt#L1440 - Do not place Android context classes in static fields (static reference to SalesforceSDKManager which has field context pointing to Context); this is a memory leak
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/ServerPickerActivity.java#L261 - The indentation string here is different from on the previous line (" " vs \t)

Tests results for SalesforceSDK

Generated by :no_entry_sign: Danger