summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-06-23 07:12:06 (GMT)
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-06-23 07:12:06 (GMT)
commit17c16fb96f0e8db859904011c69eec9594405bc4 (patch)
tree307f4017ec9be1bba8e0fd2d5cd9ad34ec4dfc99
parent1ac2e0597e612d4c403ecc3f3773f9ed36f45ce3 (diff)
parentdc9bffedf196361dde67a887bb8669d619926c24 (diff)
downloadandroid_packages_providers_DownloadProvider-17c16fb96f0e8db859904011c69eec9594405bc4.zip
android_packages_providers_DownloadProvider-17c16fb96f0e8db859904011c69eec9594405bc4.tar.gz
android_packages_providers_DownloadProvider-17c16fb96f0e8db859904011c69eec9594405bc4.tar.bz2
release-request-160c4b31-7fa0-4e2b-aabe-85380836a1ce-for-git_oc-release-4129081 snap-temp-L15300000077039010
Change-Id: Iaad7205238d26e6fb4e59893549bdaebbf886f70
-rw-r--r--src/com/android/providers/downloads/OpenHelper.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/providers/downloads/OpenHelper.java b/src/com/android/providers/downloads/OpenHelper.java
index 31561ff..c88902b 100644
--- a/src/com/android/providers/downloads/OpenHelper.java
+++ b/src/com/android/providers/downloads/OpenHelper.java
@@ -31,6 +31,7 @@ import android.content.Intent;
import android.content.pm.PackageInstaller;
import android.database.Cursor;
import android.net.Uri;
+import android.os.Process;
import android.provider.DocumentsContract;
import android.provider.Downloads.Impl.RequestHeaders;
import android.util.Log;
@@ -127,7 +128,10 @@ public class OpenHelper {
if (cursor != null) {
try {
if (cursor.moveToFirst()) {
- return cursor.getInt(cursor.getColumnIndexOrThrow(Constants.UID));
+ final int uid = cursor.getInt(cursor.getColumnIndexOrThrow(Constants.UID));
+ if (uid != Process.myUid()) {
+ return uid;
+ }
}
} finally {
cursor.close();