Use resolved path for both checking and opening.
authorJeff Sharkey <jsharkey@android.com>
Sun, 7 Feb 2016 20:05:09 +0000 (13:05 -0700)
committerJeff Sharkey <jsharkey@android.com>
Tue, 9 Feb 2016 00:56:15 +0000 (17:56 -0700)
commit8c088f73a53813869e68a5c4671c09e8732da6d3
tree1867b819e1fc6afeff697981b4bfc95e41cb8ab5
parentbb1c06b9dc2740a4055d9651c6559ac112e0c397
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: I5e1a2343d631109c21a4c5b2d8d00b2946756680
src/com/android/providers/downloads/DownloadProvider.java
src/com/android/providers/downloads/Helpers.java