Merge "fix a possible deadlock when removing a layer and destroying a client" into cm-10.2