equal
deleted
inserted
replaced
488 deviceSecurity.SetNoAuthorise(EFalse); |
488 deviceSecurity.SetNoAuthorise(EFalse); |
489 iDevice->SetGlobalSecurity(deviceSecurity); |
489 iDevice->SetGlobalSecurity(deviceSecurity); |
490 iDevice->DeleteLinkKey(); |
490 iDevice->DeleteLinkKey(); |
491 |
491 |
492 iBTRegistryQueryState = ESetDeviceBlocked; |
492 iBTRegistryQueryState = ESetDeviceBlocked; |
|
493 TInt err = KErrNone; |
493 if( !iDevMan ) |
494 if( !iDevMan ) |
494 { |
495 { |
495 iDevMan = CBTEngDevMan::NewL( this ); |
496 TRAP(err, iDevMan = CBTEngDevMan::NewL( this )); |
496 } |
497 } |
497 TInt devManErr = iDevMan->ModifyDevice( *iDevice ); |
498 if( !err ) |
498 |
499 { |
499 // if error, complete message, otherwise waiting for devman callback |
500 err = iDevMan->ModifyDevice( *iDevice ); |
500 // |
501 } |
501 if(devManErr != KErrNone) |
502 if( err ) |
502 CompleteMessage(devManErr); |
503 { |
|
504 // if error, complete message, otherwise waiting for devman callback |
|
505 CompleteMessage(err); |
|
506 } |
503 } |
507 } |
504 |
508 |
505 void CBTNotifierBase::ChangeAuthorizeState( TBool aTrust ) |
509 void CBTNotifierBase::ChangeAuthorizeState( TBool aTrust ) |
506 { |
510 { |
507 FLOG(_L("[BTNOTIF]\t CBTNotifierBase::ChangeAuthorizeState()")); |
511 FLOG(_L("[BTNOTIF]\t CBTNotifierBase::ChangeAuthorizeState()")); |
509 sec.SetBanned(EFalse); |
513 sec.SetBanned(EFalse); |
510 sec.SetNoAuthorise( ( aTrust ) ? ETrue : EFalse ) ; |
514 sec.SetNoAuthorise( ( aTrust ) ? ETrue : EFalse ) ; |
511 iDevice->SetGlobalSecurity(sec); |
515 iDevice->SetGlobalSecurity(sec); |
512 |
516 |
513 iBTRegistryQueryState = ESetDeviceAuthorizeState; |
517 iBTRegistryQueryState = ESetDeviceAuthorizeState; |
|
518 TInt err = KErrNone; |
514 if( !iDevMan ) |
519 if( !iDevMan ) |
515 { |
520 { |
516 iDevMan = CBTEngDevMan::NewL( this ); |
521 TRAP(err, iDevMan = CBTEngDevMan::NewL( this )); |
517 } |
522 } |
518 TInt devManErr = iDevMan->ModifyDevice( *iDevice ); |
523 if( !err ) |
519 |
524 { |
520 // if error, complete message, otherwise waiting for devman callback |
525 err = iDevMan->ModifyDevice( *iDevice ); |
521 // |
526 } |
522 if(devManErr != KErrNone) |
527 if( err ) |
523 { |
528 { |
524 CompleteMessage(devManErr); |
529 // if error, complete message, otherwise waiting for devman callback |
|
530 CompleteMessage(err); |
525 TBTNotifLockPublish::DeleteNotifLocks( |
531 TBTNotifLockPublish::DeleteNotifLocks( |
526 EBTNotiferLockPairedDeviceSetting, iDevice->BDAddr() ); |
532 EBTNotiferLockPairedDeviceSetting, iDevice->BDAddr() ); |
527 } |
533 } |
528 } |
534 } |
529 |
535 |