Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e70cd30
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Nov 25, 2025
7a8b818
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 3, 2025
a006c08
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 4, 2025
ed1466d
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 4, 2025
c9b2f83
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 4, 2025
5859c8a
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 4, 2025
0866e4b
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 5, 2025
5899f31
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 5, 2025
4c9cfb9
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 5, 2025
e59b289
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 8, 2025
1a0db42
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 8, 2025
2901a42
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 8, 2025
fd1c55a
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 9, 2025
8aeb580
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 9, 2025
5afb6d5
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 9, 2025
da3a8d8
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 9, 2025
c896421
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 9, 2025
095f007
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 9, 2025
26996ec
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 10, 2025
5e9367a
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 10, 2025
2b532b6
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 10, 2025
6b54d4f
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 10, 2025
7668eb4
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
8306fbe
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
49e49aa
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
8fd1964
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
29e5671
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
2d97f2c
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
ad50bfb
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
c02c281
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
cdf3f6d
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
84d7f76
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
2308dbc
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
e0460e5
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
d20b0a3
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
2029d81
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 11, 2025
d9c0cf5
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 12, 2025
4ce2e8a
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 12, 2025
2c21ab3
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 12, 2025
75e87df
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 12, 2025
5ce0393
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 13, 2025
8b20336
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 13, 2025
5e191a1
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 13, 2025
6588ef4
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 13, 2025
68c730c
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 13, 2025
9c2b40d
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 13, 2025
8713956
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 13, 2025
82e7b98
@W-20161958: [MSDK 13.1][Android] Cannot login GUS using Welcome endp…
JohnsonEricAtSalesforce Dec 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/test-shards/SalesforceSDK.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"targets": [
"class com.salesforce.androidsdk.ui.LoginViewActivityTest",
"class com.salesforce.androidsdk.ui.PickerBottomSheetTest",
"class com.salesforce.androidsdk.ui.LoginActivityTest",
"class com.salesforce.androidsdk.ui.LoginActivityScenarioTest",
"class com.salesforce.androidsdk.ui.LoginOptionsActivityTest",
"class com.salesforce.androidsdk.ui.PickerBottomSheetActivityTest",
"class com.salesforce.androidsdk.ui.DevInfoActivityTest",
Expand Down Expand Up @@ -53,7 +53,7 @@
"notClass com.salesforce.androidsdk.analytics.SalesforceAnalyticsManagerTest",
"notClass com.salesforce.androidsdk.ui.LoginViewActivityTest",
"notClass com.salesforce.androidsdk.ui.PickerBottomSheetTest",
"notClass com.salesforce.androidsdk.ui.LoginActivityTest",
"notClass com.salesforce.androidsdk.ui.LoginActivityScenarioTest",
"notClass com.salesforce.androidsdk.ui.LoginOptionsActivityTest",
"notClass com.salesforce.androidsdk.ui.PickerBottomSheetActivityTest",
"notClass com.salesforce.androidsdk.ui.DevInfoActivityTest",
Expand Down
1 change: 1 addition & 0 deletions libs/SalesforceSDK/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<string name="account_type">com.salesforce.androidsdk</string>
<string name="app_package">com.salesforce.androidsdk</string>
<string name="cannot_use_another_apps_login_qr_code">Cannot use another app\'s login QR Code. Please log in to this app.</string>
<string name="salesforce_welcome_is_disabled">This app doesn\'t support welcome.salesforce.com. Use another server.</string>

<!-- If you're only supporting recent versions of Android (e.g. 3.x and up), you can override this to be touch and get a better looking login UI -->
<string name="oauth_display_type">touch</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ private List<LoginServer> getLoginServersFromPreferences(SharedPreferences prefs
*/
public static class LoginServer {

@NonNull
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been an issue for some time. The constructor has blocked nulls but the nullability of the backing fields was never updated. This improves the tests on this pull request greatly plus it probably should have been done for integrity long ago.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way the app could still have a null name that was entered prior to MSDK 13.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The app would have to be doing something very deliberate to achieve that plus ignoring the non-null constructor parameters. Interestingly, an AI analysis also notes that since URL and name are treated as non-null in a lot of code throughout MSDK, they'd already be triggering null pointer exceptions in many places. Take a look at the number of non-null safe calls to "trim" there are on "name".

So, this looks like a real win to help prevent future NPEs.

public final String name;
@NonNull
public final String url;
public final boolean isCustom;

Expand Down
280 changes: 181 additions & 99 deletions libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/LoginActivity.kt

Large diffs are not rendered by default.

239 changes: 200 additions & 39 deletions libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/LoginViewModel.kt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.