summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();