Skip to content

Commit 70a65b1

Browse files
authored
Remove Deprecated Code. (#2689)
Remove deprecated code.
1 parent c9b8ea6 commit 70a65b1

4 files changed

Lines changed: 2 additions & 83 deletions

File tree

libs/SalesforceHybrid/src/com/salesforce/androidsdk/phonegap/ui/SalesforceDroidGapActivity.kt

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -521,52 +521,6 @@ open class SalesforceDroidGapActivity : CordovaActivity(), SalesforceActivityInt
521521
webAppLoaded = true
522522
}
523523

524-
/**
525-
* Returns the front-doored URL of a URL passed in.
526-
*
527-
* @param providedUrl URL to be front-doored
528-
* @param isAbsoluteUrl True if the URL should be used as is; false
529-
* otherwise
530-
* @return The front-doored URL
531-
*
532-
* @Deprecated we are no longer using front door to setup the session in the web view
533-
* instead we get the session from the login/refresh oauth flow
534-
* and sets them in CookieManager using SalesforceWebViewCookieManager
535-
* This method will be remove in Mobile SDK 13.0
536-
*/
537-
@Deprecated("Deprecated - to be removed in 13.0")
538-
fun getFrontDoorUrl(
539-
providedUrl: String?,
540-
isAbsoluteUrl: Boolean
541-
): String? {
542-
543-
/*
544-
* Use the absolute URL in some cases and the relative URL in some other
545-
* cases because of differences between instance URL and community URL.
546-
* Community URL can be custom and the logic of determining which URL to
547-
* use is in the 'resolveUrl' method in 'ClientInfo'
548-
*/
549-
val restClient = restClient ?: return null
550-
return "${restClient.clientInfo.instanceUrlAsString}/secur/frontdoor.jsp?".toHttpUrlOrNull()
551-
?.newBuilder()
552-
?.addQueryParameter(
553-
name = "sid",
554-
value = restClient.authToken
555-
)
556-
?.addQueryParameter(
557-
name = "retURL",
558-
value = when {
559-
isAbsoluteUrl -> providedUrl
560-
else -> restClient.clientInfo.resolveUrl(providedUrl).toString()
561-
}
562-
)
563-
?.addQueryParameter(
564-
name = "display",
565-
value = "touch"
566-
)
567-
?.build().toString()
568-
}
569-
570524
/**
571525
* Load cached start page
572526
*/

libs/SalesforceSDK/src/com/salesforce/androidsdk/analytics/SalesforceAnalyticsManager.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -208,19 +208,6 @@ public static synchronized void setPublishPeriodicallyFrequencyHours(
208208
setAnalyticsPublishingType(PublishPeriodically);
209209
}
210210

211-
/**
212-
* Sets the interval for periodic background publishing in hours.
213-
*
214-
* @deprecated Planned for removal 13.0.
215-
* Use {@link #setPublishPeriodicallyFrequencyHours(int)} )}.
216-
*/
217-
@Deprecated()
218-
public static synchronized void setPublishFrequencyInHours(
219-
int periodicBackgroundPublishingHoursInterval
220-
) {
221-
setPublishPeriodicallyFrequencyHours(periodicBackgroundPublishingHoursInterval);
222-
}
223-
224211
/**
225212
* The enabled Salesforce analytics publishing type.
226213
*
@@ -263,19 +250,6 @@ public static int getPublishPeriodicallyFrequencyHours() {
263250
return publishPeriodicallyFrequencyHours;
264251
}
265252

266-
/**
267-
* Returns the publish frequency currently set, in hours.
268-
*
269-
* @return Publish frequency, in hours.
270-
* @noinspection unused
271-
* @deprecated Planned for removal 13.0.
272-
* Use {@link #getPublishPeriodicallyFrequencyHours()} )}.
273-
*/
274-
@Deprecated
275-
public static int getPublishFrequencyInHours() {
276-
return getPublishPeriodicallyFrequencyHours();
277-
}
278-
279253
/**
280254
* Returns an instance of event store manager.
281255
*

libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/SalesforceActivityDelegate.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ protected void onUserSwitch() {
144144
*/
145145
private class ActivityLogoutCompleteReceiver extends LogoutCompleteReceiver {
146146

147-
@Override
148-
protected void onLogoutComplete() { }
149-
150147
@Override
151148
protected void onLogoutComplete(@NonNull OAuth2.LogoutReason reason) {
152149
((SalesforceActivityInterface) activity).onLogoutComplete();

libs/SalesforceSDK/src/com/salesforce/androidsdk/util/LogoutCompleteReceiver.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,10 @@ import java.util.Locale
3939
abstract class LogoutCompleteReceiver : BroadcastReceiver() {
4040
override fun onReceive(context: Context, intent: Intent) {
4141
if (intent.action == SalesforceSDKManager.LOGOUT_COMPLETE_INTENT_ACTION) {
42-
onLogoutComplete()
43-
4442
val reason = intent.getStringExtra(SalesforceSDKManager.LOGOUT_REASON_KEY) ?: LogoutReason.UNKNOWN.toString()
4543
onLogoutComplete(LogoutReason.valueOf(reason.uppercase(Locale.ROOT)))
4644
}
4745
}
4846

49-
/** @deprecated Will be removed in 13.0. Use the new [onLogoutComplete] that provides a [LogoutReason] instead. */
50-
protected abstract fun onLogoutComplete()
51-
52-
// TODO: Make this abstract in 13.0 to replace the above onLogoutComplete()
53-
protected open fun onLogoutComplete(reason: LogoutReason) { }
54-
}
47+
protected abstract fun onLogoutComplete(reason: LogoutReason)
48+
}

0 commit comments

Comments
 (0)