18
+import java.nio.ByteBuffer;
19
+
20
+import com.remoteyourcam.usb.ptp.PacketUtil;
21
+
22
+public class StorageInfo {
23
+
24
+    public int storageType;
25
+    public int filesystemType;
26
+    public int accessCapability;
27
+    public long maxCapacity;
28
+    public long freeSpaceInBytes;
29
+    public int freeSpaceInImages;
30
+    public String storageDescription;
31
+    public String volumeLabel;
32
+
33
+    public StorageInfo(ByteBuffer b, int length) {
34
+        decode(b, length);
35
+    }
36
+
37
+    private void decode(ByteBuffer b, int length) {
38
+        storageType = b.getShort() & 0xffff;
39
+        filesystemType = b.getShort() & 0xffff;
40
+        accessCapability = b.getShort() & 0xff;
41
+        maxCapacity = b.getLong();
42
+        freeSpaceInBytes = b.getLong();
43
+        freeSpaceInImages = b.getInt();
44
+        storageDescription = PacketUtil.readString(b);
45
+        volumeLabel = PacketUtil.readString(b);
46
+    }
47
+}

增加调试日志显示 · 08f92a3e1c - Gogs: Go Git Service

增加调试日志显示

chengzhenyu 8 years ago
parent
commit
08f92a3e1c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/src/main/java/ai/pai/lensman/session/SessionActivity.java

+ 2 - 0
app/src/main/java/ai/pai/lensman/session/SessionActivity.java

@@ -81,6 +81,8 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
81 81
         sessionBean =(SessionBean)getIntent().getSerializableExtra("session");
82 82
         if(BuildConfig.isTestMode){
83 83
             sessionBean.sessionId="test";
84
+        }
85
+        if(BuildConfig.DEBUG){
84 86
             cameraStatusTextView.setVisibility(View.VISIBLE);
85 87
         }
86 88
         presenter = new SessionPresenter(sessionBean,this);