Fix NFC image transfer
Image transfer over NFC is broken.
STEPS TO REPRODUCE:
-----------------------------------------
1. Launch Gallery and open any picture
2. Keep two devices close each other
3. Tap on 'Touch to Beam' option on sender device and observe receiver device
OBSERVED RESULTS:
'Beam did not complete' message showing in Notification window.
EXPECTED RESULTS:
Beam should complete successfully and able to share picture through Beam
ADDITIONAL INFORMATION :
Device : Hammerhead
Reproducibility : 3/3
Addresses the following denials:
<5>[ 3030.955024] type=1400 audit(1391625834.066:72): avc: denied { call } for pid=311 comm="Binder_2" scontext=u:r:surfaceflinger:s0 tcontext=u:r:nfc:s0 tclass=binder
<5>[ 3049.606559] type=1400 audit(1391625852.716:74): avc: denied { write } for pid=26850 comm="id.nfc:handover" name="0" dev="fuse" ino=3086221568 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
<5>[ 3049.606802] type=1400 audit(1391625852.716:75): avc: denied { add_name } for pid=26850 comm="id.nfc:handover" name="beam" scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
<5>[ 3049.607068] type=1400 audit(1391625852.716:76): avc: denied { create } for pid=26850 comm="id.nfc:handover" name="beam" scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
<5>[ 3049.610602] type=1400 audit(1391625852.716:77): avc: denied { remove_name } for pid=26850 comm="id.nfc:handover" name="IMG_20140205_104344.jpg" dev="fuse" ino=3086246328 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
<5>[ 3049.610870] type=1400 audit(1391625852.716:78): avc: denied { rename } for pid=26850 comm="id.nfc:handover" name="IMG_20140205_104344.jpg" dev="fuse" ino=3086246328 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=file
Bug: 12891504
Change-Id: I10dc964db9249f53a2b4d8fe871ad9a036c423a2
diff --git a/surfaceflinger.te b/surfaceflinger.te
index 24c20eb..9c58afa 100644
--- a/surfaceflinger.te
+++ b/surfaceflinger.te
@@ -12,6 +12,7 @@
# Perform Binder IPC.
binder_use(surfaceflinger)
binder_call(surfaceflinger, system_server)
+binder_call(surfaceflinger, nfc)
binder_service(surfaceflinger)
# Access the GPU.