platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java in rhodes-2.2.6 vs platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java in rhodes-2.3.0.beta.1
- old
+ new
@@ -24,10 +24,12 @@
import android.content.Intent;
import com.rhomobile.rhodes.Capabilities;
import com.rhomobile.rhodes.Logger;
+import com.rhomobile.rhodes.RhodesActivity;
+import com.rhomobile.rhodes.RhodesAppOptions;
import com.rhomobile.rhodes.RhodesService;
import com.rhomobile.rhodes.util.PerformOnUiThread;
public class Camera {
@@ -38,11 +40,11 @@
private static void reportFail(String name, Exception e) {
Logger.E(TAG, "Call of \"" + name + "\" failed: " + e.getMessage());
}
private static void init() {
- File f = new File(RhodesService.getBlobPath());
+ File f = new File(RhodesAppOptions.getBlobPath());
if (!f.exists())
f.mkdirs();
}
private static class CameraDisabled implements Runnable {
@@ -68,13 +70,13 @@
klass = c;
}
public void run() {
init();
- RhodesService r = RhodesService.getInstance();
- Intent intent = new Intent(r.getContext(), klass);
+ RhodesActivity ra = RhodesActivity.getInstance();
+ Intent intent = new Intent(ra, klass);
intent.putExtra(INTENT_EXTRA_PREFIX + "callback", url);
- r.startActivity(intent);
+ ra.startActivity(intent);
}
};
public static void takePicture(String url) {
try {