btm_inq_vars.scan_type is not useful

was never checked to do anything interesting, was always general or none

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie8d7e20a11a5d256cc19504abdfdb893f18459f6
diff --git a/system/main/shim/btm_api.cc b/system/main/shim/btm_api.cc
index d9af8a7..0a54c8b 100644
--- a/system/main/shim/btm_api.cc
+++ b/system/main/shim/btm_api.cc
@@ -242,7 +242,6 @@
   std::lock_guard<std::mutex> lock(btm_cb_mutex_);
 
   btm_cb.btm_inq_vars.inq_cmpl_info.num_resp = 0;
-  btm_cb.btm_inq_vars.scan_type = INQ_GENERAL;
 
   Stack::GetInstance()->GetBtm()->StartActiveScanning();
   if (inqparms.duration != 0) {
@@ -293,10 +292,6 @@
                 btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr;
               }
             }
-            if (btm_cb.btm_inq_vars.inqparms.mode == BTM_INQUIRY_NONE &&
-                btm_cb.btm_inq_vars.scan_type == INQ_GENERAL) {
-              btm_cb.btm_inq_vars.scan_type = INQ_NONE;
-            }
           })) {
     LOG_WARN("%s Unable to start inquiry", __func__);
     return BTM_ERR_PROCESSING;
@@ -395,7 +390,6 @@
             btm_cb.ble_ctr_cb.p_obs_cmpl_cb = nullptr;
 
             btm_cb.btm_inq_vars.inqparms.mode &= ~(BTM_BLE_INQUIRY_MASK);
-            btm_cb.btm_inq_vars.scan_type = INQ_NONE;
 
             btm_acl_update_inquiry_status(BTM_INQUIRY_COMPLETE);
 
@@ -559,10 +553,6 @@
       btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr;
     }
   }
-  if (btm_cb.btm_inq_vars.inqparms.mode == BTM_INQUIRY_NONE &&
-      btm_cb.btm_inq_vars.scan_type == INQ_GENERAL) {
-    btm_cb.btm_inq_vars.scan_type = INQ_NONE;
-  }
 }
 
 tBTM_STATUS bluetooth::shim::BTM_ReadRemoteDeviceName(
diff --git a/system/stack/btm/btm_ble_gap.cc b/system/stack/btm/btm_ble_gap.cc
index 0949e10..8ad6717 100644
--- a/system/stack/btm/btm_ble_gap.cc
+++ b/system/stack/btm/btm_ble_gap.cc
@@ -389,9 +389,8 @@
   uint32_t scan_window =
       !p_inq->scan_window ? BTM_BLE_GAP_DISC_SCAN_WIN : p_inq->scan_window;
 
-  BTM_TRACE_EVENT("%s : scan_type:%d, %d, %d", __func__,
-                  btm_cb.btm_inq_vars.scan_type, p_inq->scan_interval,
-                  p_inq->scan_window);
+  BTM_TRACE_EVENT("%s : scan_type:%d, %d, %d", __func__, p_inq->scan_type,
+                  p_inq->scan_interval, p_inq->scan_window);
 
   if (!controller_get_interface()->supports_ble()) return BTM_ILLEGAL_VALUE;
 
diff --git a/system/stack/btm/btm_inq.cc b/system/stack/btm/btm_inq.cc
index 93227bc..245da71 100644
--- a/system/stack/btm/btm_inq.cc
+++ b/system/stack/btm/btm_inq.cc
@@ -563,8 +563,6 @@
   if (p_inq->inq_active) {
     LOG(ERROR) << __func__ << ": BTM_BUSY";
     return (BTM_BUSY);
-  } else {
-    p_inq->scan_type = INQ_GENERAL;
   }
 
   /*** Make sure the device is ready ***/
@@ -1357,11 +1355,6 @@
       if (p_inq_cb) (p_inq_cb)((tBTM_INQUIRY_CMPL*)&p_inq->inq_cmpl_info);
     }
   }
-  if (p_inq->inqparms.mode == 0 &&
-      p_inq->scan_type == INQ_GENERAL)  // this inquiry is complete
-  {
-    p_inq->scan_type = INQ_NONE;
-  }
 #if (BTM_INQ_DEBUG == TRUE)
   BTM_TRACE_DEBUG("inq_active:0x%x state:%d", btm_cb.btm_inq_vars.inq_active,
                   btm_cb.btm_inq_vars.state);
diff --git a/system/stack/btm/security_device_record.h b/system/stack/btm/security_device_record.h
index 2aa4208..d0e7f28 100644
--- a/system/stack/btm/security_device_record.h
+++ b/system/stack/btm/security_device_record.h
@@ -179,7 +179,6 @@
   uint16_t inq_scan_period;
   uint16_t inq_scan_type;
   uint16_t page_scan_type; /* current page scan type */
-  tBTM_INQ_TYPE scan_type;
 
   RawAddress remname_bda; /* Name of bd addr for active remote name request */
 #define BTM_RMT_NAME_EXT 0x1 /* Initiated through API */