summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorDavid Su <dysu@google.com>2020-08-03 15:05:29 -0700
committerDavid Su <dysu@google.com>2020-08-03 22:19:50 +0000
commit845d825ad15fe0f6088ac975ad69f483f7b0baa6 (patch)
tree44ef2695fe3b7a38534625e49e1206ab465356ac /service
parentb64129c61416da5a3817d328a7adb166485254ea (diff)
ClientModeImpl: remove redundant comparison
There is no point checking for inequality before assigning, because if they are equal, the assignment is a no-op. Bug: 162705230 Test: atest FrameworksWifiTests Change-Id: I4af5aa0c24f9b0a38223538c2f42882107de3742
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index fd79d8258..568824357 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -4911,9 +4911,7 @@ public class ClientModeImpl extends StateMachine {
mLastNetworkId = message.arg1;
mWifiInfo.setNetworkId(mLastNetworkId);
mWifiInfo.setMacAddress(mWifiNative.getMacAddress(mInterfaceName));
- if (!mLastBssid.equals(message.obj)) {
- mLastBssid = (String) message.obj;
- }
+ mLastBssid = (String) message.obj;
break;
case CMD_ONESHOT_RSSI_POLL:
if (!mEnableRssiPolling) {