commit | 513e3a3dfa54ecaa2e12a049cd2b5e7dc7b8dc47 | [log] [tgz] |
---|---|---|
author | roldenburg <roldenburg@google.com> | Tue Jun 20 16:42:44 2017 -0700 |
committer | Eric Erfanian <erfanian@google.com> | Wed Jun 21 13:48:40 2017 -0700 |
tree | 83ddc461371decdbb299a802aa8c1dbda155a13c | |
parent | d06625785de67bf27ba9ad4ff02dfd20011edb74 [diff] |
Don't pass a null Context to RenderScript We need to check that we have a Context before passing it to RenderScript.create. getContext can return null if the fragment has been removed. I switched this to an early return approach to avoid the deep nesting and added tests. It is safe to ignore the IfThisThenThat PiperOrigin-RevId: 159633511 Change-Id: If2286a545c2e514c328dff22c48a99b9ed232e88