fix Flow task management service show device list

Signed-off-by: wangli325 <wangli325@huawei.com>
This commit is contained in:
wangli325 2021-07-09 12:26:51 +08:00
parent 120131a9b5
commit 43c9032a77
5 changed files with 16 additions and 7 deletions

View File

@ -2,9 +2,9 @@
apply plugin: 'com.huawei.ohos.app'
ohos {
compileSdkVersion 5
compileSdkVersion 6
defaultConfig {
compatibleSdkVersion 4
compatibleSdkVersion 6
}
}

View File

@ -1,8 +1,8 @@
apply plugin: 'com.huawei.ohos.hap'
ohos {
compileSdkVersion 5
compileSdkVersion 6
defaultConfig {
compatibleSdkVersion 4
compatibleSdkVersion 6
}
buildTypes {
release {

View File

@ -16,6 +16,7 @@
package ohos.samples.distributedscheduler.slice;
import ohos.aafwk.ability.continuation.ExtraParams;
import ohos.aafwk.ability.continuation.ContinuationDeviceInfo;
import ohos.aafwk.ability.continuation.IContinuationDeviceCallback;
import ohos.aafwk.ability.continuation.IContinuationRegisterManager;
import ohos.aafwk.ability.continuation.RequestCallback;
@ -160,12 +161,20 @@ public class MainAbilitySlice extends AbilitySlice implements IAbilityContinuati
private IContinuationDeviceCallback callback = new IContinuationDeviceCallback() {
@Override
public void onDeviceConnectDone(String deviceId, String message) {
selectedDeviceId = deviceId;
public void onConnected(ContinuationDeviceInfo deviceInfo) {
selectedDeviceId = deviceInfo.getDeviceId();
}
@Override
public void onDisconnected(String deviceId) {
selectedDeviceId = "";
}
@Override
public void onDeviceDisconnectDone(String s) {
public void onDeviceConnectDone(String deviceId, String deviceType) {
}
@Override
public void onDeviceDisconnectDone(String deviceId) {
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB