w">
245
}
|
|
248
|
246
|
|
|
249
|
247
|
@Override
|
|
|
|
@@ -263,6 +261,8 @@ public class CameraService extends Service implements Camera.CameraListener, Ca
|
|
263
|
261
|
|
|
264
|
262
|
@Override
|
|
265
|
263
|
public void onImageHandlesRetrieved(int[] handles) {
|
|
|
264
|
+ LogHelper.d("czy","CameraService onImageHandlesRetrieved: "+ handles.length);
|
|
|
265
|
+
|
|
266
|
266
|
if(origin.length ==0){
|
|
267
|
267
|
origin = handles;
|
|
268
|
268
|
}else{
|
|
|
|
@@ -284,7 +284,8 @@ public class CameraService extends Service implements Camera.CameraListener, Ca
|
|
284
|
284
|
}
|
|
285
|
285
|
if(camera != null && diff.size() >0){
|
|
286
|
286
|
for(int k = 0; k< diff.size();k++){
|
|
287
|
|
- camera.retrievePicture(diff.get(k));
|
|
|
287
|
+ LogHelper.d("czy","CameraService fetchPhotoTask new photo found: "+ diff.get(k));
|
|
|
288
|
+// camera.retrievePicture(diff.get(k));
|
|
288
|
289
|
}
|
|
289
|
290
|
}
|
|
290
|
291
|
origin = handles;
|
|
|
|
@@ -296,5 +297,12 @@ public class CameraService extends Service implements Camera.CameraListener, Ca
|
|
296
|
297
|
|
|
297
|
298
|
}
|
|
298
|
299
|
|
|
|
300
|
+ private void saveBmpAndNotify(int objectHandle, String filename, Bitmap bmp){
|
|
|
301
|
+
|
|
|
302
|
+// Bundle bundle = new Bundle();
|
|
|
303
|
+// bundle.putInt(EXTRA_STATUS_PART, MSG_CAMERA_NEW_PHOTO_FOUND);
|
|
|
304
|
+// bundle.putString(EXTRA_DATA_PART,filename);
|
|
|
305
|
+// sendCameraIntent(bundle);
|
|
|
306
|
+ }
|
|
299
|
307
|
|
|
300
|
308
|
}
|
|
|
|
@@ -1,4 +1,4 @@
|
|
1
|
|
-<resources>
|
|
|
1
|
+<resources xmlns:tools="http://schemas.android.com/tools">
|
|
2
|
2
|
|
|
3
|
3
|
<!-- Base application theme. -->
|
|
4
|
4
|
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
|
|
|
@@ -13,4 +13,22 @@
|
|
13
|
13
|
<item name="windowNoTitle">true</item>
|
|
14
|
14
|
</style>
|
|
15
|
15
|
|
|
|
16
|
+ <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
|
|
17
|
+ <!-- Customize your theme here. -->
|
|
|
18
|
+ <item name="android:selectableItemBackground">@null</item>
|
|
|
19
|
+ <item name="android:selectableItemBackgroundBorderless" tools:targetApi="lollipop">@null
|
|
|
20
|
+ </item>
|
|
|
21
|
+ </style>
|
|
|
22
|
+
|
|
|
23
|
+ <style name="MyTransparentTheme" parent="MyAppTheme">
|
|
|
24
|
+ <item name="android:windowBackground">@color/transparent</item>
|
|
|
25
|
+ <item name="android:windowIsTranslucent">true</item>
|
|
|
26
|
+ <item name="android:windowFrame">@null</item>
|
|
|
27
|
+ <item name="android:windowContentOverlay">@null</item>
|
|
|
28
|
+ <item name="android:windowAnimationStyle">@null</item>
|
|
|
29
|
+ <item name="android:backgroundDimEnabled">false</item>
|
|
|
30
|
+ <item name="android:windowIsFloating">false</item>
|
|
|
31
|
+ <item name="windowNoTitle">true</item>
|
|
|
32
|
+ </style>
|
|
|
33
|
+
|
|
16
|
34
|
</resources>
|
|
|
|
@@ -175,9 +175,9 @@ public class NikonCamera extends PtpCamera {
|
|
175
|
175
|
queue.add(new SimpleCommand(this, PtpConstants.Operation.NikonDeleteImagesInSdram, objectHandle));
|
|
176
|
176
|
}
|
|
177
|
177
|
|
|
178
|
|
- public void onEventObjectAdded(int objectHandle) {
|
|
179
|
|
- queue.add(new RetrieveAddedObjectInfoAction(this, objectHandle));
|
|
180
|
|
- }
|
|
|
178
|
+// public void onEventObjectAdded(int objectHandle) {
|
|
|
179
|
+// queue.add(new RetrieveAddedObjectInfoAction(this, objectHandle));
|
|
|
180
|
+// }
|
|
181
|
181
|
|
|
182
|
182
|
public void onEventCaptureComplete() {
|
|
183
|
183
|
//TODO
|
|
|
|
@@ -41,7 +41,6 @@ public class RetrieveAddedObjectInfoAction implements PtpAction {
|
|
41
|
41
|
if (getInfo.getObjectInfo() == null) {
|
|
42
|
42
|
return;
|
|
43
|
43
|
}
|
|
44
|
|
-
|
|
45
|
44
|
camera.onEventObjectAdded(objectHandle);
|
|
46
|
45
|
}
|
|
47
|
46
|
|
|
|
|
@@ -72,7 +72,9 @@ public class NikonEventCheckCommand extends NikonCommand {
|
|
72
|
72
|
break;
|
|
73
|
73
|
case Event.NikonObjectAddedInSdram:
|
|
74
|
74
|
//libgphoto2 相关处理
|
|
75
|
|
- if (eventParam == 0) { eventParam = 0xffff001; }
|
|
|
75
|
+ if (eventParam == 0) {
|
|
|
76
|
+ eventParam = 0xffff0001;
|
|
|
77
|
+ }
|
|
76
|
78
|
camera.onEventObjectAdded(eventParam);
|
|
77
|
79
|
break;
|
|
78
|
80
|
}
|