mirror of
https://gitee.com/openharmony/usb_usb_manager
synced 2024-11-23 14:50:35 +00:00
fix: master code equally
Signed-off-by: pingliao <liaoping9@h-partners.com>
This commit is contained in:
parent
a93da8b675
commit
d5f2f2088d
@ -24,7 +24,7 @@ class UsbDialogStub extends rpc.RemoteObject {
|
||||
constructor(des) {
|
||||
super(des);
|
||||
}
|
||||
onRemoteRequest(code, data, reply, option): boolean {
|
||||
onRemoteRequest(code, data, reply, option): boolean {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -99,9 +99,6 @@ export default class UsbDialogAbility extends extension {
|
||||
const usbWin = await window.createWindow(config);
|
||||
console.log('createWindow execute');
|
||||
globalThis.window = usbWin;
|
||||
//let token: UsbDialogStub = new UsbDialogStub('UsbRightDialog');
|
||||
//await usbWin.bindDialogTarget(token);
|
||||
//console.log('createWindow bindDialogTarget');
|
||||
|
||||
await usbWin.moveTo(rect.left, rect.top);
|
||||
await usbWin.resetSize(rect.width, rect.height);
|
||||
|
@ -12,8 +12,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import UIExtensionAbility from '@ohos.app.ability.UIExtensionAbility'
|
||||
import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession'
|
||||
import UIExtensionAbility from '@ohos.app.ability.UIExtensionAbility';
|
||||
import UIExtensionContentSession from '@ohos.app.ability.UIExtensionContentSession';
|
||||
import rpc from '@ohos.rpc';
|
||||
|
||||
let TAG: string = 'UsbService';
|
||||
@ -32,7 +32,7 @@ export default class UsbFunctionSwitchAbility extends UIExtensionAbility {
|
||||
console.error('check permission fail');
|
||||
return;
|
||||
}
|
||||
AppStorage.setOrCreate("session", session);
|
||||
AppStorage.setOrCreate('session', session);
|
||||
(session as UIExtensionContentSession)?.loadContent('pages/Index');
|
||||
try {
|
||||
(session as UIExtensionContentSession)?.setWindowBackgroundColor(BG_COLOR);
|
||||
|
@ -49,7 +49,7 @@ class UsbServiceSwitch {
|
||||
}
|
||||
|
||||
console.log(TAG + 'setFunctions: current ' + JSON.stringify(this.curFunc) + 'target: ' + JSON.stringify(this.tarFunc));
|
||||
if (this.tarFunc != this.curFunc) {
|
||||
if (this.tarFunc !== this.curFunc) {
|
||||
usbManagerService.setCurrentFunctions(this.tarFunc).then((data) => {
|
||||
console.log(TAG + 'setCurrentFunctions success: ' + JSON.stringify(data));
|
||||
}).catch((err) => {
|
||||
|
Loading…
Reference in New Issue
Block a user