Lock task doesn't always end properly.

This can result in the keyguard not being re-enabled, the status
bar being in a bad state, and various other weirdness.  When a task
is going away, it needs to send the standard lock task ending
messages so that exiting the state can be handled properly.

Bug: 16010327
Change-Id: Id7ee632f4765af0af209b70fb69dd75f2e541820
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 1107139..2533d37 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -3182,7 +3182,11 @@
 
     void endLockTaskModeIfTaskEnding(TaskRecord task) {
         if (mLockTaskModeTask != null && mLockTaskModeTask == task) {
+            final Message lockTaskMsg = Message.obtain();
+            lockTaskMsg.arg1 = mLockTaskModeTask.userId;
+            lockTaskMsg.what = LOCK_TASK_END_MSG;
             mLockTaskModeTask = null;
+            mHandler.sendMessage(lockTaskMsg);
         }
     }