Loading api/current.xml +37 −3 Original line number Diff line number Diff line Loading @@ -48120,7 +48120,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="className" type="android.content.ComponentName"> <parameter name="component" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> Loading Loading @@ -48516,6 +48516,23 @@ <parameter name="flags" type="int"> </parameter> </method> <method name="getProviderInfo" return="android.content.pm.ProviderInfo" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="component" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> <exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException"> </exception> </method> <method name="getReceiverInfo" return="android.content.pm.ActivityInfo" abstract="true" Loading @@ -48526,7 +48543,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="className" type="android.content.ComponentName"> <parameter name="component" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> Loading Loading @@ -48588,7 +48605,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="className" type="android.content.ComponentName"> <parameter name="component" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> Loading Loading @@ -158313,6 +158330,23 @@ <parameter name="flags" type="int"> </parameter> </method> <method name="getProviderInfo" return="android.content.pm.ProviderInfo" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="className" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> <exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException"> </exception> </method> <method name="getReceiverInfo" return="android.content.pm.ActivityInfo" abstract="false" core/java/android/app/ContextImpl.java +15 −0 Original line number Diff line number Diff line Loading @@ -1844,6 +1844,21 @@ class ContextImpl extends Context { throw new NameNotFoundException(className.toString()); } @Override public ProviderInfo getProviderInfo(ComponentName className, int flags) throws NameNotFoundException { try { ProviderInfo pi = mPM.getProviderInfo(className, flags); if (pi != null) { return pi; } } catch (RemoteException e) { throw new RuntimeException("Package manager has died", e); } throw new NameNotFoundException(className.toString()); } @Override public String[] getSystemSharedLibraryNames() { try { Loading core/java/android/content/pm/IPackageManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ interface IPackageManager { ServiceInfo getServiceInfo(in ComponentName className, int flags); ProviderInfo getProviderInfo(in ComponentName className, int flags); int checkPermission(String permName, String pkgName); int checkUidPermission(String permName, int uid); Loading core/java/android/content/pm/PackageManager.java +34 −12 Original line number Diff line number Diff line Loading @@ -996,8 +996,8 @@ public abstract class PackageManager { * <p>Throws {@link NameNotFoundException} if an activity with the given * class name can not be found on the system. * * @param className The full name (i.e. * com.google.apps.contacts.ContactsList) of an Activity * @param component The full component name (i.e. * com.google.apps.contacts/com.google.apps.contacts.ContactsList) of an Activity * class. * @param flags Additional option flags. Use any combination of * {@link #GET_META_DATA}, {@link #GET_SHARED_LIBRARY_FILES}, Loading @@ -1009,7 +1009,7 @@ public abstract class PackageManager { * @see #GET_META_DATA * @see #GET_SHARED_LIBRARY_FILES */ public abstract ActivityInfo getActivityInfo(ComponentName className, public abstract ActivityInfo getActivityInfo(ComponentName component, int flags) throws NameNotFoundException; /** Loading @@ -1019,8 +1019,8 @@ public abstract class PackageManager { * <p>Throws {@link NameNotFoundException} if a receiver with the given * class name can not be found on the system. * * @param className The full name (i.e. * com.google.apps.contacts.CalendarAlarm) of a Receiver * @param component The full component name (i.e. * com.google.apps.calendar/com.google.apps.calendar.CalendarAlarm) of a Receiver * class. * @param flags Additional option flags. Use any combination of * {@link #GET_META_DATA}, {@link #GET_SHARED_LIBRARY_FILES}, Loading @@ -1032,7 +1032,7 @@ public abstract class PackageManager { * @see #GET_META_DATA * @see #GET_SHARED_LIBRARY_FILES */ public abstract ActivityInfo getReceiverInfo(ComponentName className, public abstract ActivityInfo getReceiverInfo(ComponentName component, int flags) throws NameNotFoundException; /** Loading @@ -1042,8 +1042,8 @@ public abstract class PackageManager { * <p>Throws {@link NameNotFoundException} if a service with the given * class name can not be found on the system. * * @param className The full name (i.e. * com.google.apps.media.BackgroundPlayback) of a Service * @param component The full component name (i.e. * com.google.apps.media/com.google.apps.media.BackgroundPlayback) of a Service * class. * @param flags Additional option flags. Use any combination of * {@link #GET_META_DATA}, {@link #GET_SHARED_LIBRARY_FILES}, Loading @@ -1054,7 +1054,29 @@ public abstract class PackageManager { * @see #GET_META_DATA * @see #GET_SHARED_LIBRARY_FILES */ public abstract ServiceInfo getServiceInfo(ComponentName className, public abstract ServiceInfo getServiceInfo(ComponentName component, int flags) throws NameNotFoundException; /** * Retrieve all of the information we know about a particular content * provider class. * * <p>Throws {@link NameNotFoundException} if a provider with the given * class name can not be found on the system. * * @param component The full component name (i.e. * com.google.providers.media/com.google.providers.media.MediaProvider) of a * ContentProvider class. * @param flags Additional option flags. Use any combination of * {@link #GET_META_DATA}, {@link #GET_SHARED_LIBRARY_FILES}, * to modify the data returned. * * @return ProviderInfo containing information about the service. * * @see #GET_META_DATA * @see #GET_SHARED_LIBRARY_FILES */ public abstract ProviderInfo getProviderInfo(ComponentName component, int flags) throws NameNotFoundException; /** Loading services/java/com/android/server/PackageManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -1615,6 +1615,18 @@ class PackageManagerService extends IPackageManager.Stub { return null; } public ProviderInfo getProviderInfo(ComponentName component, int flags) { synchronized (mPackages) { PackageParser.Provider p = mProvidersByComponent.get(component); if (Config.LOGV) Log.v( TAG, "getProviderInfo " + component + ": " + p); if (p != null && mSettings.isEnabledLP(p.info, flags)) { return PackageParser.generateProviderInfo(p, flags); } } return null; } public String[] getSystemSharedLibraryNames() { Set<String> libSet; synchronized (mPackages) { Loading Loading
api/current.xml +37 −3 Original line number Diff line number Diff line Loading @@ -48120,7 +48120,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="className" type="android.content.ComponentName"> <parameter name="component" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> Loading Loading @@ -48516,6 +48516,23 @@ <parameter name="flags" type="int"> </parameter> </method> <method name="getProviderInfo" return="android.content.pm.ProviderInfo" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="component" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> <exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException"> </exception> </method> <method name="getReceiverInfo" return="android.content.pm.ActivityInfo" abstract="true" Loading @@ -48526,7 +48543,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="className" type="android.content.ComponentName"> <parameter name="component" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> Loading Loading @@ -48588,7 +48605,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="className" type="android.content.ComponentName"> <parameter name="component" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> Loading Loading @@ -158313,6 +158330,23 @@ <parameter name="flags" type="int"> </parameter> </method> <method name="getProviderInfo" return="android.content.pm.ProviderInfo" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="className" type="android.content.ComponentName"> </parameter> <parameter name="flags" type="int"> </parameter> <exception name="PackageManager.NameNotFoundException" type="android.content.pm.PackageManager.NameNotFoundException"> </exception> </method> <method name="getReceiverInfo" return="android.content.pm.ActivityInfo" abstract="false"
core/java/android/app/ContextImpl.java +15 −0 Original line number Diff line number Diff line Loading @@ -1844,6 +1844,21 @@ class ContextImpl extends Context { throw new NameNotFoundException(className.toString()); } @Override public ProviderInfo getProviderInfo(ComponentName className, int flags) throws NameNotFoundException { try { ProviderInfo pi = mPM.getProviderInfo(className, flags); if (pi != null) { return pi; } } catch (RemoteException e) { throw new RuntimeException("Package manager has died", e); } throw new NameNotFoundException(className.toString()); } @Override public String[] getSystemSharedLibraryNames() { try { Loading
core/java/android/content/pm/IPackageManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ interface IPackageManager { ServiceInfo getServiceInfo(in ComponentName className, int flags); ProviderInfo getProviderInfo(in ComponentName className, int flags); int checkPermission(String permName, String pkgName); int checkUidPermission(String permName, int uid); Loading
core/java/android/content/pm/PackageManager.java +34 −12 Original line number Diff line number Diff line Loading @@ -996,8 +996,8 @@ public abstract class PackageManager { * <p>Throws {@link NameNotFoundException} if an activity with the given * class name can not be found on the system. * * @param className The full name (i.e. * com.google.apps.contacts.ContactsList) of an Activity * @param component The full component name (i.e. * com.google.apps.contacts/com.google.apps.contacts.ContactsList) of an Activity * class. * @param flags Additional option flags. Use any combination of * {@link #GET_META_DATA}, {@link #GET_SHARED_LIBRARY_FILES}, Loading @@ -1009,7 +1009,7 @@ public abstract class PackageManager { * @see #GET_META_DATA * @see #GET_SHARED_LIBRARY_FILES */ public abstract ActivityInfo getActivityInfo(ComponentName className, public abstract ActivityInfo getActivityInfo(ComponentName component, int flags) throws NameNotFoundException; /** Loading @@ -1019,8 +1019,8 @@ public abstract class PackageManager { * <p>Throws {@link NameNotFoundException} if a receiver with the given * class name can not be found on the system. * * @param className The full name (i.e. * com.google.apps.contacts.CalendarAlarm) of a Receiver * @param component The full component name (i.e. * com.google.apps.calendar/com.google.apps.calendar.CalendarAlarm) of a Receiver * class. * @param flags Additional option flags. Use any combination of * {@link #GET_META_DATA}, {@link #GET_SHARED_LIBRARY_FILES}, Loading @@ -1032,7 +1032,7 @@ public abstract class PackageManager { * @see #GET_META_DATA * @see #GET_SHARED_LIBRARY_FILES */ public abstract ActivityInfo getReceiverInfo(ComponentName className, public abstract ActivityInfo getReceiverInfo(ComponentName component, int flags) throws NameNotFoundException; /** Loading @@ -1042,8 +1042,8 @@ public abstract class PackageManager { * <p>Throws {@link NameNotFoundException} if a service with the given * class name can not be found on the system. * * @param className The full name (i.e. * com.google.apps.media.BackgroundPlayback) of a Service * @param component The full component name (i.e. * com.google.apps.media/com.google.apps.media.BackgroundPlayback) of a Service * class. * @param flags Additional option flags. Use any combination of * {@link #GET_META_DATA}, {@link #GET_SHARED_LIBRARY_FILES}, Loading @@ -1054,7 +1054,29 @@ public abstract class PackageManager { * @see #GET_META_DATA * @see #GET_SHARED_LIBRARY_FILES */ public abstract ServiceInfo getServiceInfo(ComponentName className, public abstract ServiceInfo getServiceInfo(ComponentName component, int flags) throws NameNotFoundException; /** * Retrieve all of the information we know about a particular content * provider class. * * <p>Throws {@link NameNotFoundException} if a provider with the given * class name can not be found on the system. * * @param component The full component name (i.e. * com.google.providers.media/com.google.providers.media.MediaProvider) of a * ContentProvider class. * @param flags Additional option flags. Use any combination of * {@link #GET_META_DATA}, {@link #GET_SHARED_LIBRARY_FILES}, * to modify the data returned. * * @return ProviderInfo containing information about the service. * * @see #GET_META_DATA * @see #GET_SHARED_LIBRARY_FILES */ public abstract ProviderInfo getProviderInfo(ComponentName component, int flags) throws NameNotFoundException; /** Loading
services/java/com/android/server/PackageManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -1615,6 +1615,18 @@ class PackageManagerService extends IPackageManager.Stub { return null; } public ProviderInfo getProviderInfo(ComponentName component, int flags) { synchronized (mPackages) { PackageParser.Provider p = mProvidersByComponent.get(component); if (Config.LOGV) Log.v( TAG, "getProviderInfo " + component + ": " + p); if (p != null && mSettings.isEnabledLP(p.info, flags)) { return PackageParser.generateProviderInfo(p, flags); } } return null; } public String[] getSystemSharedLibraryNames() { Set<String> libSet; synchronized (mPackages) { Loading