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, 7 Jan 2016 21:15:59 +0000 (14:15 -0700)
commit79c439a498943112a15af19ba46eae664b7803e1
treeb6f8abffc58418845de77f26434693408b7d1f1a
parent446f6e526a75dbd2142cf9b96450e9db7da5f8e8
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