@@ -471,7 +471,6 @@ class SystemCapabilityManager extends _SubManagerBase {
471471
472472 /**
473473 * Sends a request to core for the capability, instead of checking cached capabilities
474- * @deprecated since version 1.1. Use sendRpcResolve instead
475474 * @param {SystemCapabilityType } systemCapabilityType - A SystemCapabilityType enum value.
476475 * @returns {Promise } - Promise returning either the capability Object or null if not found
477476 */
@@ -511,47 +510,6 @@ class SystemCapabilityManager extends _SubManagerBase {
511510 return this . getCapability ( systemCapabilityType , retrievedCapability ) ;
512511 }
513512
514- /**
515- * Sends a request to core for the capability, instead of checking cached capabilities
516- * @param {SystemCapabilityType } systemCapabilityType - A SystemCapabilityType enum value.
517- * @returns {Promise } - Promise returning either the capability Object or null if not found
518- */
519- async updateCapabilityResolve ( systemCapabilityType ) {
520- // don't bother getting a capability if it isn't queryable
521- const getCapabilityMethodName = this . _getCapabilityMethodForType ( systemCapabilityType ) ;
522- if ( getCapabilityMethodName === null ) {
523- console . error ( `The systemCapabilityType ${ systemCapabilityType } cannot be queried for` ) ;
524- return null ;
525- }
526-
527- const request = new GetSystemCapability ( )
528- . setSystemCapabilityType ( systemCapabilityType ) ;
529-
530- if ( this . _lifecycleManager === null ) {
531- return null ;
532- }
533-
534- const response = await this . _lifecycleManager . sendRpcResolve ( request )
535- . catch ( err => {
536- if ( err instanceof RpcResponse ) {
537- console . error ( `GetSystemCapability for type ${ systemCapabilityType } returned with response code ${ err . getResultCode ( ) } ` ) ;
538- } else {
539- console . error ( new Error ( err ) ) ;
540- }
541- return null ;
542- } ) ;
543-
544- if ( response === null ) {
545- return null ;
546- }
547-
548- // invoke the correct get capability method
549- const retrievedCapability = response . getSystemCapability ( ) [ getCapabilityMethodName ] ( ) ;
550- this . _setCapability ( systemCapabilityType , retrievedCapability ) ;
551- // get the capability back through this method, because it may have changed the output
552- return this . getCapability ( systemCapabilityType , retrievedCapability ) ;
553- }
554-
555513 /**
556514 * Add an OnSystemCapabilityListener function.
557515 * @param {SystemCapabilityType } systemCapabilityType - A SystemCapabilityType enum value.
0 commit comments