@RequiresApi(O) private boolean isCallerQualified(final ApplicationInfo caller_app_info) {
		if (Apps.isPrivileged(caller_app_info) && getIntent().getBooleanExtra(EXTRA_NOT_UNKNOWN_SOURCE, false))
			return true;	// From trusted source declared by privileged caller, skip checking.
		final int source_uid = getOriginatingUid(caller_app_info);
		if (source_uid < 0) return true;		// From trusted caller (download provider, documents UI and etc.)
		final PackageManager pm = getPackageManager();
		final CharSequence source_label;
		if (source_uid != caller_app_info.uid) {		// Originating source is not the caller
			final String[] pkgs = pm.getPackagesForUid(source_uid);
			if (pkgs != null) for (final String pkg : pkgs)
				if (isSourceQualified(Apps.of(this).getAppInfo(pkg))) return true;
			source_label = pm.getNameForUid(source_uid);
		} else {
			if (isSourceQualified(caller_app_info)) return true;
			source_label = caller_app_info.loadLabel(pm);
		}
		Toasts.show(this, source_label + " does not declare " + REQUEST_INSTALL_PACKAGES, Toast.LENGTH_LONG);
		return false;
	}
@param base_pkg the base package name for split APK installation, or null for full installation.
installer/src/main/java/com/oasisfeng/island/installer/AppInstallerActivity.java