在系统内置app中用代码调用系统安装接口安装app时抛出Permission Denial: that is not exported from UID 1000的异常时,查询资料发现通常是由于Uri权限导致的问题
例如:
File apk = new File(...);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
Uri uri = FileProvider.