commit | 2b98fb3667ef61cadbf2529ca889a01e1b8d2614 | [log] [tgz] |
---|---|---|
author | Hai Zhang <zhanghai@google.com> | Fri Sep 21 15:18:46 2018 -0700 |
committer | Hai Zhang <zhanghai@google.com> | Fri Sep 21 15:24:42 2018 -0700 |
tree | b932a99a61ac51f187a85dc699a96830a16e3531 | |
parent | 6c109c76c99a0d8f3437b4530f6e5281bb45f00d [diff] |
Fix AppOpsService setUidMode() when mode is 0 (MODE_ALLOWED). Previously the code was calling SparseIntArray.get() without checking for indexOfKey() >= 0 first, which leads to a default value of 0 that collides with MODE_ALLOWED. This fix adds the check before get() is called. Test: manual Change-Id: I04c183d6cd60cd1ec0babf47b905592c2fb62d4d