From 845d825ad15fe0f6088ac975ad69f483f7b0baa6 Mon Sep 17 00:00:00 2001 From: David Su Date: Mon, 3 Aug 2020 15:05:29 -0700 Subject: 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 --- service/java/com/android/server/wifi/ClientModeImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'service') 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) { -- cgit v1.2.3