I want to know the implementation of the function getPackageInfo(because I want to know where the package they refer to is stored), so I went to this to see the source code, but only found an abstract method there.
getPackageInfo
public abstract PackageInfo getPackageInfo(String packageName, int flags) throws NameNotFoundException;
Where is the method implemented?
the implementation of the getPackageInfo method is in com.android.server.pm.PackageManagerService
@Override public PackageInfo getPackageInfo(String packageName, int flags, int userId) { // reader synchronized (mPackages) { PackageParser.Package p = mPackages.get(packageName); if (DEBUG_PACKAGE_INFO) Log.v(TAG, "getPackageInfo " + packageName + ": " + p); if (p != null) { return generatePackageInfo(p, flags); } if((flags & PackageManager.GET_UNINSTALLED_PACKAGES) != 0) { return generatePackageInfoFromSettingsLPw(packageName, flags, userId); } } return null; }
you can look here
PackageManager, , , MockPackageManager. , getPackageInfo. , , UnsupportedOperationException!
PackageManager
MockPackageManager
UnsupportedOperationException
, , ? ! , !
?
, , getPackageManager , PackageManager MockPackageManager . getPackageManager +, Android Studio Windows. OS X + .
getPackageManager
Source: https://habr.com/ru/post/1621682/More articles:is there any way to access the object inside the object? - javaHaving trouble using scipy.integrate.odeint with python - pythonThe float with the image to the right without flowing around the text - htmlHow to select multiple rows of mysql table as one row - mysqlConvert NSDate to JSON Date? - iosvertical viewing pager animation in android - androidUNITY-change ONLY a certain part of the color of the 3D model - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1621685/unity3d-how-to-make-method-calling-from-another-class-that-belongs-to-another-game-object-efficiently&usg=ALkJrhgqxzWr8P7wfZ7yMcpjXwj9ZPDpLgCompiling a smart contract without removing line breaks - bitcoinFlushing cache to prevent benchmarking fluctuations - c ++All Articles