summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramVertexFixedFunction.java
diff options
context:
space:
mode:
authorJohn Zhao <yuankuiz@qualcomm.corp-partner.google.com>2018-09-06 00:29:31 +0800
committerFan Zhang <zhfan@google.com>2018-09-11 20:47:06 +0000
commit99c1ddc921060f54a7b4bcd7a4251b349daf2b8c (patch)
tree060d27741486196b3c36edf0cf2d312f4eef6f59 /rs/java/android/renderscript/ProgramVertexFixedFunction.java
parent90d5e7b190e120efce0354e6170969f88d97a6b7 (diff)
DO NOT MERGE base: getDataUsageInfo get cycle validation
When the DataUsageController calculate the DataUsageInfo based on the cycle from NetworkPolicyManager, that cycle should be not null. Otherwise, it couldn't be used to do operation like toInstant() directly. The error could be got from logcat is as: E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.time.Instant java.time.ZonedDateTime.toInstant()' on a null object reference E AndroidRuntime: at com.android.settingslib.net. DataUsageController.getDataUsageInfo (DataUsageController.java:140) Inside of the core/java/android/net/NetworkPolicyManager.java: public static Iterator<Pair<ZonedDateTime, ZonedDateTime>> cycleIterator(NetworkPolicy policy) { ... ... return Pair.create(null, null); ... ... } That should be avoided. Considering it could be happened in the NetworkPolicyManager side, and it is reasonable if it did it, validating operation is better to be considered by any caller such as the DataUsageController. Bug: 113952713 Test: specify the hasNext to be false but the DataUsageController don't crash. Change-Id: I2469c129a160e30615ea6011adf18688f951eac8 Signed-off-by: John Zhao <yuankuiz@qualcomm.corp-partner.google.com>
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions