Remove usage of deprecated toolbar methods am: 1033c500cf am: e37e75983e

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/SettingsIntelligence/+/11723392

Change-Id: Ic977c57bce10edc6c2bbdec11b8405ccf515efb6
diff --git a/src/com/android/settings/intelligence/search/car/CarSearchFragment.java b/src/com/android/settings/intelligence/search/car/CarSearchFragment.java
index 6a580ab..0c49b11 100644
--- a/src/com/android/settings/intelligence/search/car/CarSearchFragment.java
+++ b/src/com/android/settings/intelligence/search/car/CarSearchFragment.java
@@ -158,11 +158,7 @@
 
         // If indexing is not finished, register the query text, but don't search.
         if (!mSearchFeatureProvider.isIndexingComplete(getActivity())) {
-            if (!isEmptyQuery) {
-                mToolbar.showProgressBar();
-            } else {
-                mToolbar.hideProgressBar();
-            }
+            mToolbar.getProgressBar().setVisible(!isEmptyQuery);
             return;
         }
 
@@ -228,7 +224,7 @@
         if (getActivity() == null) {
             return;
         }
-        mToolbar.hideProgressBar();
+        mToolbar.getProgressBar().setVisible(false);
         if (mShowingSavedQuery) {
             mSavedQueryController.loadSavedQueries();
         } else {