The source code used is the official from the Android Project, slightly modified to be adapted to Android 5.0 and the new build tools.
The permissions are a subset of the same ones that the old Gallery required:
- Modify USB storage: photo/video edit & saving.
- Near-Field Communication (NFC): share photos/videos via Android Beam
- Prevent phone from sleeping: avoid screen turning off during slideshow.
- Set wallpaper: set image as wallpaper.