Merge "Add null checks" am: 2e77ad99c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2232549 Change-Id: Id5ebc78960b9e4ca396fd56c5748ed188b5031fe Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -65,8 +65,16 @@ class EnforcePermissionDetector : Detector(), SourceCodeScanner {
|
||||
if (attr1[i].name != attr2[i].name) {
|
||||
return false
|
||||
}
|
||||
val v1 = ConstantEvaluator.evaluate(context, attr1[i].value)
|
||||
val v2 = ConstantEvaluator.evaluate(context, attr2[i].value)
|
||||
val value1 = attr1[i].value
|
||||
val value2 = attr2[i].value
|
||||
if (value1 == null && value2 == null) {
|
||||
continue
|
||||
}
|
||||
if (value1 == null || value2 == null) {
|
||||
return false
|
||||
}
|
||||
val v1 = ConstantEvaluator.evaluate(context, value1)
|
||||
val v2 = ConstantEvaluator.evaluate(context, value2)
|
||||
if (v1 != v2) {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user