Simplify locking in ClipboardService.

Currently ClipboardService contains synchronization around two
objects: mLock, and the instance of ClipboardImpl. This
changes all the synchronization to use mLock, and applies
synchronization only where needed, i.e. when a guarded member
(such as the clipboard data) is being accessed.

Bug: 179667029
Test: atest ClipboardManagerTest; atest ClipDataTest; atest
ClipDescriptionTest

Change-Id: I7d55a2d5526275dc0e8ca1ce6fad9d4b14c6b3c8
1 file changed