diff -r ff9df6630274 -r bb32eca979b3 usbengines/usbotgwatcher/src/cusbindicatornotifier.cpp --- a/usbengines/usbotgwatcher/src/cusbindicatornotifier.cpp Mon Mar 15 12:44:42 2010 +0200 +++ b/usbengines/usbotgwatcher/src/cusbindicatornotifier.cpp Wed Mar 31 23:11:08 2010 +0300 @@ -54,7 +54,6 @@ LOG_FUNC Close(); - delete iIconBlinkingTimer; if (iOtgWatcher.VBusObserver()) { @@ -95,11 +94,8 @@ // Subscribe for otg watcher states change notifications iOtgWatcher.SubscribeL(*this); - iIconBlinkingTimer = CUsbTimer::NewL(*this, EIconBlinkingTimer); - // check here for condition to set usb indicator SetIndicatorL(); - } // --------------------------------------------------------------------------- @@ -114,8 +110,6 @@ LOG1("aVisible = %d" , aVisible); - iIconBlinkingTimer->Cancel(); - SetIndicatorStateL(aVisible ? EAknIndicatorStateOn : EAknIndicatorStateOff); @@ -129,8 +123,7 @@ { LOG_FUNC - // Will be canceled if active in After() - iIconBlinkingTimer->After(0); + SetIndicatorStateL( EAknIndicatorStateAnimate ); } // --------------------------------------------------------------------------- @@ -152,42 +145,10 @@ { LOG_FUNC - iIconBlinkingTimer->Cancel(); TRAP_IGNORE( ShowStaticL(EFalse) ); } // --------------------------------------------------------------------------- -// From MUsbTimerObserver -// --------------------------------------------------------------------------- -// -void CUsbIndicatorNotifier::TimerElapsedL(TUsbTimerId aTimerId) - { - switch (aTimerId) - { - case EIconBlinkingTimer: - { - SetIndicatorStateL(iIndicatorState - ? EAknIndicatorStateOn - : EAknIndicatorStateOff); - - iIndicatorState - = (iIndicatorState == EAknIndicatorStateOn - ? EAknIndicatorStateOff - : EAknIndicatorStateOn); - - // Will be canceled if active in After() - iIconBlinkingTimer->After(KUsbIndicatorBlinkingInterval); - break; - } - default: - { - LOG1("Unknown timer id = %d", aTimerId) - PANIC(EWrongTimerId); - } - } - } - -// --------------------------------------------------------------------------- // Set USB indicator On or Off // --------------------------------------------------------------------------- //