From 21bf35b26557d5fb1ed376cbf18a7bcab97069b6 Mon Sep 17 00:00:00 2001 From: Sudheer Shanka Date: Tue, 13 Nov 2018 18:19:53 -0800 Subject: Remove references to DefaultContainerService. DefaultContainerService is not being used for anything now and is going to be removed. Bug: 111838160 Test: builds and boots Change-Id: Idcd0ef4b479809ea2953d7a583b61aa1769755e0 --- .../android/providers/downloads/DownloadProvider.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src') diff --git a/src/com/android/providers/downloads/DownloadProvider.java b/src/com/android/providers/downloads/DownloadProvider.java index f8d5aae2..8498b5aa 100644 --- a/src/com/android/providers/downloads/DownloadProvider.java +++ b/src/com/android/providers/downloads/DownloadProvider.java @@ -36,9 +36,7 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.UriMatcher; -import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; -import android.content.pm.PackageManager.NameNotFoundException; import android.database.Cursor; import android.database.DatabaseUtils; import android.database.SQLException; @@ -185,7 +183,6 @@ public final class DownloadProvider extends ContentProvider { /** List of uids that can access the downloads */ private int mSystemUid = -1; - private int mDefContainerUid = -1; /** * Creates and updated database on demand when opening it. @@ -419,18 +416,6 @@ public final class DownloadProvider extends ContentProvider { mOpenHelper = new DatabaseHelper(getContext()); // Initialize the system uid mSystemUid = Process.SYSTEM_UID; - // Initialize the default container uid. Package name hardcoded - // for now. - ApplicationInfo appInfo = null; - try { - appInfo = getContext().getPackageManager(). - getApplicationInfo("com.android.defcontainer", 0); - } catch (NameNotFoundException e) { - Log.wtf(Constants.TAG, "Could not get ApplicationInfo for com.android.defconatiner", e); - } - if (appInfo != null) { - mDefContainerUid = appInfo.uid; - } // Grant access permissions for all known downloads to the owning apps final SQLiteDatabase db = mOpenHelper.getReadableDatabase(); @@ -1036,8 +1021,7 @@ public final class DownloadProvider extends ContentProvider { private boolean shouldRestrictVisibility() { int callingUid = Binder.getCallingUid(); return Binder.getCallingPid() != Process.myPid() && - callingUid != mSystemUid && - callingUid != mDefContainerUid; + callingUid != mSystemUid; } /** -- cgit v1.2.3