Merge "Fix restoring of layer type" am: 0b28b42 am: 8ce0be3353  -s ours
am: 64ac4368c6

Change-Id: I3f38aef2a8976a7c0578b61b625f7ca3cba4d022