Screen-pinning unpin security fails for secondary user.

The setting that inidcates that the user must unlock the device first
to unpin an app is always read for the owner user, so if the owner
disables this it will also be disabled for all secondary users no
matter what they have selected.

Bug: 64235463
Test: Manual
- Enable Screen-pinning for owner
- Uncheck 'Ask for PIN when unpinning'
- Create a secondary user
- Create keyguard PIN
- Enable screen-pinning for secondary user
- Check 'Ask for PIN when unpinning'
- Exit settings and start an app
- Pin the app from recents
- Unpin the app
The keyguard should appear on unpin with this commit applied

This is a cherry-pick of I8b9a98dc50e061b14c091d723223577cd94513ab

Change-Id: I880440b82643915cdb088ef4f4da19ce2db689f6
diff --git a/services/core/java/com/android/server/am/LockTaskController.java b/services/core/java/com/android/server/am/LockTaskController.java
index c03ac86..d8706bc 100644
--- a/services/core/java/com/android/server/am/LockTaskController.java
+++ b/services/core/java/com/android/server/am/LockTaskController.java
@@ -28,6 +28,7 @@
 import static android.content.Context.DEVICE_POLICY_SERVICE;
 import static android.content.Context.STATUS_BAR_SERVICE;
 import static android.os.UserHandle.USER_ALL;
+import static android.os.UserHandle.USER_CURRENT;
 import static android.provider.Settings.Secure.LOCK_TO_APP_EXIT_LOCKED;
 import static android.view.Display.DEFAULT_DISPLAY;
 import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_LOCKTASK;
@@ -320,9 +321,10 @@
             }
             getLockTaskNotify().show(false);
             try {
-                boolean shouldLockKeyguard = Settings.Secure.getInt(
+                boolean shouldLockKeyguard = Settings.Secure.getIntForUser(
                         mContext.getContentResolver(),
-                        LOCK_TO_APP_EXIT_LOCKED) != 0;
+                        LOCK_TO_APP_EXIT_LOCKED,
+                        USER_CURRENT) != 0;
                 if (mLockTaskModeState == LOCK_TASK_MODE_PINNED && shouldLockKeyguard) {
                     mWindowManager.lockNow(null);
                     mWindowManager.dismissKeyguard(null /* callback */);