Fix adding lockscreen targets.

The empty targets were not included in the setting properly.
Also make the code a little more memory efficient.

Change-Id: I05cc7ce55ef5789f063033116ebfd9337e5ee28a
Merge "Fix adding lockscreen targets." into cm-10.2
Merge remote-tracking branch 'upstream/cm-10.2' into gamma