private void onPackageEvent(final String pkg) {
		final Map<String, T> apps = mAppMap.get();
		T entry = null;
		try { //noinspection WrongConstant
			final ApplicationInfo info = context().getPackageManager().getApplicationInfo(pkg, PM_FLAGS_APP_INFO);
			final T last_entry = mAppMap.get().get(pkg);
			entry = createEntry(info, last_entry);
		} catch (final PackageManager.NameNotFoundException ignored) {}

		if (entry != null) {
			if (apps.put(pkg, entry) != null) Log.i(TAG, "Updated: " + pkg);
			else Log.i(TAG, "Added: " + pkg);
			notifyUpdate(Collections.singleton(entry));
		} else if ((entry = apps.remove(pkg)) != null) {
			Log.i(TAG, "Removed: " + pkg);
			notifyRemoval(Collections.singleton(entry));
		} else Log.e(TAG, "Event of non-existent package: " + pkg);		// Already removed somewhere before?
	}
Called upon the first fetch to build the list lazily and start to monitor related events.
mobile/src/main/java/com/oasisfeng/common/app/AppListProvider.java