APM: fix log spam from getDevicesForStrategyInt when booting devices.

1. Add initialization function for device selection cache in engine
   and call the initialization function before audio module creation.
   There is no device available before the audio module is available. In
   that case, there is no need to call getDevicesForStrategyInt to
   update the device selection cache.
2. Add speaker as the last selection for STRATEGY_PHONE so that there
   can still be something picked if there is no external device
   connected and no earpiece on the Android device.

Bug: 276781745
Test: make, boot device, check log
Change-Id: If976830dbb6cce192f8b15cd2937ff9824534cc7
diff --git a/services/audiopolicy/engineconfigurable/src/Engine.h b/services/audiopolicy/engineconfigurable/src/Engine.h
index 6ac20cd..d97efc7 100644
--- a/services/audiopolicy/engineconfigurable/src/Engine.h
+++ b/services/audiopolicy/engineconfigurable/src/Engine.h
@@ -67,8 +67,6 @@
                                                      sp<AudioPolicyMix> *mix = nullptr)
                                                      const override;
 
-    void updateDeviceSelectionCache() override;
-
     ///
     /// from AudioPolicyPluginInterface
     ///
@@ -123,15 +121,17 @@
 
     status_t loadAudioPolicyEngineConfig();
 
-    DeviceVector getDevicesForProductStrategy(product_strategy_t strategy) const;
     DeviceVector getCachedDevices(product_strategy_t ps) const;
 
+    ///
+    /// from EngineBase
+    ///
+    DeviceVector getDevicesForProductStrategy(product_strategy_t strategy) const override;
+
     /**
      * Policy Parameter Manager hidden through a wrapper.
      */
     ParameterManagerWrapper *mPolicyParameterMgr;
-
-    DeviceStrategyMap mDevicesForStrategies;
 };
 
 } // namespace audio_policy