NotificationManagerService: fix typo on led off time variable

Change-Id: Iade96474c26dbeb3a5a671170f563220562d9b3c
Framework/base: Added synchronization block to avoid race condition

Fix for the synchronization issue leading to access of an array
Index out of bounds. Issue occurs due to race condition between
removing the activities of a crashed process from history stack
and resuming a separate activity.

Change-Id: I14bb5834e778c15b674248e46fe93b0ce9f37967