@@ -87,9 +87,10 @@ public class LockScreenManager extends BaseSubManager {
8787 final int customView ;
8888 int displayMode ;
8989 Bitmap deviceLogo ;
90- private boolean mLockScreenHasBeenDismissed , lockscreenDismissReceiverRegistered , receivedFirstDDNotification ;
90+ private boolean lockscreenDismissReceiverRegistered , receivedFirstDDNotification ;
91+ boolean mLockScreenShouldBeAutoDismissed ;
9192 private String mLockscreenWarningMsg ;
92- private BroadcastReceiver mLockscreenDismissedReceiver ;
93+ BroadcastReceiver mLockscreenDismissedReceiver ;
9394 private final LockScreenDeviceIconManager mLockScreenDeviceIconManager ;
9495 private String lastIntentUsed ;
9596
@@ -220,6 +221,11 @@ public void onNotified(RPCNotification notification) {
220221 // enable the dismissal. There is a delay added to allow time for the activity
221222 // time to completely start and handle the new intent. There seems to be odd behavior
222223 // in Android when startActivity is called multiple times too quickly.
224+ if (previousDismissibleState ) {
225+ // If lockscreen was dismissible, got dismissed by the user, then became not dismissible, the lockscreen activity should be allowed to launch again
226+ // https://github.com/smartdevicelink/sdl_java_suite/issues/1695
227+ mLockScreenShouldBeAutoDismissed = false ;
228+ }
223229 if (!receivedFirstDDNotification ) {
224230 new Handler ().postDelayed (new Runnable () {
225231 @ Override
@@ -296,7 +302,7 @@ public void onMoveToBackground() {
296302 @ Override
297303 public void onReceive (Context context , Intent intent ) {
298304 if (SDLLockScreenActivity .KEY_LOCKSCREEN_DISMISSED .equals (intent .getAction ())) {
299- mLockScreenHasBeenDismissed = true ;
305+ mLockScreenShouldBeAutoDismissed = true ;
300306 lastIntentUsed = null ;
301307 }
302308 }
@@ -318,7 +324,7 @@ public void onReceive(Context context, Intent intent) {
318324 private void launchLockScreenActivity () {
319325 synchronized (LOCKSCREEN_LAUNCH_LOCK ) {
320326 // If the user has dismissed the lockscreen for this run or has disabled it, do not show it
321- if (mLockScreenHasBeenDismissed || displayMode == LockScreenConfig .DISPLAY_MODE_NEVER ) {
327+ if (mLockScreenShouldBeAutoDismissed || displayMode == LockScreenConfig .DISPLAY_MODE_NEVER ) {
322328 return ;
323329 }
324330 // intent to open SDLLockScreenActivity
0 commit comments