summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Sapperstein <asapperstein@google.com>2023-11-03 15:14:31 +0000
committerAndrew Sapperstein <asapperstein@google.com>2023-11-03 15:14:32 +0000
commit9a7c3b163d667bfd0c8d1d17b9425d45bcab9afe (patch)
tree373a8325f5ca2b9c4ba2cba7e47633e714f31834
parentcb112ab31e8ada2c29bd9693af6d6e52bf68b337 (diff)
downloadwifi-9a7c3b163d667bfd0c8d1d17b9425d45bcab9afe.tar.gz
Fix flag check.
The check is meant to return the default value if the flag is false, but it was returning the default value when the flag is true, and otherwise not running the test. Bug: 309033616 Change-Id: I2633d74ec0f97b12922fb8350e9486898f86f40b Test: atest HotspotNetworkEntryTest
-rw-r--r--libs/WifiTrackerLib/src/com/android/wifitrackerlib/HotspotNetworkEntry.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/HotspotNetworkEntry.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/HotspotNetworkEntry.java
index c5ebf6e15..a9d5956c5 100644
--- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/HotspotNetworkEntry.java
+++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/HotspotNetworkEntry.java
@@ -342,7 +342,7 @@ public class HotspotNetworkEntry extends WifiEntry {
* If the host device is currently charging its battery.
*/
public synchronized boolean isBatteryCharging() {
- if (mHotspotNetworkData == null || networkProviderBatteryChargingStatus()) {
+ if (mHotspotNetworkData == null || !networkProviderBatteryChargingStatus()) {
return false;
}
return mHotspotNetworkData.getNetworkProviderInfo().isBatteryCharging();