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:24:09 +0000 (14:24 -0700)
commit5accb135178325878840c6e36fc3e640ae582dea
treeaa0af740555f5791a96c42195d8447b80db7b786
parent06d3867b1d96c3ad73d677e7c04a8d94b9f93c8b
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