mirror of
https://gitee.com/openharmony/applications_app_samples
synced 2024-11-23 08:30:06 +00:00
fix Flow task management service show device list
Signed-off-by: wangli325 <wangli325@huawei.com>
This commit is contained in:
parent
d7eb994cd0
commit
7833815552
@ -35,7 +35,6 @@ import ohos.agp.components.Text;
|
||||
import ohos.agp.window.dialog.ToastDialog;
|
||||
import ohos.app.Context;
|
||||
import ohos.bundle.ElementName;
|
||||
import ohos.distributedschedule.interwork.DeviceManager;
|
||||
import ohos.eventhandler.EventHandler;
|
||||
import ohos.eventhandler.EventRunner;
|
||||
import ohos.eventhandler.InnerEvent;
|
||||
@ -145,11 +144,6 @@ public class MainAbilitySlice extends AbilitySlice implements IAbilityContinuati
|
||||
|
||||
private void disConnectAbility() {
|
||||
disconnectAbility(connection);
|
||||
try {
|
||||
DeviceManager.unInitDistributedEnvironment(selectedDeviceId, iInitCallback);
|
||||
} catch (RemoteException | IllegalArgumentException e) {
|
||||
HiLog.info(LABEL_LOG, e.getMessage());
|
||||
}
|
||||
remoteAgentProxy = null;
|
||||
}
|
||||
|
||||
@ -166,22 +160,12 @@ public class MainAbilitySlice extends AbilitySlice implements IAbilityContinuati
|
||||
|
||||
private IContinuationDeviceCallback callback = new IContinuationDeviceCallback() {
|
||||
@Override
|
||||
public void onDeviceConnectDone(String s, String s1) {
|
||||
public void onDeviceConnectDone(String deviceId, String message) {
|
||||
selectedDeviceId = s;
|
||||
try {
|
||||
DeviceManager.initDistributedEnvironment(selectedDeviceId, iInitCallback);
|
||||
} catch (RemoteException e) {
|
||||
HiLog.info(LABEL_LOG, "RemoteException happen");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeviceDisconnectDone(String s) {
|
||||
try {
|
||||
DeviceManager.unInitDistributedEnvironment(selectedDeviceId, iInitCallback);
|
||||
} catch (RemoteException | IllegalArgumentException e) {
|
||||
HiLog.info(LABEL_LOG, e.getMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user