diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2013-10-07 10:16:12 -0700 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2013-10-07 14:19:13 -0700 |
| commit | 85f5f8132015d8a5043ea4413702420d0d157c9f (patch) | |
| tree | 08493f51fca4a3ebd4eaf584e8c0fa03b373be9c /core/java/android/app/ApplicationPackageManager.java | |
| parent | ca25db0cb3d6b9686a42c9cb99d90dc095f20cd8 (diff) | |
| download | frameworks_base-85f5f8132015d8a5043ea4413702420d0d157c9f.zip frameworks_base-85f5f8132015d8a5043ea4413702420d0d157c9f.tar.gz frameworks_base-85f5f8132015d8a5043ea4413702420d0d157c9f.tar.bz2 | |
Add <intent-filter> support to <provider>.
For the new documents work, we're only interested in the subset of
ContentProviders that actually implement DocumentsContract. Instead
of returning all providers, add <intent-filter> support to make it
easier to limit the set of returned ProviderInfo.
Define a well-known action for DocumentsProviders, and start using it
when querying for roots. Continue supporting the old <meta-data>
approach until all apps have been updated.
Bug: 8599233
Change-Id: I05f049bba21311f5421738002f99ee214447c909
Diffstat (limited to 'core/java/android/app/ApplicationPackageManager.java')
| -rw-r--r-- | core/java/android/app/ApplicationPackageManager.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java index 55c6672..b505d4f 100644 --- a/core/java/android/app/ApplicationPackageManager.java +++ b/core/java/android/app/ApplicationPackageManager.java @@ -585,6 +585,22 @@ final class ApplicationPackageManager extends PackageManager { } @Override + public List<ResolveInfo> queryIntentContentProvidersAsUser( + Intent intent, int flags, int userId) { + try { + return mPM.queryIntentContentProviders(intent, + intent.resolveTypeIfNeeded(mContext.getContentResolver()), flags, userId); + } catch (RemoteException e) { + throw new RuntimeException("Package manager has died", e); + } + } + + @Override + public List<ResolveInfo> queryIntentContentProviders(Intent intent, int flags) { + return queryIntentContentProvidersAsUser(intent, flags, mContext.getUserId()); + } + + @Override public ProviderInfo resolveContentProvider(String name, int flags) { try { |
