Merge "Need to check ndef before writing ndef." into gingerbread