843 sendPackageBroadcast(Intent.ACTION_PACKAGE_ADDED,
844 res.pkg.applicationInfo.packageName,
845 extras, null, null, firstUsers);
846 final boolean update = res.removedInfo.removedPackage != null;
847 if (update) {
848 extras.putBoolean(Intent.EXTRA_REPLACING, true);
849 }
850 sendPackageBroadcast(Intent.ACTION_PACKAGE_ADDED,
851 res.pkg.applicationInfo.packageName,
852 extras, null, null, updateUsers);
853 if (update) {
854 sendPackageBroadcast(Intent.ACTION_PACKAGE_REPLACED,
855 res.pkg.applicationInfo.packageName,
856 extras, null, null, updateUsers);
857 sendPackageBroadcast(Intent.ACTION_MY_PACKAGE_REPLACED,
858 null, null,
859 res.pkg.applicationInfo.packageName, null, updateUsers);