84 iChargingStatus.Subscribe( iStatus ); |
84 iChargingStatus.Subscribe( iStatus ); |
85 SetActive(); |
85 SetActive(); |
86 |
86 |
87 if ( KErrNone != errorStatus ) |
87 if ( KErrNone != errorStatus ) |
88 { |
88 { |
89 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CCHARGINGSTATUSOBSERVER_RUNL_1, "TSY: CChargingStatusObserver::RunL - iStatus: %d", errorStatus ); |
89 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CCHARGINGSTATUSOBSERVER_RUNL_1, "TSY: CChargingStatusObserver::RunL - iStatus: %{TSymbianErrorCodes}", errorStatus ); |
90 iChargingStatusNotifier.NotifyChargingStatus( errorStatus, |
90 iChargingStatusNotifier.NotifyChargingStatus( errorStatus, |
91 batteryInfo ); |
91 batteryInfo ); |
92 return; |
92 return; |
93 } |
93 } |
94 |
94 |
95 // property updated, get new value |
95 // property updated, get new value |
96 TInt level( 0 ); |
96 TInt level( 0 ); |
97 TInt error = iChargingStatus.Get( level ); |
97 TInt error = iChargingStatus.Get( level ); |
98 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CCHARGINGSTATUSOBSERVER_RUNL_2, "TSY: CChargingStatusObserver::RunL error: %d", error); |
98 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CCHARGINGSTATUSOBSERVER_RUNL_2, "TSY: CChargingStatusObserver::RunL error: %{TSymbianErrorCodes}", error); |
99 |
99 |
100 if ( KErrNone == error ) |
100 if ( KErrNone == error ) |
101 { |
101 { |
102 EPSHWRMChargingStatus chargingStatus = (EPSHWRMChargingStatus)level; |
102 EPSHWRMChargingStatus chargingStatus = (EPSHWRMChargingStatus)level; |
103 |
103 |