summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorKevin Rocard <krocard@google.com>2019-04-03 12:37:32 -0700
committerKevin Rocard <krocard@google.com>2019-05-20 15:30:27 -0700
commit935df08b15d291e9696159526fd067a37a1b66fb (patch)
tree736f05af62ee2d0fa153328dba18deda3a20b769 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent9637326ea8124b79bea08b8183da4d5853a08c23 (diff)
Refactor security checks to register policies
There is no functional changes in this patch The checks were much more complex then needed. The behaviour on empty mix was not explicit, it depended on non trivial behaviour of anyMatch and allMatch and the code flow. There was an early positive return leading to the rest of the permission check to be skipped. Which was correct but prone to bugs if the code was changed. The code in general was hard to change without introducing security bug as well as difficult to review. Change it to a two part section, first the permissions needed are determined explicitly. Then those permissions are checked. Early return is only used for permission denial. Test: atest android.media.cts.AudioPlaybackCaptureTest#testCaptureMediaUsage Bug: 129948989 Change-Id: I6b4177e47025af983ba6c980d58ea308c4c378f1 Signed-off-by: Kevin Rocard <krocard@google.com>
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions