Selaa lähdekoodia

fixed command exec data binding; cleaned imports

tags/0.0.5
Robin Thoni 9 vuotta sitten
vanhempi
commit
5d2b00bf41

BIN
app/app-release.apk Näytä tiedosto


+ 0
- 1
app/src/main/java/com/rthoni/camotion/business/CamotionAccountBusiness.java Näytä tiedosto

@@ -10,7 +10,6 @@ import android.content.Context;
10 10
 import android.content.Intent;
11 11
 import android.os.Bundle;
12 12
 import android.os.IBinder;
13
-import android.util.Log;
14 13
 
15 14
 import com.rthoni.camotion.ui.AddAccountActivity;
16 15
 

+ 3
- 10
app/src/main/java/com/rthoni/camotion/business/CommandsBusiness.java Näytä tiedosto

@@ -1,17 +1,10 @@
1 1
 package com.rthoni.camotion.business;
2 2
 
3
-import android.graphics.Bitmap;
4
-import android.graphics.BitmapFactory;
5
-import android.util.Base64;
6
-
7 3
 import com.luticate.utils.business.LuBusinessManager;
8 4
 import com.luticate.utils.business.LuPromise;
9
-import com.luticate.utils.dbo.LuBoolDbo;
10 5
 import com.luticate.utils.dbo.LuDataAccessConfigDbo;
11
-import com.rthoni.camotion.dataaccess.CamerasDataAccess;
6
+import com.luticate.utils.dbo.LuVoidDbo;
12 7
 import com.rthoni.camotion.dataaccess.CommandsDataAccess;
13
-import com.rthoni.camotion.dbo.CameraDbo;
14
-import com.rthoni.camotion.dbo.CameraImageDbo;
15 8
 import com.rthoni.camotion.dbo.CommandDbo;
16 9
 
17 10
 /**
@@ -23,12 +16,12 @@ public class CommandsBusiness extends LuBusinessManager {
23 16
         return CommandsDataAccess.getAll(config, page, perPage);
24 17
     }
25 18
 
26
-    public static LuPromise<LuBoolDbo> exec(LuDataAccessConfigDbo config, int commandId)
19
+    public static LuPromise<LuVoidDbo> exec(LuDataAccessConfigDbo config, int commandId)
27 20
     {
28 21
         return CommandsDataAccess.exec(config, commandId);
29 22
     }
30 23
 
31
-    public static LuPromise<LuBoolDbo> exec(LuDataAccessConfigDbo config, CommandDbo command)
24
+    public static LuPromise<LuVoidDbo> exec(LuDataAccessConfigDbo config, CommandDbo command)
32 25
     {
33 26
         return exec(config, command.getId());
34 27
     }

+ 3
- 5
app/src/main/java/com/rthoni/camotion/dataaccess/CommandsDataAccess.java Näytä tiedosto

@@ -3,11 +3,9 @@ package com.rthoni.camotion.dataaccess;
3 3
 import com.luticate.utils.business.LuPromise;
4 4
 import com.luticate.utils.business.LuRequest;
5 5
 import com.luticate.utils.dataaccess.LuDataAccess;
6
-import com.luticate.utils.dbo.LuBoolDbo;
7 6
 import com.luticate.utils.dbo.LuDataAccessConfigDbo;
7
+import com.luticate.utils.dbo.LuVoidDbo;
8 8
 import com.rthoni.camotion.dbo.CommandDbo;
9
-import com.rthoni.camotion.dbo.SensorDbo;
10
-import com.rthoni.camotion.dbo.SensorValueDbo;
11 9
 
12 10
 import java.util.HashMap;
13 11
 
@@ -24,8 +22,8 @@ public class CommandsDataAccess extends LuDataAccess {
24 22
         return LuRequest.get(config, CommandDbo.MultipleCommandDbo.class, "/api/commands", params);
25 23
     }
26 24
 
27
-    public static LuPromise<LuBoolDbo> exec(LuDataAccessConfigDbo config, int id)
25
+    public static LuPromise<LuVoidDbo> exec(LuDataAccessConfigDbo config, int id)
28 26
     {
29
-        return LuRequest.post(config, LuBoolDbo.class, "/api/commands/" + id + "/exec");
27
+        return LuRequest.post(config, LuVoidDbo.class, "/api/commands/" + id + "/exec");
30 28
     }
31 29
 }

+ 0
- 1
app/src/main/java/com/rthoni/camotion/dbo/LocationDbo.java Näytä tiedosto

@@ -1,6 +1,5 @@
1 1
 package com.rthoni.camotion.dbo;
2 2
 
3
-import com.luticate.auth.dbo.LuFullLoginDbo;
4 3
 import com.luticate.auth.dbo.LuLoginDbo;
5 4
 import com.luticate.utils.dbo.LuDataAccessConfigDbo;
6 5
 import com.luticate.utils.dbo.LuDbo;

+ 0
- 1
app/src/main/java/com/rthoni/camotion/ui/AddCommandShortcutActivity.java Näytä tiedosto

@@ -6,7 +6,6 @@ import android.os.Bundle;
6 6
 import android.widget.Toast;
7 7
 
8 8
 import com.luticate.auth.dbo.LuFullLoginDbo;
9
-import com.luticate.auth.dbo.LuLoginDbo;
10 9
 import com.luticate.utils.business.LuPromise;
11 10
 import com.luticate.utils.business.LuRequest;
12 11
 import com.rthoni.camotion.R;

+ 0
- 2
app/src/main/java/com/rthoni/camotion/ui/CommandExecActivity.java Näytä tiedosto

@@ -6,7 +6,6 @@ import android.os.Bundle;
6 6
 import android.support.v7.app.AlertDialog;
7 7
 import android.widget.Toast;
8 8
 
9
-import com.luticate.auth.dbo.LuFullLoginDbo;
10 9
 import com.luticate.auth.dbo.LuLoginDbo;
11 10
 import com.luticate.utils.business.LuPromise;
12 11
 import com.rthoni.camotion.R;
@@ -16,7 +15,6 @@ import com.rthoni.camotion.dbo.LocationDbo;
16 15
 import com.rthoni.camotion.ui.dialogs.CommandExecDialog;
17 16
 import com.rthoni.camotion.ui.dialogs.LoginDialog;
18 17
 
19
-import org.json.JSONException;
20 18
 import org.json.JSONObject;
21 19
 
22 20
 import java.util.List;

+ 0
- 1
app/src/main/java/com/rthoni/camotion/ui/MainActivity.java Näytä tiedosto

@@ -26,7 +26,6 @@ import com.rthoni.camotion.ui.dialogs.LoginDialog;
26 26
 import com.rthoni.camotion.ui.fragments.CamerasFragment;
27 27
 import com.rthoni.camotion.ui.fragments.CamotionFragment;
28 28
 import com.rthoni.camotion.ui.fragments.CommandsFragment;
29
-import com.rthoni.camotion.ui.fragments.DefaultFragment;
30 29
 import com.rthoni.camotion.ui.fragments.SensorsFragment;
31 30
 
32 31
 import java.util.List;

+ 3
- 10
app/src/main/java/com/rthoni/camotion/ui/dialogs/CommandExecDialog.java Näytä tiedosto

@@ -1,23 +1,16 @@
1 1
 package com.rthoni.camotion.ui.dialogs;
2 2
 
3
-import android.app.Dialog;
4 3
 import android.app.ProgressDialog;
5 4
 import android.content.Context;
6 5
 import android.content.DialogInterface;
7 6
 import android.support.v7.app.AlertDialog;
8 7
 
9
-import com.luticate.auth.business.LuticatePermissionsBusiness;
10
-import com.luticate.auth.business.LuticateUsersBusiness;
11
-import com.luticate.auth.dbo.LuFullLoginDbo;
12
-import com.luticate.auth.dbo.LuLoginDbo;
13
-import com.luticate.auth.dbo.LuPermissionDbo;
14 8
 import com.luticate.utils.business.LuPromise;
15
-import com.luticate.utils.dbo.LuBoolDbo;
16 9
 import com.luticate.utils.dbo.LuDataAccessConfigDbo;
10
+import com.luticate.utils.dbo.LuVoidDbo;
17 11
 import com.rthoni.camotion.R;
18 12
 import com.rthoni.camotion.business.CommandsBusiness;
19 13
 import com.rthoni.camotion.dbo.CommandDbo;
20
-import com.rthoni.camotion.dbo.LocationDbo;
21 14
 
22 15
 /**
23 16
  *
@@ -48,9 +41,9 @@ public abstract class CommandExecDialog {
48 41
         dlg.setMessage(context.getString(R.string.command_loading, command.getName()));
49 42
         dlg.setCancelable(false);
50 43
         dlg.show();
51
-        CommandsBusiness.exec(config, command).then(new LuPromise.LuConsumer<LuBoolDbo>() {
44
+        CommandsBusiness.exec(config, command).then(new LuPromise.LuConsumer<LuVoidDbo>() {
52 45
             @Override
53
-            public void execute(LuBoolDbo data) {
46
+            public void execute(LuVoidDbo data) {
54 47
                 dlg.hide();
55 48
                 showEndDialog(context, context.getString(R.string.command_success, command.getName()))
56 49
                     .then(new LuPromise.LuConsumer<Boolean>() {

+ 0
- 3
app/src/main/java/com/rthoni/camotion/ui/fragments/SensorsFragment.java Näytä tiedosto

@@ -2,11 +2,8 @@ package com.rthoni.camotion.ui.fragments;
2 2
 
3 3
 import com.luticate.utils.business.LuPromise;
4 4
 import com.luticate.utils.dbo.LuMultipleDbo;
5
-import com.rthoni.camotion.business.CamerasBusiness;
6 5
 import com.rthoni.camotion.business.SensorsBusiness;
7
-import com.rthoni.camotion.dbo.CameraDbo;
8 6
 import com.rthoni.camotion.dbo.SensorDbo;
9
-import com.rthoni.camotion.ui.views.CameraView;
10 7
 import com.rthoni.camotion.ui.views.SensorView;
11 8
 
12 9
 /**

+ 0
- 1
app/src/main/java/com/rthoni/camotion/ui/views/CommandView.java Näytä tiedosto

@@ -11,7 +11,6 @@ import com.luticate.utils.business.LuPromise;
11 11
 import com.rthoni.camotion.R;
12 12
 import com.rthoni.camotion.dbo.CommandDbo;
13 13
 import com.rthoni.camotion.dbo.LocationDbo;
14
-import com.rthoni.camotion.ui.dialogs.CommandExecDialog;
15 14
 
16 15
 /**
17 16
  * Created by robin on 12/10/15.

+ 0
- 5
app/src/main/java/com/rthoni/camotion/ui/views/SensorView.java Näytä tiedosto

@@ -1,20 +1,15 @@
1 1
 package com.rthoni.camotion.ui.views;
2 2
 
3 3
 import android.content.Context;
4
-import android.graphics.Bitmap;
5 4
 import android.os.Handler;
6 5
 import android.util.AttributeSet;
7
-import android.view.View;
8
-import android.widget.ImageView;
9 6
 import android.widget.RelativeLayout;
10 7
 import android.widget.TextView;
11 8
 
12 9
 import com.luticate.auth.dbo.LuFullLoginDbo;
13 10
 import com.luticate.utils.business.LuPromise;
14 11
 import com.rthoni.camotion.R;
15
-import com.rthoni.camotion.business.CamerasBusiness;
16 12
 import com.rthoni.camotion.business.SensorsBusiness;
17
-import com.rthoni.camotion.dbo.CameraDbo;
18 13
 import com.rthoni.camotion.dbo.LocationDbo;
19 14
 import com.rthoni.camotion.dbo.SensorDbo;
20 15
 import com.rthoni.camotion.dbo.SensorValueDbo;

Loading…
Peruuta
Tallenna