Skip to content

Commit 1837936

Browse files
committed
Re-register all users for push notifications with new keys when upgrading to Mobile SDK 13.0.
Without this, an application will not be able to decrypt encrypted push notifications if: - it was first installed with Mobile SDK 11.x or older - it has elected to disable re-registration entirely
1 parent 19fa711 commit 1837936

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

libs/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKUpgradeManager.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ else if (installedVersion.isGreaterThanOrEqualTo(new SdkVersion(9, 2, 0, false))
127127
if (installedVersion.isLessThan(new SdkVersion(12, 0, 0, false))) {
128128
updateFromBefore12_0_0();
129129
}
130+
if (installedVersion.isLessThan(new SdkVersion(13, 0, 2, false))) {
131+
updateFromBefore13_0_2();
132+
}
130133
if (installedVersion.isLessThan(new SdkVersion(15, 0, 0, false))) {
131134
migrateAccountType();
132135
}
@@ -306,6 +309,10 @@ private void updateFromBefore12_0_0() {
306309
PushMessaging.setReRegistrationRequested(true);
307310
}
308311

312+
private void updateFromBefore13_0_2() {
313+
// Re-register all users for push notifications with new keys once push is setup
314+
PushMessaging.setReRegistrationRequested(true);
315+
}
309316

310317
/*
311318
* Migrate any accounts with account_type "com.salesforce.androidsdk" to a unique value.

0 commit comments

Comments
 (0)