From a013d5b1a3a66297ea9471767fcbfef7f6ba4d69 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 21 Mar 2016 17:12:39 -0600 Subject: Remove chmod(0644) for finished downloads. Now that PackageInstaller can read APKs from content:// Uris, we don't need to make downloads world-readable. This is mostly just cleanup, since our top-level private data directory is no longer o+x, so other apps can't traverse in anyway. Bug: 5464052 Change-Id: I45de6a40c28b85c64d5afbc13068fe3ae8341d93 --- src/com/android/providers/downloads/DownloadThread.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java index 325b4eee..65142db6 100644 --- a/src/com/android/providers/downloads/DownloadThread.java +++ b/src/com/android/providers/downloads/DownloadThread.java @@ -624,12 +624,6 @@ public class DownloadThread implements Runnable { } else if (Downloads.Impl.isStatusSuccess(mInfoDelta.mStatus)) { // When success, open access if local file if (mInfoDelta.mFileName != null) { - try { - // TODO: remove this once PackageInstaller works with content:// - Os.chmod(mInfoDelta.mFileName, 0644); - } catch (ErrnoException ignored) { - } - if (mInfo.mDestination != Downloads.Impl.DESTINATION_FILE_URI) { try { // Move into final resting place, if needed -- cgit v1.2.3