From 53a7330fe15600c87d8cc1efdf87044719312b93 Mon Sep 17 00:00:00 2001 From: Weng Su Date: Wed, 8 Dec 2021 23:19:52 +0800 Subject: [PATCH] Remove unnecessary null check to make code consistent Bug: 209459024 Test: manual test atest -c InternetAdapterTest \ InternetDialogControllerTest \ InternetDialogTest Change-Id: I64df820d24260a6169396e038ecf5a52096c3bdb --- .../qs/tiles/dialog/InternetDialogController.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java index 1fee1b430073e..799a16ef9ab1f 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java @@ -882,10 +882,8 @@ public class InternetDialogController implements AccessPointController.AccessPoi if (accessPoints == null || accessPoints.size() == 0) { mConnectedEntry = null; mWifiEntriesCount = 0; - if (mCallback != null) { - mCallback.onAccessPointsChanged(null /* wifiEntries */, null /* connectedEntry */, - false /* hasMoreEntry */); - } + mCallback.onAccessPointsChanged(null /* wifiEntries */, null /* connectedEntry */, + false /* hasMoreEntry */); return; } @@ -917,9 +915,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi mConnectedEntry = connectedEntry; mWifiEntriesCount = wifiEntries.size(); - if (mCallback != null) { - mCallback.onAccessPointsChanged(wifiEntries, mConnectedEntry, hasMoreEntry); - } + mCallback.onAccessPointsChanged(wifiEntries, mConnectedEntry, hasMoreEntry); } @Override