|
|
|
@ -432,27 +432,6 @@ public class MicroPhotoService extends Service {
|
|
|
|
|
Log.i(TAG, "PhotoTimer Fired: CH=" + channel + " PR=" + preset);
|
|
|
|
|
mService.notifyToTakePhoto(mService.mNativeHandle, channel, preset, ts, photoOrVideo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
File cameraAdbCfg = new File(MicroPhotoContext.buildMpAppDir(mService.getApplication()), "data/cameraAdb.cfg");
|
|
|
|
|
if (cameraAdbCfg.exists()) {
|
|
|
|
|
final String appPath = MicroPhotoContext.buildMpAppDir(context);
|
|
|
|
|
mService.mHander.postDelayed(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
final CameraAdb cameraAdb = new CameraAdb(context, appPath);
|
|
|
|
|
cameraAdb.setCallback(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
List<String> targetPaths = cameraAdb.getTargetPaths();
|
|
|
|
|
for (String targetPath : targetPaths) {
|
|
|
|
|
mService.sendExternalPhoto(mService.mNativeHandle, targetPath);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
cameraAdb.takePhoto();
|
|
|
|
|
}
|
|
|
|
|
}, 10000 * cnt);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Register Next Photo Timer
|
|
|
|
@ -1480,7 +1459,7 @@ cellSignalStrengthGsm.getDbm();
|
|
|
|
|
protected native void burstCaptureFinished(long handler, boolean result, int numberOfCaptures, String pathsJoinedByTab, boolean frontCamera, int rotation, long photoId);
|
|
|
|
|
public static native long takePhoto(int channel, int preset, boolean photoOrVideo, String configFilePath, String path);
|
|
|
|
|
public static native void releaseDeviceHandle(long deviceHandle);
|
|
|
|
|
public static native boolean sendExternalPhoto(long deviceHandle, String path);
|
|
|
|
|
public static native boolean sendExternalPhoto(long deviceHandle, String path, long photoInfo);
|
|
|
|
|
public static native void infoLog(String log);
|
|
|
|
|
|
|
|
|
|
public static native void setOtgState(boolean enabled);
|
|
|
|
@ -1570,6 +1549,25 @@ cellSignalStrengthGsm.getDbm();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void callSystemCamera(final int cameraId, final long photoId) {
|
|
|
|
|
Context context = getApplicationContext();
|
|
|
|
|
final CameraAdb cameraAdb = new CameraAdb(context, MicroPhotoContext.buildMpAppDir(context));
|
|
|
|
|
cameraAdb.setCallback(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
List<String> targetPaths = cameraAdb.getTargetPaths();
|
|
|
|
|
if (targetPaths.isEmpty()) {
|
|
|
|
|
recordingFinished(mNativeHandle, true, false, null, photoId);
|
|
|
|
|
} else {
|
|
|
|
|
for (String targetPath : targetPaths) {
|
|
|
|
|
recordingFinished(mNativeHandle, true, true, targetPath, photoId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
cameraAdb.takePhoto(cameraId);
|
|
|
|
|
}
|
|
|
|
|
////////////////////////GPS////////////////////
|
|
|
|
|
|
|
|
|
|
private void setDefaultDataSubId(int subId) {
|
|
|
|
|