summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2009-07-30 17:14:34 +0800
committerWu-cheng Li <wuchengli@google.com>2009-07-30 17:24:55 +0800
commit640ad87bf4945f5baa22ef1e02eb1c4ac7fd3ef7 (patch)
tree461a5748a120e19aed980442e32ef4326c9b0816 /src/com/android
parent62f1a2287bcbc2a6928235f4e3cb8c8cefbbe6e4 (diff)
downloadLegacyCamera-640ad87bf4945f5baa22ef1e02eb1c4ac7fd3ef7.zip
LegacyCamera-640ad87bf4945f5baa22ef1e02eb1c4ac7fd3ef7.tar.gz
LegacyCamera-640ad87bf4945f5baa22ef1e02eb1c4ac7fd3ef7.tar.bz2
Make CropImage support fullscreen extra.
b2022570. When returning from a full-screen activity to a non-full-screen one, screen jumps a little and scroll bars are partially off screen. This is a work-around to prevent the issue.
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/Camera.java1
-rw-r--r--src/com/android/camera/CropImage.java6
-rw-r--r--src/com/android/camera/ImageGallery.java1
-rw-r--r--src/com/android/camera/MenuHelper.java1
-rw-r--r--src/com/android/camera/Wallpaper.java1
5 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 1db7862..5d53a72 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -908,6 +908,7 @@ public class Camera extends Activity implements View.OnClickListener,
} else {
newExtras.putBoolean("return-data", true);
}
+ newExtras.putBoolean(MediaStore.EXTRA_FULL_SCREEN, true);
Intent cropIntent = new Intent();
cropIntent.setClass(Camera.this, CropImage.class);
diff --git a/src/com/android/camera/CropImage.java b/src/com/android/camera/CropImage.java
index 118adce..32a0dff 100644
--- a/src/com/android/camera/CropImage.java
+++ b/src/com/android/camera/CropImage.java
@@ -42,6 +42,7 @@ import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
+import android.view.WindowManager;
import android.widget.Toast;
import java.io.File;
@@ -124,6 +125,11 @@ public class CropImage extends MonitoredActivity {
mDoFaceDetection = extras.containsKey("noFaceDetection")
? !extras.getBoolean("noFaceDetection")
: true;
+
+ if (intent.getBooleanExtra(MediaStore.EXTRA_FULL_SCREEN, true)) {
+ getWindow().addFlags(
+ WindowManager.LayoutParams.FLAG_FULLSCREEN);
+ }
}
if (mBitmap == null) {
diff --git a/src/com/android/camera/ImageGallery.java b/src/com/android/camera/ImageGallery.java
index 95b2ff8..795fcc2 100644
--- a/src/com/android/camera/ImageGallery.java
+++ b/src/com/android/camera/ImageGallery.java
@@ -296,6 +296,7 @@ public class ImageGallery extends Activity implements
if (cropValue.equals("circle")) {
newExtras.putString("circleCrop", "true");
}
+ newExtras.putBoolean(MediaStore.EXTRA_FULL_SCREEN, true);
Intent cropIntent = new Intent();
cropIntent.setData(img.fullSizeImageUri());
diff --git a/src/com/android/camera/MenuHelper.java b/src/com/android/camera/MenuHelper.java
index 6c0c58d..d475ad8 100644
--- a/src/com/android/camera/MenuHelper.java
+++ b/src/com/android/camera/MenuHelper.java
@@ -555,6 +555,7 @@ public class MenuHelper {
Intent cropIntent = new Intent();
cropIntent.setClass(activity, CropImage.class);
cropIntent.setData(u);
+ cropIntent.putExtra(MediaStore.EXTRA_FULL_SCREEN, true);
activity.startActivityForResult(cropIntent,
RESULT_COMMON_MENU_CROP);
}
diff --git a/src/com/android/camera/Wallpaper.java b/src/com/android/camera/Wallpaper.java
index 0b053ce..972bacf 100644
--- a/src/com/android/camera/Wallpaper.java
+++ b/src/com/android/camera/Wallpaper.java
@@ -143,6 +143,7 @@ public class Wallpaper extends Activity {
intent.setClassName("com.android.camera",
"com.android.camera.CropImage");
intent.setData(imageToUse);
+ intent.putExtra(MediaStore.EXTRA_FULL_SCREEN, true);
formatIntent(intent);
startActivityForResult(intent, CROP_DONE);
} else {