equal
deleted
inserted
replaced
104 iUsbDeviceLock = CUsbDeviceLock::NewL( *this ); |
104 iUsbDeviceLock = CUsbDeviceLock::NewL( *this ); |
105 iUsbDeviceLock->Subscribe(); |
105 iUsbDeviceLock->Subscribe(); |
106 iGlobalStateObserver = CUsbGlobalSystemStateObserver::NewL( *this ); |
106 iGlobalStateObserver = CUsbGlobalSystemStateObserver::NewL( *this ); |
107 iUsbDevConStarter = CUsbDevConStarter::NewL(); |
107 iUsbDevConStarter = CUsbDevConStarter::NewL(); |
108 iActiveState = CUsbActiveState::NewL( iUsbMan, *this ); |
108 iActiveState = CUsbActiveState::NewL( iUsbMan, *this ); |
|
109 iUsbIndicatorHandler = CUsbIndicatorHandler::NewL(); |
109 } |
110 } |
110 |
111 |
111 // ---------------------------------------------------------------------------- |
112 // ---------------------------------------------------------------------------- |
112 // Two-phased constructor. |
113 // Two-phased constructor. |
113 // ---------------------------------------------------------------------------- |
114 // ---------------------------------------------------------------------------- |
145 delete iPersonalityRepository; |
146 delete iPersonalityRepository; |
146 delete iOtgWatcher; |
147 delete iOtgWatcher; |
147 delete iUsbDeviceLock; |
148 delete iUsbDeviceLock; |
148 delete iGlobalStateObserver; |
149 delete iGlobalStateObserver; |
149 iSupportedPersonalities.Close(); |
150 iSupportedPersonalities.Close(); |
|
151 delete iUsbIndicatorHandler; |
150 } |
152 } |
151 |
153 |
152 // ---------------------------------------------------------------------------- |
154 // ---------------------------------------------------------------------------- |
153 // Get personality plugins. Note that this is done only in normal mode. |
155 // Get personality plugins. Note that this is done only in normal mode. |
154 // ---------------------------------------------------------------------------- |
156 // ---------------------------------------------------------------------------- |
215 |
217 |
216 // ---------------------------------------------------------------------------- |
218 // ---------------------------------------------------------------------------- |
217 // This method notifies CUsbWatcher class about USB state changes. |
219 // This method notifies CUsbWatcher class about USB state changes. |
218 // ---------------------------------------------------------------------------- |
220 // ---------------------------------------------------------------------------- |
219 // |
221 // |
220 void CUsbWatcher::StateChangeNotify( TUsbDeviceState aStateOld, |
222 void CUsbWatcher::StateChangeNotifyL( TUsbDeviceState aStateOld, |
221 TUsbDeviceState aStateNew ) |
223 TUsbDeviceState aStateNew ) |
222 { |
224 { |
223 LOG_FUNC |
225 LOG_FUNC |
224 |
226 |
225 // Handling USB indicator. This is valid for both A- and B-device cases. |
227 // Handling USB indicator. This is valid for both A- and B-device cases. |
226 // Not show USB indicator in charging mode |
228 // Not show USB indicator in charging mode |
227 if ( iNormalStart ) |
229 if ( iNormalStart ) |
228 { |
230 { |
229 iUsbIndicatorHandler.HandleDeviceStateChange( aStateOld, aStateNew ); |
231 iUsbIndicatorHandler->HandleDeviceStateChangeL( aStateOld, aStateNew, iPersonalityId ); |
230 } |
232 } |
231 |
233 |
232 if ( IsDeviceA() ) // Will be handled by UsbOtgWatcher |
234 if ( IsDeviceA() ) // Will be handled by UsbOtgWatcher |
233 { |
235 { |
234 LOG( "Device state change ignored by UsbWatcher in A-device state" ); |
236 LOG( "Device state change ignored by UsbWatcher in A-device state" ); |