Small fixes
This commit is contained in:
parent
ba1ca526ec
commit
f4a5448e6b
3 changed files with 9 additions and 8 deletions
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" >
|
||||
|
||||
<Switch
|
||||
android:id="@+id/check_item"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:focusable="false"
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" >
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/check_item"
|
||||
android:text="@string/osmo_connect_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginRight="3dp"
|
||||
android:layout_marginTop="3dp"
|
||||
|
|
|
@ -123,12 +123,12 @@ public class OsMoGroups implements OsMoReactor, OsmoTrackerListener {
|
|||
}
|
||||
|
||||
public void disconnectDevice(OsMoDevice model) {
|
||||
model.enabled = false;
|
||||
disconnectImpl(model);
|
||||
storage.save();
|
||||
}
|
||||
|
||||
private void disconnectImpl(OsMoDevice model) {
|
||||
model.enabled = false;
|
||||
model.active = false;
|
||||
tracker.stopTrackingId(model);
|
||||
}
|
||||
|
@ -192,12 +192,13 @@ public class OsMoGroups implements OsMoReactor, OsmoTrackerListener {
|
|||
} else if(command.equalsIgnoreCase("GROUP_CONNECT")) {
|
||||
group = storage.getGroup(gid);
|
||||
if(group != null) {
|
||||
group.users.clear();
|
||||
mergeGroup(group, obj, true);
|
||||
group.active = true;
|
||||
// connect to all devices in group
|
||||
// connect to enabled devices in group
|
||||
for(OsMoDevice d : group.getGroupUsers(null)) {
|
||||
connectDeviceImpl(d);
|
||||
if(d.isEnabled()) {
|
||||
connectDeviceImpl(d);
|
||||
}
|
||||
}
|
||||
storage.save();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue