forcedotcom / SalesforceMobileSDK-Android

Android SDK for Salesforce
Other
341 stars 388 forks source link

@W-15993541/W-15993636: [Android] Publish AILTN logs on background/Register push notifications on foreground #2587

Closed JohnsonEricAtSalesforce closed 4 months ago

JohnsonEricAtSalesforce commented 4 months ago

🎸 Ready For Review! 🥁

Note: This also includes W-15993636 since the two topics look so similar in the code and test well together.

This changes MSDK to avoid resuming the app for background tasks that could incur additional authorization refresh events. The default behavior is now to perform those tasks when the app resumes or pauses (foreground or background). Configuration options are provided so app can opt-in to the old behavior, if desired.

I was able to test the apps to verify the new AILTN publishing in each configuration. Also, I was able to test push notifications registration according to each configuration.

mobilesdk-bot commented 4 months ago
1 Warning
:warning: libs/SalesforceSDK/src/com/salesforce/androidsdk/analytics/SalesforceAnalyticsManager.java#L534 - Consider using apply() instead; commit writes its data to persistent storage immediately, whereas apply will handle it in the background

Tests results for SalesforceSDK

Generated by :no_entry_sign: Danger

mobilesdk-bot commented 4 months ago
1 Error
:no_entry_sign: Tests have failed, see below for more information.

Tests:

Name Classname Time
test[testCleanResyncGhosts] com.salesforce.androidsdk.reactnative.ReactMobileSyncTest 90.383

Tests results for SalesforceReact

Generated by :no_entry_sign: Danger

mobilesdk-bot commented 4 months ago
1 Error
:no_entry_sign: Tests have failed, see below for more information.

Tests:

Name Classname Time
testQueryEndingWithStarMatchingNone com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 11.392
testStarQuery com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 11.246
testQueryStartingAndEndingWithStarMatchingNone com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 10.333
testQueryStartingWithStarMatchingTwo com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 11.259
testKeyNotFound com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 10.35
testQueryEndingWithStarMatchingOne com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 10.525
testQueryEndingWithStarMatchingTwo com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 11.265
testQueryStartingAndEndingWithStarMatchingTwo com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 11.289
testSingleStore com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 10.339
testChangingStores com.salesforce.androidsdk.smartstore.store.KeyValueStoreInspectorActivityTest 11.212
testClickingIndices com.salesforce.androidsdk.smartstore.store.SmartStoreInspectorActivityTest 11.489
testClickingRunWithValidQueryAndPageSizeAndPageIndex com.salesforce.androidsdk.smartstore.store.SmartStoreInspectorActivityTest 10.461
testClickingRunWithInvalidQuery com.salesforce.androidsdk.smartstore.store.SmartStoreInspectorActivityTest 11.276
testClickingRunWithValidQuery com.salesforce.androidsdk.smartstore.store.SmartStoreInspectorActivityTest 11.322
testClickingRunWithValidQueryAndPageSize com.salesforce.androidsdk.smartstore.store.SmartStoreInspectorActivityTest 11.394
testClickingRunWithoutQuery com.salesforce.androidsdk.smartstore.store.SmartStoreInspectorActivityTest 10.343
testClickingRunWithValidQueryNoResults com.salesforce.androidsdk.smartstore.store.SmartStoreInspectorActivityTest 11.341
testClickingClear com.salesforce.androidsdk.smartstore.store.SmartStoreInspectorActivityTest 10.468
testClickingSoups com.salesforce.androidsdk.smartstore.store.SmartStoreInspectorActivityTest 10.439

Tests results for SmartStore

Generated by :no_entry_sign: Danger

mobilesdk-bot commented 4 months ago
1 Error
:no_entry_sign: Tests have failed, see below for more information.

Tests:

Name Classname Time
testSoslSyncDownFromConfig com.salesforce.androidsdk.mobilesync.config.SyncsConfigTest 0.203
testCleanGhostsOneObjectType com.salesforce.androidsdk.mobilesync.target.BriefcaseSyncDownTargetTest 1.797
testSyncDownFetchingOneObjectType com.salesforce.androidsdk.mobilesync.target.BriefcaseSyncDownTargetTest 4.167
testSyncDownFetchingTwoObjectTypes com.salesforce.androidsdk.mobilesync.target.BriefcaseSyncDownTargetTest 4.946
testIdsToSkip com.salesforce.androidsdk.mobilesync.target.BriefcaseSyncDownTargetTest 2.769
testStartFetchWithMaxTimeStamp com.salesforce.androidsdk.mobilesync.target.BriefcaseSyncDownTargetTest 4.13
testCleanGhostsTwoObjectTypes com.salesforce.androidsdk.mobilesync.target.BriefcaseSyncDownTargetTest 3.006
testSyncDownFetchingOneObjectTypeWithMultipleRetrieveCalls com.salesforce.androidsdk.mobilesync.target.BriefcaseSyncDownTargetTest 4.307
testStartFetchNoMaxTimeStamp com.salesforce.androidsdk.mobilesync.target.BriefcaseSyncDownTargetTest 3.892
testSyncDownFetchingTwoObjectTypesWithMultipleRetrieveCalls com.salesforce.androidsdk.mobilesync.target.BriefcaseSyncDownTargetTest 4.372

Tests results for MobileSync

Generated by :no_entry_sign: Danger