@CheckResult <R, T extends Throwable> R proceed(final OutboundType type, final @Nullable Intent intent, final @Nullable R negative_value, final WrappedValueProcedureThrows<R, T> procedure) throws T { final String target_pkg = intent != null ? getTargetPackage(intent) : null; if (target_pkg != null) { if (mBase.getPackageName().equals(target_pkg)) return procedure.proceed(); // Self-targeting request is allowed unconditionally if (shouldBlockRequestTarget(type, intent, target_pkg)) return negative_value; } final int original_flags = intent != null ? adjustIntentFlags(type, intent) : 0; try { return procedure.proceed(); } finally { if (intent != null) intent.setFlags(original_flags); } }
@SuppressWarnings("TypeParameterHidesVisibleType") @CheckResult <R, T extends Throwable> R proceed(final OutboundType type, final Intent intent, final @Nullable R negative_value, final CondomCore.WrappedValueProcedureThrows<R, T> procedure) throws T { final String target_pkg = getTargetPackage(intent); if (target_pkg != null) { if (mBase.getPackageName().equals(target_pkg)) return procedure.proceed(); // Self-targeting request is allowed unconditionally if (shouldBlockRequestTarget(type, intent, target_pkg)) return negative_value; } final int original_flags = adjustIntentFlags(type, intent); try { return procedure.proceed(); } finally { intent.setFlags(original_flags); } }