summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ActivityBase.java
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-03-15 16:29:00 +0800
committerWu-cheng Li <wuchengli@google.com>2011-03-15 17:19:14 +0800
commit5df067af93e6b386167f11cdf12701b7905ee444 (patch)
tree6a8c6bf8a457ef2a4406f5354edadcca20e46506 /src/com/android/camera/ActivityBase.java
parentc9713f275106d2125867e4c0ef3c20d2fdf66022 (diff)
downloadLegacyCamera-5df067af93e6b386167f11cdf12701b7905ee444.zip
LegacyCamera-5df067af93e6b386167f11cdf12701b7905ee444.tar.gz
LegacyCamera-5df067af93e6b386167f11cdf12701b7905ee444.tar.bz2
Add image capture intent test.
Change-Id: Iba7ecf9054b630a14f1bf24ba223e0eecb1c3fd4
Diffstat (limited to 'src/com/android/camera/ActivityBase.java')
-rw-r--r--src/com/android/camera/ActivityBase.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/com/android/camera/ActivityBase.java b/src/com/android/camera/ActivityBase.java
index 5f9c8a5..5839668 100644
--- a/src/com/android/camera/ActivityBase.java
+++ b/src/com/android/camera/ActivityBase.java
@@ -18,11 +18,15 @@ package com.android.camera;
import android.app.Activity;
import android.view.KeyEvent;
+import android.content.Intent;
/**
* Superclass of Camera and VideoCamera activities.
*/
public class ActivityBase extends Activity {
+ private int mResultCodeForTesting;
+ private Intent mResultDataForTesting;
+
@Override
public boolean onSearchRequested() {
return false;
@@ -38,4 +42,23 @@ public class ActivityBase extends Activity {
return super.onKeyDown(keyCode, event);
}
+
+ protected void setResultEx(int resultCode) {
+ mResultCodeForTesting = resultCode;
+ setResult(resultCode);
+ }
+
+ protected void setResultEx(int resultCode, Intent data) {
+ mResultCodeForTesting = resultCode;
+ mResultDataForTesting = data;
+ setResult(resultCode, data);
+ }
+
+ public int getResultCode() {
+ return mResultCodeForTesting;
+ }
+
+ public Intent getResultData() {
+ return mResultDataForTesting;
+ }
}