Skip to content

Commit 186a8b9

Browse files
committed
Deprecate unnecessary unlock method.
1 parent 1d97763 commit 186a8b9

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

libs/SalesforceSDK/src/com/salesforce/androidsdk/security/ScreenLockManager.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ public void storeMobilePolicy(UserAccount account, boolean screenLockRequired, i
8787
}
8888
globalPrefsEditor.apply();
8989

90-
// This is needed to block access to the app immediately on login
91-
onAppForegrounded();
90+
lock();
9291
}
9392
}
9493

@@ -165,10 +164,11 @@ public void cleanUp(UserAccount account) {
165164

166165
/**
167166
* Unlocks the app.
167+
*
168+
* @deprecated This method will be removed in 11.0.
168169
*/
169-
public void unlock() {
170-
lastLockedTimestamp = 0;
171-
}
170+
@Deprecated
171+
public void unlock() { }
172172

173173
@VisibleForTesting
174174
protected boolean shouldLock() {

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

-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ private void onAuthError(CharSequence errString) {
214214
private void finishSuccess() {
215215
resetUI();
216216
sendAccessibilityEvent(getString(R.string.sf__screen_lock_auth_success));
217-
SalesforceSDKManager.getInstance().getScreenLockManager().unlock();
218217
finish();
219218
}
220219

libs/test/SalesforceSDKTest/src/com/salesforce/androidsdk/security/ScreenLockManagerTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public void testShouldNotLock() {
8989
Assert.assertFalse("Should not be locked without mobile policy set.", screenLockManager.shouldLock());
9090

9191
screenLockManager.storeMobilePolicy(userAccount, false, 0);
92-
screenLockManager.unlock();
9392
Assert.assertFalse("Should not be locked if shouldLock is false.", screenLockManager.shouldLock());
9493
}
9594

0 commit comments

Comments
 (0)