diff options
author | chenjiahui <chenjiahui@google.com> | 2024-04-12 21:07:37 +0000 |
---|---|---|
committer | Jiahui Chen <chenjiahui@google.com> | 2024-04-17 22:48:08 +0000 |
commit | 8c8437bde4e1e4642f6d99502e496436804b44ba (patch) | |
tree | d162a1a4157defed1c54095719255e879f91351f | |
parent | 421c614bd46fe5c41b0d933235822bcd00f81890 (diff) | |
download | AdServices-android14-tests-dev.tar.gz |
[DO NOT MERGE]Fix NPE for CtsAdServicesHostTestsandroid14-tests-dev
`INativeDevice#getProperty()` might return `null` value. It would fail the test case for CTS-ON-GSI.
Update the checking logic to handle the `null` case.
Bug: 326857778
Test: atest com.android.adservices.cts.UiApiLoggingHostTest
Change-Id: I90dff2fff2295bc550337d1468127fe8a5368086
Merged-In: I90dff2fff2295bc550337d1468127fe8a5368086
Signed-off-by: chenjiahui <chenjiahui@google.com>
-rw-r--r-- | adservices/tests/cts/hosttests/src/com/android/adservices/cts/UiApiLoggingHostTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/adservices/tests/cts/hosttests/src/com/android/adservices/cts/UiApiLoggingHostTest.java b/adservices/tests/cts/hosttests/src/com/android/adservices/cts/UiApiLoggingHostTest.java index 75060b0bb..d2426b915 100644 --- a/adservices/tests/cts/hosttests/src/com/android/adservices/cts/UiApiLoggingHostTest.java +++ b/adservices/tests/cts/hosttests/src/com/android/adservices/cts/UiApiLoggingHostTest.java @@ -261,6 +261,6 @@ public class UiApiLoggingHostTest implements IDeviceTest { return !DeviceUtils.hasFeature(device, FEATURE_WATCH) && !DeviceUtils.hasFeature(device, FEATURE_AUTOMOTIVE) && !DeviceUtils.hasFeature(device, FEATURE_LEANBACK) - && !device.getProperty(LOW_RAM_DEVICE_CONFIG).equals("true"); + && !"true".equals(device.getProperty(LOW_RAM_DEVICE_CONFIG)); } } |