Use resolved path for both checking and opening.
authorJeff Sharkey <jsharkey@android.com>
Thu, 7 Jan 2016 21:15:59 +0000 (14:15 -0700)
committerJeff Sharkey <jsharkey@android.com>
Thu, 14 Jan 2016 21:14:45 +0000 (14:14 -0700)
commit366af2ee1f841615d44ab770b537112d769eed05
treefe205687fc9d7a776d1f55b3d3e8ee823f1c0952
parent10865031b1b87939310aef82b7a2572cb49025b2
Use resolved path for both checking and opening.

This avoids a race condition where someone can change a symlink
target after the security checks have passed.

Bug: 26211054
Change-Id: I5842aaecc7b7d417a3b1902957b59b8a1f3c1ccb
src/com/android/providers/downloads/DownloadProvider.java
src/com/android/providers/downloads/Helpers.java